mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
Merge pull request #4619 from TRodziewicz/remove_MBEDTLS_X509_CHECK_x_KEY_USAGE_options
Remove MBEDTLS_X509_CHECK_*_KEY_USAGE options but enable the code
This commit is contained in:
@ -1832,33 +1832,6 @@
|
||||
*/
|
||||
//#define MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_X509_CHECK_KEY_USAGE
|
||||
*
|
||||
* Enable verification of the keyUsage extension (CA and leaf certificates).
|
||||
*
|
||||
* Disabling this avoids problems with mis-issued and/or misused
|
||||
* (intermediate) CA and leaf certificates.
|
||||
*
|
||||
* \warning Depending on your PKI use, disabling this can be a security risk!
|
||||
*
|
||||
* Comment to skip keyUsage checking for both CA and leaf certificates.
|
||||
*/
|
||||
#define MBEDTLS_X509_CHECK_KEY_USAGE
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
|
||||
*
|
||||
* Enable verification of the extendedKeyUsage extension (leaf certificates).
|
||||
*
|
||||
* Disabling this avoids problems with mis-issued and/or misused certificates.
|
||||
*
|
||||
* \warning Depending on your PKI use, disabling this can be a security risk!
|
||||
*
|
||||
* Comment to skip extendedKeyUsage checking for certificates.
|
||||
*/
|
||||
#define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_X509_REMOVE_INFO
|
||||
*
|
||||
|
@ -827,7 +827,6 @@ int mbedtls_x509_crt_verify_with_ca_cb( mbedtls_x509_crt *crt,
|
||||
|
||||
#endif /* MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK */
|
||||
|
||||
#if defined(MBEDTLS_X509_CHECK_KEY_USAGE)
|
||||
/**
|
||||
* \brief Check usage of certificate against keyUsage extension.
|
||||
*
|
||||
@ -851,9 +850,7 @@ int mbedtls_x509_crt_verify_with_ca_cb( mbedtls_x509_crt *crt,
|
||||
*/
|
||||
int mbedtls_x509_crt_check_key_usage( const mbedtls_x509_crt *crt,
|
||||
unsigned int usage );
|
||||
#endif /* MBEDTLS_X509_CHECK_KEY_USAGE) */
|
||||
|
||||
#if defined(MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE)
|
||||
/**
|
||||
* \brief Check usage of certificate against extendedKeyUsage.
|
||||
*
|
||||
@ -870,7 +867,6 @@ int mbedtls_x509_crt_check_key_usage( const mbedtls_x509_crt *crt,
|
||||
int mbedtls_x509_crt_check_extended_key_usage( const mbedtls_x509_crt *crt,
|
||||
const char *usage_oid,
|
||||
size_t usage_len );
|
||||
#endif /* MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE */
|
||||
|
||||
#if defined(MBEDTLS_X509_CRL_PARSE_C)
|
||||
/**
|
||||
|
Reference in New Issue
Block a user