|
Botan
2.13.0
Crypto and TLS for C++11
|
#include <certstor.h>
Public Member Functions | |
| void | add_certificate (const X509_Certificate &cert) |
| void | add_certificate (std::shared_ptr< const X509_Certificate > cert) |
| void | add_crl (const X509_CRL &crl) |
| void | add_crl (std::shared_ptr< const X509_CRL > crl) |
| std::vector< X509_DN > | all_subjects () const override |
| bool | certificate_known (const X509_Certificate &cert) const |
| Certificate_Store_In_Memory (const std::string &dir) | |
| Certificate_Store_In_Memory (const X509_Certificate &cert) | |
| Certificate_Store_In_Memory ()=default | |
| std::vector< std::shared_ptr< const X509_Certificate > > | find_all_certs (const X509_DN &subject_dn, const std::vector< uint8_t > &key_id) const override |
| std::shared_ptr< const X509_Certificate > | find_cert (const X509_DN &subject_dn, const std::vector< uint8_t > &key_id) const override |
| std::shared_ptr< const X509_Certificate > | find_cert_by_pubkey_sha1 (const std::vector< uint8_t > &key_hash) const override |
| std::shared_ptr< const X509_Certificate > | find_cert_by_raw_subject_dn_sha256 (const std::vector< uint8_t > &subject_hash) const override |
| std::shared_ptr< const X509_CRL > | find_crl_for (const X509_Certificate &subject) const override |
In Memory Certificate Store
Definition at line 82 of file certstor.h.
|
explicit |
Attempt to parse all files in dir (including subdirectories) as certificates. Ignores errors.
|
explicit |
Adds given certificate to the store.
Definition at line 173 of file certstor.cpp.
References add_certificate().
|
default |
Create an empty store.
| void Botan::Certificate_Store_In_Memory::add_certificate | ( | const X509_Certificate & | cert | ) |
Add a certificate to the store.
| cert | certificate to be added |
Definition at line 21 of file certstor.cpp.
Referenced by Botan::PKIX::build_all_certificate_paths(), Botan::PKIX::build_certificate_path(), and Certificate_Store_In_Memory().
| void Botan::Certificate_Store_In_Memory::add_certificate | ( | std::shared_ptr< const X509_Certificate > | cert | ) |
Add a certificate already in a shared_ptr to the store.
| cert | certificate to be added |
Definition at line 30 of file certstor.cpp.
| void Botan::Certificate_Store_In_Memory::add_crl | ( | const X509_CRL & | crl | ) |
Add a certificate revocation list (CRL) to the store.
| crl | CRL to be added |
Definition at line 126 of file certstor.cpp.
| void Botan::Certificate_Store_In_Memory::add_crl | ( | std::shared_ptr< const X509_CRL > | crl | ) |
Add a certificate revocation list (CRL) to the store as a shared_ptr
| crl | CRL to be added |
Definition at line 132 of file certstor.cpp.
|
overridevirtual |
Implements Botan::Certificate_Store.
Definition at line 39 of file certstor.cpp.
|
inlineinherited |
| cert | certififcate to be searched |
Definition at line 70 of file certstor.h.
References Botan::X509_Certificate::subject_dn(), and Botan::X509_Certificate::subject_key_id().
|
overridevirtual |
Find all certificates with a given Subject DN. Subject DN and even the key identifier might not be unique.
Implements Botan::Certificate_Store.
Definition at line 69 of file certstor.cpp.
References Botan::PEM_Code::matches().
Referenced by Botan::PKIX::build_all_certificate_paths().
|
overridevirtual |
Find a certificate by Subject DN and (optionally) key identifier
| subject_dn | the subject's distinguished name |
| key_id | an optional key id |
Implements Botan::Certificate_Store.
Definition at line 48 of file certstor.cpp.
Referenced by Botan::PKIX::build_certificate_path().
|
overridevirtual |
Find a certificate by searching for one with a matching SHA-1 hash of public key. Used for OCSP.
| key_hash | SHA-1 hash of the subject's public key |
Implements Botan::Certificate_Store.
Definition at line 93 of file certstor.cpp.
References Botan::HashFunction::create(), and hash.
|
overridevirtual |
Find a certificate by searching for one with a matching SHA-256 hash of raw subject name. Used for OCSP.
| subject_hash | SHA-256 hash of the subject's raw name |
Implements Botan::Certificate_Store.
Definition at line 110 of file certstor.cpp.
References Botan::HashFunction::create(), and hash.
|
overridevirtual |
Finds a CRL for the given certificate
Reimplemented from Botan::Certificate_Store.
Definition at line 151 of file certstor.cpp.
References Botan::X509_Certificate::authority_key_id(), and Botan::X509_Certificate::issuer_dn().
1.8.9.1