Skip to content

Commit

Permalink
modules: mbedtls: Provide CONFIG_MBEDTLS_ASN1_PARSE_C
Browse files Browse the repository at this point in the history
The commit exports control of MBEDTLS_ASN1_PARSE_C, in mbedTLS
module, via Kconfig.
This allows applications to use ASN1 parser independently from
other functions.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
  • Loading branch information
de-nordic committed Jan 22, 2025
1 parent 31fea97 commit 4901c31
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions modules/mbedtls/Kconfig.tls-generic
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ config MBEDTLS_ECDH_C
config MBEDTLS_ECDSA_C
bool "Elliptic curve DSA library"
depends on MBEDTLS_ECP_C
select MBEDTLS_ASN1_PARSE_C

config MBEDTLS_ECJPAKE_C
bool "Elliptic curve J-PAKE library"
Expand Down Expand Up @@ -373,6 +374,11 @@ config MBEDTLS_MD
config MBEDTLS_GENPRIME_ENABLED
bool "prime-number generation code."

config MBEDTLS_ASN1_PARSE_C
bool "Support for ASN1 parser functions"
help
Enable ASN1 parser functions.

config MBEDTLS_PEM_CERTIFICATE_FORMAT
bool "Support for PEM certificate format"
help
Expand Down
2 changes: 1 addition & 1 deletion modules/mbedtls/configs/config-tls-generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@
#define MBEDTLS_PK_C
#endif

#if defined(MBEDTLS_ECDSA_C) || defined(MBEDTLS_X509_USE_C)
#if defined(CONFIG_MBEDTLS_ASN1_PARSE_C) || defined(MBEDTLS_X509_USE_C)
#define MBEDTLS_ASN1_PARSE_C
#endif

Expand Down

0 comments on commit 4901c31

Please sign in to comment.