Botan  2.10.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 738 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 741 of file x509_ext.h.

741  :
742  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 744 of file x509_ext.h.

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

◆ extension_contents()

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

Return the extension contents

Definition at line 758 of file x509_ext.h.

758 { 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 763 of file x509_ext.h.

763 { 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 750 of file x509_ext.h.

751  { 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 765 of file x509_ext.h.

References Botan::UNKNOWN_CRITICAL_EXTENSION.

769  {
770  if(m_critical)
771  {
772  cert_status.at(pos).insert(Certificate_Status_Code::UNKNOWN_CRITICAL_EXTENSION);
773  }
774  }

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