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

#include <x509_ext.h>

Inheritance diagram for Botan::Cert_Extension::Subject_Key_ID:
Botan::Certificate_Extension

Public Member Functions

Subject_Key_IDcopy () const override
 
std::vector< uint8_t > get_key_id () const
 
virtual OID oid_of () const
 
 Subject_Key_ID ()=default
 
 Subject_Key_ID (const std::vector< uint8_t > &)
 
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)
 

Detailed Description

Subject Key Identifier Extension

Definition at line 233 of file x509_ext.h.

Constructor & Destructor Documentation

Botan::Cert_Extension::Subject_Key_ID::Subject_Key_ID ( )
default
Botan::Cert_Extension::Subject_Key_ID::Subject_Key_ID ( const std::vector< uint8_t > &  pub_key)
explicit

Definition at line 403 of file x509_ext.cpp.

403  : m_key_id(unlock(SHA_160().process(pub_key)))
404  {}
std::vector< T > unlock(const secure_vector< T > &in)
Definition: secmem.h:125

Member Function Documentation

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

Make a copy of this extension

Returns
copy of this

Implements Botan::Certificate_Extension.

Definition at line 236 of file x509_ext.h.

237  { return new Subject_Key_ID(m_key_id); }
std::vector<uint8_t> Botan::Cert_Extension::Subject_Key_ID::get_key_id ( ) const
inline

Definition at line 242 of file x509_ext.h.

242 { return m_key_id; }
OID Botan::Certificate_Extension::oid_of ( ) const
virtualinherited
Returns
OID representing this extension

Reimplemented in Botan::Cert_Extension::Unknown_Critical_Extension.

Definition at line 76 of file x509_ext.cpp.

References Botan::OIDS::lookup(), and Botan::Certificate_Extension::oid_name().

Referenced by Botan::Extensions::add(), Botan::Extensions::encode_into(), and Botan::Extensions::replace().

77  {
78  return OIDS::lookup(oid_name());
79  }
virtual std::string oid_name() const =0
std::string lookup(const OID &oid)
Definition: oids.cpp:18
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

Reimplemented in Botan::Cert_Extension::Unknown_Critical_Extension, and Botan::Cert_Extension::Name_Constraints.

Definition at line 84 of file x509_ext.cpp.

88  {
89  }

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