Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Botan::Certificate_Store Class Referenceabstract

`#include <certstor.h>`

Inheritance diagram for Botan::Certificate_Store:

## Public Member Functions
virtual std::vector< X509_DN > | all_subjects () const =0
bool | certificate_known (const X509_Certificate &cert) const
virtual std::shared_ptr< const X509_Certificate > | find_cert (const X509_DN &subject_dn, const std::vector< uint8_t > &key_id) const =0
virtual std::shared_ptr< const X509_Certificate > | find_cert_by_pubkey_sha1 (const std::vector< uint8_t > &key_hash) const =0
virtual std::shared_ptr< const X509_Certificate > | find_cert_by_raw_subject_dn_sha256 (const std::vector< uint8_t > &subject_hash) const =0
virtual std::shared_ptr< const X509_CRL > | find_crl_for (const X509_Certificate &subject) const
virtual | ~Certificate_Store ()=default

## Detailed Description

Certificate Store Interface

Definition at line 19 of file certstor.h.

## Constructor & Destructor Documentation

virtual Botan::Certificate_Store::~Certificate_Store | ( |  | ) |
| virtual default

## Member Function Documentation

virtual std::vector<X509_DN> Botan::Certificate_Store::all_subjects | ( |  | ) | const
| pure virtual

Implemented in Botan::Certificate_Store_In_Memory, and Botan::Certificate_Store_In_SQL.

bool Botan::Certificate_Store::certificate_known | ( | const X509_Certificate & | cert | ) | const
| inline

Returns
  whether the certificate is known

Parameters

  cert | certififcate to be searched

Definition at line 62 of file certstor.h.

References Botan::X509_Certificate::subject_dn(), and Botan::X509_Certificate::subject_key_id().

63 {
64 return find_cert(cert.subject_dn(), cert.subject_key_id()) != nullptr;
65 }
Botan::Certificate_Store::find_cert
virtual std::shared_ptr< const X509_Certificate > find_cert(const X509_DN &subject_dn, const std::vector< uint8_t > &key_id) const =0

virtual std::shared_ptr<const X509_Certificate> Botan::Certificate_Store::find_cert | ( | const X509_DN & | subject_dn,
|  | const std::vector< uint8_t > & | key_id
| ) |  | const
| pure virtual

Find a certificate by Subject DN and (optionally) key identifier

Parameters

  subject_dn | the subject's distinguished name
  key_id | an optional key id

Returns
  a matching certificate or nullptr otherwise

Implemented in Botan::Certificate_Store_In_Memory, and Botan::Certificate_Store_In_SQL.

virtual std::shared_ptr<const X509_Certificate> Botan::Certificate_Store::find_cert_by_pubkey_sha1 | ( | const std::vector< uint8_t > & | key_hash | ) | const
| pure virtual

Find a certificate by searching for one with a matching SHA-1 hash of public key. Used for OCSP.

Parameters

  key_hash | SHA-1 hash of the subject's public key

Returns
  a matching certificate or nullptr otherwise

Implemented in Botan::Certificate_Store_In_Memory, and Botan::Certificate_Store_In_SQL.

virtual std::shared_ptr<const X509_Certificate> Botan::Certificate_Store::find_cert_by_raw_subject_dn_sha256 | ( | const std::vector< uint8_t > & | subject_hash | ) | const
| pure virtual

Find a certificate by searching for one with a matching SHA-256 hash of raw subject name. Used for OCSP.

Parameters

  subject_hash | SHA-256 hash of the subject's raw name

Returns
  a matching certificate or nullptr otherwise

Implemented in Botan::Certificate_Store_In_Memory, and Botan::Certificate_Store_In_SQL.

std::shared_ptr< const X509_CRL > Botan::Certificate_Store::find_crl_for | ( | const X509_Certificate & | subject | ) | const
| virtual

Finds a CRL for the given certificate

Parameters

  subject | the subject certificate

Returns
  the CRL for subject or nullptr otherwise

Reimplemented in Botan::Certificate_Store_In_Memory, and Botan::Certificate_Store_In_SQL.

Definition at line 14 of file certstor.cpp.

15 {
16 return {};
17 }

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

- src/lib/x509/certstor.h
- src/lib/x509/certstor.cpp