Reduce code size when mbedtls_x509_*_info() unused
Introduce MBEDTLS_X509_INFO to indicate the availability of the mbedtls_x509_*_info() function and closely related APIs. When this is not defined, also omit name and description from mbedtls_oid_descriptor_t, and omit OID arrays, macros, and types that are entirely unused. This saves several KB of code space. Signed-off-by: Hanno Becker <hanno.becker@arm.com> Signed-off-by: Chris Jones <christopher.jones@arm.com>
This commit is contained in:
parent
12f93f4fc2
commit
9a969b66c1
28 changed files with 322 additions and 206 deletions
|
@ -316,9 +316,11 @@ int mbedtls_x509_get_serial( unsigned char **p, const unsigned char *end,
|
|||
mbedtls_x509_buf *serial );
|
||||
int mbedtls_x509_get_ext( unsigned char **p, const unsigned char *end,
|
||||
mbedtls_x509_buf *ext, int tag );
|
||||
#if defined(MBEDTLS_X509_INFO)
|
||||
int mbedtls_x509_sig_alg_gets( char *buf, size_t size, const mbedtls_x509_buf *sig_oid,
|
||||
mbedtls_pk_type_t pk_alg, mbedtls_md_type_t md_alg,
|
||||
const void *sig_opts );
|
||||
#endif
|
||||
int mbedtls_x509_key_size_helper( char *buf, size_t buf_size, const char *name );
|
||||
int mbedtls_x509_string_to_names( mbedtls_asn1_named_data **head, const char *name );
|
||||
int mbedtls_x509_set_extension( mbedtls_asn1_named_data **head, const char *oid, size_t oid_len,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue