Botan  2.19.1
Crypto and TLS for C++11
certstor_windows.h
Go to the documentation of this file.
1 /*
2 * Certificate Store
3 * (C) 1999-2019 Jack Lloyd
4 * (C) 2019 Patrick Schmidt
5 *
6 * Botan is released under the Simplified BSD License (see license.txt)
7 */
8 
9 #ifndef BOTAN_CERT_STORE_SYSTEM_WINDOWS_H_
10 #define BOTAN_CERT_STORE_SYSTEM_WINDOWS_H_
11 
12 #include <botan/certstor.h>
13 
14 namespace Botan {
15 /**
16 * Certificate Store that is backed by the system trust store on Windows.
17 */
19  {
20  public:
22 
25  Certificate_Store_Windows& operator=(const Certificate_Store_Windows&) = default;
27 
28  /**
29  * @return DNs for all certificates managed by the store
30  */
31  std::vector<X509_DN> all_subjects() const override;
32 
33  /**
34  * Find a certificate by Subject DN and (optionally) key identifier
35  * @return the first certificate that matches
36  */
37  std::shared_ptr<const X509_Certificate> find_cert(
38  const X509_DN& subject_dn,
39  const std::vector<uint8_t>& key_id) const override;
40 
41  /**
42  * Find all certificates with a given Subject DN.
43  * Subject DN and even the key identifier might not be unique.
44  */
45  std::vector<std::shared_ptr<const X509_Certificate>> find_all_certs(
46  const X509_DN& subject_dn, const std::vector<uint8_t>& key_id) const override;
47 
48  /**
49  * Find a certificate by searching for one with a matching SHA-1 hash of
50  * public key.
51  * @return a matching certificate or nullptr otherwise
52  */
53  std::shared_ptr<const X509_Certificate>
54  find_cert_by_pubkey_sha1(const std::vector<uint8_t>& key_hash) const override;
55 
56  /**
57  * @throws Botan::Not_Implemented
58  */
59  std::shared_ptr<const X509_Certificate>
60  find_cert_by_raw_subject_dn_sha256(const std::vector<uint8_t>& subject_hash) const override;
61 
62  /**
63  * Not Yet Implemented
64  * @return nullptr;
65  */
66  std::shared_ptr<const X509_CRL> find_crl_for(const X509_Certificate& subject) const override;
67  };
68 }
69 
70 #endif
int(* final)(unsigned char *, CTX *)
#define BOTAN_PUBLIC_API(maj, min)
Definition: compiler.h:31
Definition: alg_id.cpp:13