Botan 2.19.1
Crypto and TLS for C&
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Botan::Cert_Extension::Basic_Constraints Class Referencefinal

#include <x509_ext.h>

Inheritance diagram for Botan::Cert_Extension::Basic_Constraints:
Botan::Certificate_Extension

Public Member Functions

 Basic_Constraints (bool ca=false, size_t limit=0)
 
Basic_Constraintscopy () const override
 
bool get_is_ca () const
 
size_t get_path_limit () 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 ()
 

Protected Member Functions

virtual bool should_encode () const
 

Detailed Description

Basic Constraints Extension

Definition at line 26 of file x509_ext.h.

Constructor & Destructor Documentation

◆ Basic_Constraints()

Botan::Cert_Extension::Basic_Constraints::Basic_Constraints ( bool  ca = false,
size_t  limit = 0 
)
inline

Definition at line 32 of file x509_ext.h.

32 :
33 m_is_ca(ca), m_path_limit(limit) {}

Member Function Documentation

◆ copy()

Basic_Constraints * Botan::Cert_Extension::Basic_Constraints::copy ( ) const
inlineoverridevirtual

Make a copy of this extension

Returns
copy of this

Implements Botan::Certificate_Extension.

Definition at line 29 of file x509_ext.h.

30 { return new Basic_Constraints(m_is_ca, m_path_limit); }
Basic_Constraints(bool ca=false, size_t limit=0)
Definition: x509_ext.h:32

◆ get_is_ca()

bool Botan::Cert_Extension::Basic_Constraints::get_is_ca ( ) const
inline

Definition at line 35 of file x509_ext.h.

35{ return m_is_ca; }

Referenced by Botan::PKCS10_Request::is_CA(), and Botan::PKCS10_Request::path_limit().

◆ get_path_limit()

size_t Botan::Cert_Extension::Basic_Constraints::get_path_limit ( ) const

Definition at line 317 of file x509_ext.cpp.

318 {
319 if(!m_is_ca)
320 throw Invalid_State("Basic_Constraints::get_path_limit: Not a CA");
321 return m_path_limit;
322 }

Referenced by Botan::PKCS10_Request::path_limit().

◆ oid_of()

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

Implements Botan::Certificate_Extension.

Definition at line 39 of file x509_ext.h.

39{ return static_oid(); }

◆ should_encode()

virtual bool Botan::Certificate_Extension::should_encode ( ) const
inlineprotectedvirtualinherited

Definition at line 404 of file pkix_types.h.

404{ return true; }

◆ static_oid()

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

Definition at line 38 of file x509_ext.h.

38{ return OID("2.5.29.19"); }

◆ 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: