Botan 3.6.1
Crypto and TLS for C&
Botan::Cert_Extension::Unknown_Extension Class Referencefinal

#include <x509_ext.h>

Inheritance diagram for Botan::Cert_Extension::Unknown_Extension:
Botan::Certificate_Extension

Public Member Functions

std::unique_ptr< Certificate_Extensioncopy () const override
 
const std::vector< uint8_t > & extension_contents () const
 
bool is_critical_extension () const
 
OID oid_of () const override
 
 Unknown_Extension (const OID &oid, bool critical)
 
void validate (const X509_Certificate &, const X509_Certificate &, const std::vector< X509_Certificate > &, std::vector< std::set< Certificate_Status_Code > > &cert_status, size_t pos) override
 

Detailed Description

An unknown X.509 extension Will add a failure to the path validation result, if critical

Definition at line 575 of file x509_ext.h.

Constructor & Destructor Documentation

◆ Unknown_Extension()

Botan::Cert_Extension::Unknown_Extension::Unknown_Extension ( const OID & oid,
bool critical )
inline

Definition at line 577 of file x509_ext.h.

577: m_oid(oid), m_critical(critical) {}

Member Function Documentation

◆ copy()

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

Make a copy of this extension

Returns
copy of this

Implements Botan::Certificate_Extension.

Definition at line 579 of file x509_ext.h.

579 {
580 return std::make_unique<Unknown_Extension>(m_oid, m_critical);
581 }

◆ extension_contents()

const std::vector< uint8_t > & Botan::Cert_Extension::Unknown_Extension::extension_contents ( ) const
inline

Return the extension contents

Definition at line 593 of file x509_ext.h.

593{ return m_bytes; }

◆ is_critical_extension()

bool Botan::Cert_Extension::Unknown_Extension::is_critical_extension ( ) const
inline

Return if this extension was marked critical

Definition at line 598 of file x509_ext.h.

598{ return m_critical; }

◆ oid_of()

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

Return the OID of this unknown extension

Implements Botan::Certificate_Extension.

Definition at line 586 of file x509_ext.h.

586{ return m_oid; }

◆ validate()

void Botan::Cert_Extension::Unknown_Extension::validate ( const X509_Certificate & ,
const X509_Certificate & ,
const std::vector< X509_Certificate > & ,
std::vector< std::set< Certificate_Status_Code > > & cert_status,
size_t pos )
inlineoverridevirtual

Reimplemented from Botan::Certificate_Extension.

Definition at line 600 of file x509_ext.h.

604 {
605 if(m_critical) {
606 cert_status.at(pos).insert(Certificate_Status_Code::UNKNOWN_CRITICAL_EXTENSION);
607 }
608 }

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