|
Botan 3.12.0
Crypto and TLS for C&
|
#include <certstor.h>
Public Member Functions | |
| void | add_certificate (const X509_Certificate &cert) |
| void | add_crl (const X509_CRL &crl) |
| std::vector< X509_DN > | all_subjects () const override |
| bool | certificate_known (const X509_Certificate &cert) const |
| Certificate_Store_In_Memory () | |
| Certificate_Store_In_Memory (Certificate_Store_In_Memory &&other) noexcept | |
| Certificate_Store_In_Memory (const Certificate_Store_In_Memory &other) | |
| Certificate_Store_In_Memory (const X509_Certificate &cert) | |
| Certificate_Store_In_Memory (const X509_Certificate &cert, const X509_CRL &crl) | |
| bool | contains (const X509_Certificate &cert) const override |
| std::vector< X509_Certificate > | find_all_certs (const X509_DN &subject_dn, const std::vector< uint8_t > &key_id) const override |
| std::optional< X509_Certificate > | find_cert (const X509_DN &subject_dn, const std::vector< uint8_t > &key_id) const override |
| std::optional< X509_Certificate > | find_cert_by_issuer_dn_and_serial_number (const X509_DN &issuer_dn, std::span< const uint8_t > serial_number) const override |
| std::optional< X509_Certificate > | find_cert_by_pubkey_sha1 (const std::vector< uint8_t > &key_hash) const override |
| std::optional< X509_Certificate > | find_cert_by_raw_subject_dn_sha256 (const std::vector< uint8_t > &subject_hash) const override |
| std::optional< X509_CRL > | find_crl_for (const X509_Certificate &subject) const override |
| Certificate_Store_In_Memory & | operator= (Certificate_Store_In_Memory &&other) noexcept |
| Certificate_Store_In_Memory & | operator= (const Certificate_Store_In_Memory &other)=delete |
| ~Certificate_Store_In_Memory () override | |
In Memory Certificate Store
Definition at line 99 of file certstor.h.
|
explicit |
Adds given certificate to the store.
Definition at line 246 of file certstor.cpp.
References add_certificate(), and Certificate_Store_In_Memory().
Referenced by Certificate_Store_In_Memory(), Certificate_Store_In_Memory(), Certificate_Store_In_Memory(), Certificate_Store_In_Memory(), operator=(), and operator=().
| Botan::Certificate_Store_In_Memory::Certificate_Store_In_Memory | ( | const X509_Certificate & | cert, |
| const X509_CRL & | crl ) |
Adds given certificate and CRL to the store.
Definition at line 250 of file certstor.cpp.
References add_certificate(), add_crl(), and Certificate_Store_In_Memory().
| Botan::Certificate_Store_In_Memory::Certificate_Store_In_Memory | ( | ) |
Create an empty store.
Definition at line 63 of file certstor.cpp.
| Botan::Certificate_Store_In_Memory::Certificate_Store_In_Memory | ( | const Certificate_Store_In_Memory & | other | ) |
Definition at line 65 of file certstor.cpp.
References Certificate_Store_In_Memory().
|
defaultnoexcept |
References Certificate_Store_In_Memory().
|
overridedefault |
| 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 85 of file certstor.cpp.
References Botan::X509_Certificate::subject_dn(), and Botan::X509_Certificate::tag().
Referenced by Certificate_Store_In_Memory(), Certificate_Store_In_Memory(), and ~Certificate_Store_In_Memory().
| 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 199 of file certstor.cpp.
References Botan::X509_CRL::issuer_dn(), and Botan::X509_CRL::this_update().
Referenced by Certificate_Store_In_Memory(), and ~Certificate_Store_In_Memory().
|
overridevirtual |
Implements Botan::Certificate_Store.
Definition at line 96 of file certstor.cpp.
Referenced by ~Certificate_Store_In_Memory().
|
inherited |
Old version of contains
Definition at line 24 of file certstor.cpp.
References contains().
Referenced by find_cert_by_issuer_dn_and_serial_number().
|
overridevirtual |
| cert | certificate to be searched |
Default implementation uses find_all_certs
Reimplemented from Botan::Certificate_Store.
Definition at line 242 of file certstor.cpp.
References Botan::X509_Certificate::tag().
Referenced by ~Certificate_Store_In_Memory().
|
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 131 of file certstor.cpp.
References BOTAN_ASSERT_NOMSG.
Referenced by ~Certificate_Store_In_Memory().
|
overridevirtual |
Find a certificate by Subject DN and (optionally) key identifier
| subject_dn | the subject's distinguished name |
| key_id | an optional key id |
Reimplemented from Botan::Certificate_Store.
Definition at line 106 of file certstor.cpp.
References BOTAN_ASSERT_NOMSG.
Referenced by ~Certificate_Store_In_Memory().
|
overridevirtual |
Find a certificate by searching for one with a matching issuer DN and serial number. Used for CMS or PKCS#7.
| issuer_dn | the distinguished name of the issuer |
| serial_number | the certificate's serial number |
Implements Botan::Certificate_Store.
Definition at line 188 of file certstor.cpp.
Referenced by ~Certificate_Store_In_Memory().
|
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 158 of file certstor.cpp.
Referenced by ~Certificate_Store_In_Memory().
|
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 173 of file certstor.cpp.
Referenced by ~Certificate_Store_In_Memory().
|
overridevirtual |
Finds a CRL for the given certificate
Reimplemented from Botan::Certificate_Store.
Definition at line 219 of file certstor.cpp.
References Botan::X509_Certificate::authority_key_id(), and Botan::X509_Certificate::issuer_dn().
Referenced by ~Certificate_Store_In_Memory().
|
defaultnoexcept |
References Certificate_Store_In_Memory().
|
delete |
References Certificate_Store_In_Memory().