mbedtls icon indicating copy to clipboard operation
mbedtls copied to clipboard

mbedtls is unable to load PEM files with comments

Open kleuter opened this issue 4 months ago • 0 comments

Summary

mbedtls_x509_crt_parse/mbedtls_x509_crt_parse_file are unable to correctly parse PEM files with comments and mistakenly treat such files as DER, resulting in failed parsing. Example file that contains all Mozilla's certificates

System information

Mbed TLS version (number or commit id): 3.5.2 Operating system and version: any system

Expected behavior

Skip comments and load such a PEM file

Actual behavior

Failed parsing

kleuter avatar Feb 12 '24 14:02 kleuter