Botan  2.4.0
Crypto and TLS for C++11
Public Member Functions | List of all members
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

Unknown_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< std::shared_ptr< const 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 724 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 727 of file x509_ext.h.

727  :
728  m_oid(oid), m_critical(critical) {}

Member Function Documentation

◆ copy()

Unknown_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 730 of file x509_ext.h.

731  { return new Unknown_Extension(m_oid, m_critical); }
Unknown_Extension(const OID &oid, bool critical)
Definition: x509_ext.h:727

◆ extension_contents()

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

Return the extension contents

Definition at line 744 of file x509_ext.h.

744 { 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 749 of file x509_ext.h.

749 { 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 736 of file x509_ext.h.

737  { return m_oid; }

◆ validate()

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

Reimplemented from Botan::Certificate_Extension.

Definition at line 751 of file x509_ext.h.

References Botan::UNKNOWN_CRITICAL_EXTENSION.

755  {
756  if(m_critical)
757  {
758  cert_status.at(pos).insert(Certificate_Status_Code::UNKNOWN_CRITICAL_EXTENSION);
759  }
760  }

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