Create MBEDTLS_X509_OCSP_PARSE_C feature macro

The new MBEDTLS_X509_OCSP_PARSE_C is a feature macro that can be
controlled from the config.h file to enable/disable the OCSP X509
feature at compile time.
This commit is contained in:
Andres Amaya Garcia
2017-08-29 11:32:52 +01:00
committed by Andres Amaya Garcia
parent dafbfc4b8a
commit 3140f2fac5
4 changed files with 24 additions and 0 deletions

View File

@@ -642,6 +642,11 @@
#error "MBEDTLS_X509_CSR_PARSE_C defined, but not all prerequisites"
#endif
#if defined(MBEDTLS_X509_OCSP_PARSE_C) && ( !defined(MBEDTLS_X509_USE_C) || \
!defined(MBEDTLS_X509_CRT_PARSE_C) )
#error "MBEDTLS_X509_OCSP_PARSE_C defined, but not all prerequisites"
#endif
#if defined(MBEDTLS_X509_CRT_WRITE_C) && ( !defined(MBEDTLS_X509_CREATE_C) )
#error "MBEDTLS_X509_CRT_WRITE_C defined, but not all prerequisites"
#endif

View File

@@ -2518,6 +2518,19 @@
*/
#define MBEDTLS_X509_CSR_PARSE_C
/**
* \def MBEDTLS_X509_OCSP_PARSE_C
*
* Enable X.509 Online Certificate Status Protocol (OCSP) parsing.
*
* Module: library/x509_ocsp.c
*
* Requires: MBEDTLS_X509_USE_C, MBEDTLS_X509_CRT_PARSE_C
*
* This module is used for reading X.509 OCSP responses.
*/
#define MBEDTLS_X509_OCSP_PARSE_C
/**
* \def MBEDTLS_X509_CREATE_C
*

View File

@@ -53,6 +53,7 @@
#define MBEDTLS_X509_OCSP_CERT_STATUS_REVOKED 1
#define MBEDTLS_X509_OCSP_CERT_STATUS_UNKNOWN 2
#if defined(MBEDTLS_X509_OCSP_PARSE_C)
/**
* \addtogroup x509_module
* \{
@@ -190,4 +191,6 @@ int mbedtls_x509_ocsp_parse_response_file( mbedtls_x509_ocsp_response *resp,
}
#endif
#endif /* MBEDTLS_X509_OCSP_PARSE_C */
#endif /* !MBEDTLS_X509_OCSP_H */