Botan  2.4.0
Crypto and TLS for C++11
Public Member Functions | Static Public Member Functions | List of all members
Botan::Cert_Extension::CRL_Number Class Referencefinal

#include <x509_ext.h>

Inheritance diagram for Botan::Cert_Extension::CRL_Number:
Botan::Certificate_Extension

Public Member Functions

CRL_Numbercopy () const override
 
 CRL_Number ()
 
 CRL_Number (size_t n)
 
size_t get_crl_number () const
 
OID oid_of () const override
 
virtual void validate (const X509_Certificate &subject, const X509_Certificate &issuer, const std::vector< std::shared_ptr< const X509_Certificate >> &cert_path, std::vector< std::set< Certificate_Status_Code >> &cert_status, size_t pos)
 

Static Public Member Functions

static OID static_oid ()
 

Detailed Description

CRL Number Extension

Definition at line 585 of file x509_ext.h.

Constructor & Destructor Documentation

◆ CRL_Number() [1/2]

Botan::Cert_Extension::CRL_Number::CRL_Number ( )
inline

Definition at line 590 of file x509_ext.h.

590 : m_has_value(false), m_crl_number(0) {}

◆ CRL_Number() [2/2]

Botan::Cert_Extension::CRL_Number::CRL_Number ( size_t  n)
inline

Definition at line 591 of file x509_ext.h.

591 : m_has_value(true), m_crl_number(n) {}

Member Function Documentation

◆ copy()

CRL_Number * Botan::Cert_Extension::CRL_Number::copy ( ) const
overridevirtual

Make a copy of this extension

Returns
copy of this

Implements Botan::Certificate_Extension.

Definition at line 813 of file x509_ext.cpp.

References Botan::Data_Store::add(), Botan::BER_Decoder::decode(), Botan::BER_Decoder::decode_list(), Botan::DER_Encoder::encode(), Botan::ENUMERATED, Botan::DER_Encoder::get_contents_unlocked(), Botan::BER_Decoder::push_back(), Botan::UNIVERSAL, and Botan::BER_Decoder::verify_end().

814  {
815  if(!m_has_value)
816  throw Invalid_State("CRL_Number::copy: Not set");
817  return new CRL_Number(m_crl_number);
818  }

◆ get_crl_number()

size_t Botan::Cert_Extension::CRL_Number::get_crl_number ( ) const

Definition at line 803 of file x509_ext.cpp.

804  {
805  if(!m_has_value)
806  throw Invalid_State("CRL_Number::get_crl_number: Not set");
807  return m_crl_number;
808  }

◆ oid_of()

OID Botan::Cert_Extension::CRL_Number::oid_of ( ) const
inlineoverridevirtual
Returns
OID representing this extension

Implements Botan::Certificate_Extension.

Definition at line 596 of file x509_ext.h.

596 { return static_oid(); }

◆ static_oid()

static OID Botan::Cert_Extension::CRL_Number::static_oid ( )
inlinestatic

Definition at line 595 of file x509_ext.h.

595 { return OID("2.5.29.20"); }

◆ validate()

void Botan::Certificate_Extension::validate ( const X509_Certificate subject,
const X509_Certificate issuer,
const std::vector< std::shared_ptr< const X509_Certificate >> &  cert_path,
std::vector< std::set< Certificate_Status_Code >> &  cert_status,
size_t  pos 
)
virtualinherited

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