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
extmod/mbedtls: Fix DER certificate parsing with mbedTLS >=3.5.
MbedTLS 3.5 requires the length argument for a DER formatted
key/cert to be exact or it fails parsing.(*) However PEM formatted
keys are required to include a trailing NUL.
Some discussion about the inconsistent length requirements at
Mbed-TLS/mbedtls#3896
Fix by copying the heuristic mbedTLS uses to determine if we're parsing PEM
or DER, and adjust the length to suit.
(*) The release note says "mbedtls_pk_parse_key() now rejects trailing
garbage in encrypted keys." but it seems to be the case whether it's
encrypted or not.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
0 commit comments