Botan 3.13.0
Crypto and TLS for C&
Botan::Cert_Extension::OCSP_NoCheck Class Referencefinal

#include <x509_ext.h>

Inheritance diagram for Botan::Cert_Extension::OCSP_NoCheck:
Botan::Certificate_Extension

Public Member Functions

std::unique_ptr< Certificate_Extensioncopy () const override
 OCSP_NoCheck ()=default
OID oid_of () const override
void validate (const X509_Certificate &subject, const std::optional< X509_Certificate > &issuer, const std::vector< X509_Certificate > &cert_path, std::vector< std::set< Certificate_Status_Code > > &cert_status, size_t pos) const override

Static Public Member Functions

static OID static_oid ()

Detailed Description

OCSP NoCheck Extension

RFC6960 4.2.2.2.1 A CA may specify that an OCSP client can trust a responder for the lifetime of the responder's certificate. The CA does so by including the extension id-pkix-ocsp-nocheck.

In other words: OCSP responder certificates with this extension do not need to be validated against some revocation info.

Definition at line 785 of file x509_ext.h.

Constructor & Destructor Documentation

◆ OCSP_NoCheck()

Botan::Cert_Extension::OCSP_NoCheck::OCSP_NoCheck ( )
default

Member Function Documentation

◆ copy()

std::unique_ptr< Certificate_Extension > Botan::Cert_Extension::OCSP_NoCheck::copy ( ) const
inlineoverridevirtual

Make a copy of this extension

Returns
copy of this

Implements Botan::Certificate_Extension.

Definition at line 789 of file x509_ext.h.

789{ return std::make_unique<OCSP_NoCheck>(); }

◆ oid_of()

OID Botan::Cert_Extension::OCSP_NoCheck::oid_of ( ) const
inlineoverridevirtual

Return object identifier for this extension

Returns
OID representing this extension

Implements Botan::Certificate_Extension.

Definition at line 793 of file x509_ext.h.

793{ return static_oid(); }

References static_oid().

◆ static_oid()

OID Botan::Cert_Extension::OCSP_NoCheck::static_oid ( )
inlinestatic

Definition at line 791 of file x509_ext.h.

791{ return OID({1, 3, 6, 1, 5, 5, 7, 48, 1, 5}); }

Referenced by oid_of().

◆ validate()

void Botan::Cert_Extension::OCSP_NoCheck::validate ( const X509_Certificate & subject,
const std::optional< X509_Certificate > & issuer,
const std::vector< X509_Certificate > & cert_path,
std::vector< std::set< Certificate_Status_Code > > & cert_status,
size_t pos ) const
overridevirtual

Callback visited during path validation.

An extension can implement this callback to inspect the path during path validation.

If an error occurs during validation of this extension, an appropriate status code shall be added to cert_status.

Parameters
subjectSubject certificate that contains this extension
issuerIssuer certificate. nullopt for certificates with no available issuer (e.g. non self-signed trust anchors).
cert_pathCertificate path which is currently validated
cert_statusCertificate validation status codes for subject certificate
posPosition of subject certificate in cert_path

Reimplemented from Botan::Certificate_Extension.

Definition at line 2514 of file x509_ext.cpp.

2518 {
2519 /*
2520 * RFC 6960 is not particularly explicit about when id-pkix-ocsp-nocheck can
2521 * or cannot be included in a certificate, but reasonably we should require
2522 * that id-pkix-ocsp-nocheck is only included for certificates that are marked
2523 * as OCSP responders. This checks for compatible key usage and also the OCSP
2524 * signer extended key usage.
2525 */
2526 if(!subject.allowed_usage(Usage_Type::OCSP_RESPONDER)) {
2527 cert_status.at(pos).insert(Certificate_Status_Code::INVALID_OCSP_NOCHECK);
2528 }
2529}

References Botan::X509_Certificate::allowed_usage(), Botan::INVALID_OCSP_NOCHECK, and Botan::OCSP_RESPONDER.


The documentation for this class was generated from the following files: