mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-06-24 22:29:04 +08:00
adjust_legacy_crypto: enable ASN1_[PARSE|WRITE]_C when RSA_C
RSA needs ASN1 functions to parse/write private and public keys, but there is no guards in the code for that. So we need to enable ASN1 support whenever RSA is enabled. Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
68deadd455
commit
89f5af84af
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user