|
Botan 3.13.0
Crypto and TLS for C&
|
#include <x509_ext.h>
Public Member Functions | |
| std::unique_ptr< Certificate_Extension > | copy () const override |
| const std::vector< uint8_t > & | get_key_id () const |
| OID | oid_of () const override |
| Subject_Key_ID ()=default | |
| Subject_Key_ID (const Public_Key &pub_key) | |
| Subject_Key_ID (const std::vector< uint8_t > &k) | |
| Subject_Key_ID (const std::vector< uint8_t > &public_key, std::string_view hash_fn) | |
| virtual void | validate (const X509_Certificate &subject, const std::optional< X509_Certificate > &issuer, const std::vector< X509_Certificate > &cert_path, std::vector< std::set< Certificate_Status_Code > > &cert_status, size_t pos) const |
Static Public Member Functions | |
| static OID | static_oid () |
Subject Key Identifier Extension
Definition at line 108 of file x509_ext.h.
|
default |
|
inlineexplicit |
Definition at line 112 of file x509_ext.h.
|
explicit |
Derive the key identifier from the public key, using the first method given in RFC 5280 4.2.1.2:
(1) The keyIdentifier is composed of the 160-bit SHA-1 hash of the value of the BIT STRING subjectPublicKey (excluding the tag, length, and number of unused bits).
Definition at line 570 of file x509_ext.cpp.
References Botan::HashFunction::create_or_throw(), and Botan::Public_Key::public_key_bits().
| Botan::Cert_Extension::Subject_Key_ID::Subject_Key_ID | ( | const std::vector< uint8_t > & | public_key, |
| std::string_view | hash_fn ) |
Definition at line 588 of file x509_ext.cpp.
References Botan::HashFunction::create_or_throw().
|
inlineoverridevirtual |
Make a copy of this extension
Implements Botan::Certificate_Extension.
Definition at line 127 of file x509_ext.h.
References copy().
Referenced by copy().
|
inline |
Definition at line 131 of file x509_ext.h.
|
inlineoverridevirtual |
Return object identifier for this extension
Implements Botan::Certificate_Extension.
Definition at line 135 of file x509_ext.h.
References static_oid().
|
inlinestatic |
Definition at line 133 of file x509_ext.h.
Referenced by oid_of().
|
virtualinherited |
Callback visited during path validation.
An extension can implement this callback to inspect the path during path validation.
If an error occurs during validation of this extension, an appropriate status code shall be added to cert_status.
| subject | Subject certificate that contains this extension |
| issuer | Issuer certificate. nullopt for certificates with no available issuer (e.g. non self-signed trust anchors). |
| cert_path | Certificate path which is currently validated |
| cert_status | Certificate validation status codes for subject certificate |
| pos | Position of subject certificate in cert_path |
Reimplemented in Botan::Cert_Extension::ASBlocks, Botan::Cert_Extension::Certificate_Policies, Botan::Cert_Extension::IPAddressBlocks, Botan::Cert_Extension::Name_Constraints, Botan::Cert_Extension::NoRevocationAvailable, Botan::Cert_Extension::OCSP_NoCheck, and Botan::Cert_Extension::Unknown_Extension.
Definition at line 181 of file x509_ext.cpp.
Referenced by is_appropriate_context().