1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-11-05 08:10:38 +03:00
Files
mbedtls/library/pkparse.c
Gilles Peskine 0ca219575a mbedtls_pk_parse_key: don't allocate if not needed
mbedtls_pk_parse_key() makes a temporary copy of the key when it calls
pk_parse_key_pkcs8_encrypted_der(), because that function requires a
writable buffer. pk_parse_key_pkcs8_encrypted_der() always rejects an
empty password, so skip calling it in that case, which allows us to
skip the allocation as well.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-12-10 17:36:37 +01:00

46 KiB