You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding a custom extension to a certificate using mbedtls, setting the critical flag to 1 results in the following error: -0x2562: X509 - The extension tag or value is invalid : ASN1 - ASN1 tag was of an unexpected value
#9417
Closed
ranbi666 opened this issue
Jul 23, 2024
· 1 comment
When adding a custom extension to a certificate using mbedtls, setting the critical flag to 1 results in the following error: -0x2562: X509 - The extension tag or value is invalid : ASN1 - ASN1 tag was of an unexpected value
Steps to Reproduce
Attempt to add a custom extension to a certificate using mbedtls.
Set the critical flag to 1.
Encounter the error during certificate generation.
1 mbedtls_x509write_crt_pem -》mbedtls_x509write_crt_der
2 mbedtls_x509_crt_parse-》 mbedtls_x509_crt_parse_der_with_ext_cb it can resolve unsupported critical extension question
(Remove the MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION config.h option. The mbedtls_x509_crt_parse_der_with_ext_cb() is the way to go for migration path. Fixes #4378.)
Describe the issue
When adding a custom extension to a certificate using mbedtls, setting the
critical
flag to1
results in the following error:-0x2562: X509 - The extension tag or value is invalid : ASN1 - ASN1 tag was of an unexpected value
Steps to Reproduce
critical
flag to1
.Example Code
The text was updated successfully, but these errors were encountered: