Botan  2.7.0
Crypto and TLS for C++11
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 525 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 532 of file x509_ext.h.

532 : 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 528 of file x509_ext.h.

529  { return new Certificate_Policies(m_oids); }

◆ get_oids()

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

Definition at line 535 of file x509_ext.h.

535 { return m_oids; }

◆ get_policy_oids()

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

Definition at line 537 of file x509_ext.h.

537 { 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 540 of file x509_ext.h.

540 { return static_oid(); }

◆ static_oid()

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

Definition at line 539 of file x509_ext.h.

539 { 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 766 of file x509_ext.cpp.

References Botan::DUPLICATE_CERT_POLICY.

772  {
773  std::set<OID> oid_set(m_oids.begin(), m_oids.end());
774  if(oid_set.size() != m_oids.size())
775  {
776  cert_status.at(pos).insert(Certificate_Status_Code::DUPLICATE_CERT_POLICY);
777  }
778  }

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