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

#include <x509_ext.h>

Inheritance diagram for Botan::Cert_Extension::Certificate_Policies:
Botan::Certificate_Extension

Public Member Functions

 Certificate_Policies ()=default
 
 Certificate_Policies (const std::vector< OID > &o)
 
Certificate_Policiescopy () const override
 
std::vector< OIDget_oids () const
 
const std::vector< OID > & get_policy_oids () const
 
OID oid_of () const override
 
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) override
 

Static Public Member Functions

static OID static_oid ()
 

Detailed Description

Certificate Policies Extension

Definition at line 264 of file x509_ext.h.

Constructor & Destructor Documentation

◆ Certificate_Policies() [1/2]

Botan::Cert_Extension::Certificate_Policies::Certificate_Policies ( )
default

◆ Certificate_Policies() [2/2]

Botan::Cert_Extension::Certificate_Policies::Certificate_Policies ( const std::vector< OID > &  o)
inlineexplicit

Definition at line 271 of file x509_ext.h.

271: m_oids(o) {}

Member Function Documentation

◆ copy()

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

Make a copy of this extension

Returns
copy of this

Implements Botan::Certificate_Extension.

Definition at line 267 of file x509_ext.h.

268 { return new Certificate_Policies(m_oids); }

◆ get_oids()

std::vector< OID > Botan::Cert_Extension::Certificate_Policies::get_oids ( ) const
inline

Definition at line 274 of file x509_ext.h.

274{ return m_oids; }

◆ get_policy_oids()

const std::vector< OID > & Botan::Cert_Extension::Certificate_Policies::get_policy_oids ( ) const
inline

Definition at line 276 of file x509_ext.h.

276{ return m_oids; }

◆ oid_of()

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

Implements Botan::Certificate_Extension.

Definition at line 279 of file x509_ext.h.

279{ return static_oid(); }

◆ static_oid()

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

Definition at line 278 of file x509_ext.h.

278{ return OID("2.5.29.32"); }

◆ validate()

void Botan::Cert_Extension::Certificate_Policies::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 
)
overridevirtual

Reimplemented from Botan::Certificate_Extension.

Definition at line 789 of file x509_ext.cpp.

795 {
796 std::set<OID> oid_set(m_oids.begin(), m_oids.end());
797 if(oid_set.size() != m_oids.size())
798 {
799 cert_status.at(pos).insert(Certificate_Status_Code::DUPLICATE_CERT_POLICY);
800 }
801 }

References Botan::DUPLICATE_CERT_POLICY.


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