mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-04-06 20:46:32 +02:00
Add missing id-pkix-ocsp-basic OID for OCSP
Add missing id-pkix-ocsp-basic OID for ResponseType from RFC 6960 Section 4.2.
This commit is contained in:
committed by
Andres Amaya Garcia
parent
26db5fbe9b
commit
cd5d0aaa59
@@ -188,6 +188,11 @@
|
||||
|
||||
#define MBEDTLS_OID_OCSP_NOCHECK MBEDTLS_OID_OCSP "\x05" /**< id-pkix-ocsp-nocheck OBJECT IDENTIFIER ::= { id-pkix-ocsp 5 } */
|
||||
|
||||
/*
|
||||
* OCSP response type OIDs
|
||||
*/
|
||||
#define MBEDTLS_OID_OCSP_BASIC MBEDTLS_OID_OCSP "\x01" /**< id-pkix-ocsp-basic OBJECT IDENTIFIER ::= { id-pkix-ocsp 1 } */
|
||||
|
||||
/*
|
||||
* PKCS definition OIDs
|
||||
*/
|
||||
@@ -545,6 +550,17 @@ int mbedtls_oid_get_extended_key_usage( const mbedtls_asn1_buf *oid, const char
|
||||
int mbedtls_oid_get_authority_info_access( const mbedtls_asn1_buf *oid,
|
||||
const char **desc );
|
||||
|
||||
/**
|
||||
* \brief Translate OCSP ResponseType OID into description
|
||||
*
|
||||
* \param oid OID to use
|
||||
* \param desc place to store string pointer
|
||||
*
|
||||
* \return 0 if successful, or MBEDTLS_ERR_OID_NOT_FOUND
|
||||
*/
|
||||
int mbedtls_oid_get_ocsp_response_type( const mbedtls_asn1_buf *oid,
|
||||
const char **desc );
|
||||
|
||||
/**
|
||||
* \brief Translate md_type into hash algorithm OID
|
||||
*
|
||||
|
||||
@@ -318,6 +318,17 @@ static const mbedtls_oid_descriptor_t oid_authority_info_access[] =
|
||||
|
||||
FN_OID_TYPED_FROM_ASN1(mbedtls_oid_descriptor_t, authority_info_access, oid_authority_info_access)
|
||||
FN_OID_GET_ATTR1(mbedtls_oid_get_authority_info_access, mbedtls_oid_descriptor_t, authority_info_access, const char *, description)
|
||||
|
||||
static const mbedtls_oid_descriptor_t oid_ocsp_response_type[] =
|
||||
{
|
||||
{ ADD_LEN( MBEDTLS_OID_OCSP ), "id-pkix-ocsp", "OCSP" },
|
||||
{ ADD_LEN( MBEDTLS_OID_OCSP_BASIC ), "id-pkix-ocsp-basic", "OCSP Basic" },
|
||||
{ NULL, 0, NULL, NULL },
|
||||
};
|
||||
|
||||
FN_OID_TYPED_FROM_ASN1(mbedtls_oid_descriptor_t, ocsp_response_type, oid_ocsp_response_type)
|
||||
FN_OID_GET_ATTR1(mbedtls_oid_get_ocsp_response_type, mbedtls_oid_descriptor_t, ocsp_response_type, const char *, description)
|
||||
|
||||
#endif /* MBEDTLS_X509_USE_C || MBEDTLS_X509_CREATE_C */
|
||||
|
||||
#if defined(MBEDTLS_MD_C)
|
||||
|
||||
Reference in New Issue
Block a user