mbedtls_pkcs7_parse_der() function
Parse a single DER formatted PKCS #7 detached signature.
Arguments
pkcs7
The mbedtls_pkcs7 structure to be filled by the parser.
buf
The buffer holding only the DER encoded PKCS #7 content.
buflen
The size in bytes of \p buf. The size must be exactly the length of the DER encoded PKCS #7 content.
Return value
The \c mbedtls_pkcs7_type of \p buf, if successful. A negative error code on failure.
Notes
This function makes an internal copy of the PKCS #7 buffer \p buf. In particular, \p buf may be destroyed or reused after this call returns. Signatures with internal data are not supported.
mbedtls_pkcs7_parse_der() calls 6 functions:
![]()
mbedtls_pkcs7_parse_der()
mbedtls_pkcs7_parse_der() reads 3 variables and writes 2 variables:
![]()
mbedtls_pkcs7_parse_der()