Botan 3.6.1
Crypto and TLS for C&
|
#include <certstor_flatfile.h>
Public Member Functions | |
std::vector< X509_DN > | all_subjects () const override |
bool | certificate_known (const X509_Certificate &cert) const |
std::vector< X509_Certificate > | find_all_certs (const X509_DN &subject_dn, const std::vector< uint8_t > &key_id) const override |
virtual std::optional< X509_Certificate > | find_cert (const X509_DN &subject_dn, const std::vector< uint8_t > &key_id) const |
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 |
Flatfile_Certificate_Store (const Flatfile_Certificate_Store &)=default | |
Flatfile_Certificate_Store (Flatfile_Certificate_Store &&)=default | |
Flatfile_Certificate_Store (std::string_view file, bool ignore_non_ca=false) | |
Flatfile_Certificate_Store & | operator= (const Flatfile_Certificate_Store &)=default |
Flatfile_Certificate_Store & | operator= (Flatfile_Certificate_Store &&)=default |
Certificate Store that is backed by a file of PEMs of trusted CAs.
Definition at line 22 of file certstor_flatfile.h.
Botan::Flatfile_Certificate_Store::Flatfile_Certificate_Store | ( | std::string_view | file, |
bool | ignore_non_ca = false ) |
Construct a new Certificate_Store given a file path to a file including PEMs of trusted self-signed CAs.
file | the name of the file to read certificates from |
ignore_non_ca | if true, certs that are not self-signed CA certs will be ignored. Otherwise (if false), an exception will be thrown instead. |
Definition at line 37 of file certstor_flatfile.cpp.
References Botan::X509_Certificate::is_CA_cert(), Botan::X509_Certificate::is_self_signed(), Botan::X509_Certificate::raw_subject_dn_sha256(), Botan::X509_Certificate::subject_dn(), Botan::X509_Certificate::subject_public_key_bitstring_sha1(), and Botan::X509_DN::to_string().
|
default |
|
default |
|
overridevirtual |
Implements Botan::Certificate_Store.
Definition at line 68 of file certstor_flatfile.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 72 of file certstor_flatfile.cpp.
|
virtualinherited |
Find a certificate by Subject DN and (optionally) key identifier
subject_dn | the subject's distinguished name |
key_id | an optional key id |
Reimplemented in Botan::Certificate_Store_In_Memory, Botan::Certificate_Store_In_SQL, Botan::Certificate_Store_MacOS, Botan::Certificate_Store_Windows, and Botan::System_Certificate_Store.
Definition at line 20 of file certstor.cpp.
References Botan::Certificate_Store::find_all_certs().
Referenced by Botan::OCSP::Response::find_signing_certificate().
|
overridevirtual |
Find a certificate by searching for one with a matching SHA-1 hash of public key.
Implements Botan::Certificate_Store.
Definition at line 90 of file certstor_flatfile.cpp.
|
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 105 of file certstor_flatfile.cpp.
|
overridevirtual |
Fetching CRLs is not supported by this certificate store. This will always return an empty list.
Reimplemented from Botan::Certificate_Store.
Definition at line 120 of file certstor_flatfile.cpp.
References BOTAN_UNUSED.
|
default |
|
default |