Function tpm_parse_response

Source
pub fn tpm_parse_response(
    cc: TpmCc,
    buf: &[u8],
) -> TpmResult<TpmParseResult<'_>>
Expand description

Parses a response from a TPM response buffer.

ยงErrors

  • TpmErrorKind::Boundary if the buffer is too small
  • TpmErrorKind::InvalidTag if the tag in the buffer does not match expected
  • TpmErrorKind::InvalidDiscriminant if the buffer contains an unsupported command code
  • TpmErrorKind::TrailingData if the response has after spurious data left