mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
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:
committed by
Chris Jones
parent
12f93f4fc2
commit
9a969b66c1
@ -831,6 +831,7 @@ int mbedtls_x509_serial_gets( char *buf, size_t size, const mbedtls_x509_buf *se
|
||||
return( (int) ( size - n ) );
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_X509_INFO)
|
||||
/*
|
||||
* Helper for writing signature algorithms
|
||||
*/
|
||||
@ -875,6 +876,7 @@ int mbedtls_x509_sig_alg_gets( char *buf, size_t size, const mbedtls_x509_buf *s
|
||||
|
||||
return( (int)( size - n ) );
|
||||
}
|
||||
#endif /* MBEDTLS_X509_INFO */
|
||||
|
||||
/*
|
||||
* Helper for writing "RSA key size", "EC key size", etc
|
||||
|
Reference in New Issue
Block a user