Merge pull request #9042 from valeriosetti/asn1-missing-guard-in-rsa-backport

[3.6 backport] Asn1 missing guard in rsa backport
This commit is contained in:
Manuel Pégourié-Gonnard 2024-04-22 07:48:47 +00:00 committed by GitHub
commit b9f9c0e0fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,3 @@
Bugfix
* MBEDTLS_ASN1_PARSE_C and MBEDTLS_ASN1_WRITE_C are now automatically enabled
as soon as MBEDTLS_RSA_C is enabled. Fixes #9041.

View File

@ -293,6 +293,14 @@
#define MBEDTLS_ECP_LIGHT #define MBEDTLS_ECP_LIGHT
#endif #endif
/* Backward compatibility: after #8740 the RSA module offers functions to parse
* and write RSA private/public keys without relying on the PK one. Of course
* this needs ASN1 support to do so, so we enable it here. */
#if defined(MBEDTLS_RSA_C)
#define MBEDTLS_ASN1_PARSE_C
#define MBEDTLS_ASN1_WRITE_C
#endif
/* MBEDTLS_PK_PARSE_EC_COMPRESSED is introduced in Mbed TLS version 3.5, while /* MBEDTLS_PK_PARSE_EC_COMPRESSED is introduced in Mbed TLS version 3.5, while
* in previous version compressed points were automatically supported as long * in previous version compressed points were automatically supported as long
* as PK_PARSE_C and ECP_C were enabled. As a consequence, for backward * as PK_PARSE_C and ECP_C were enabled. As a consequence, for backward