8 #ifndef BOTAN_X509_CERT_STORE_H__
9 #define BOTAN_X509_CERT_STORE_H__
11 #include <botan/x509cert.h>
12 #include <botan/x509_crl.h>
13 #include <botan/certstor.h>
56 EMAIL_PROTECTION = 0x08,
74 u32bit cache_results = 30*60);
81 class BOTAN_DLL CRL_Data
85 MemoryVector<byte> serial, auth_key_id;
91 class BOTAN_DLL Cert_Info
94 bool is_verified(
u32bit timeout)
const;
95 bool is_trusted()
const;
98 Cert_Info(
const X509_Certificate&,
bool =
false);
100 X509_Certificate cert;
103 mutable bool checked;
105 mutable u64bit last_checked;
108 static X509_Code check_sig(
const X509_Object&, Public_Key*);
110 size_t find_cert(
const X509_DN&,
const MemoryRegion<byte>&)
const;
111 X509_Code check_sig(
const Cert_Info&,
const Cert_Info&)
const;
112 void recompute_revoked_info()
const;
114 void do_add_certs(DataSource&,
bool);
115 X509_Code construct_cert_chain(
const X509_Certificate&,
116 std::vector<size_t>&,
bool =
false);
118 size_t find_parent_of(
const X509_Certificate&);
119 bool is_revoked(
const X509_Certificate&)
const;
121 static const size_t NO_CERT_FOUND = 0xFFFFFFFF;
122 std::vector<Cert_Info> certs;
123 std::vector<CRL_Data> revoked;
124 std::vector<Certificate_Store*> stores;
125 u32bit time_slack, validation_cache_timeout;
126 mutable bool revoked_info_valid;
bool operator!=(const OctetString &s1, const OctetString &s2)
bool operator==(const OctetString &s1, const OctetString &s2)
std::string PEM_encode(const Private_Key &key)
unsigned long long u64bit
bool BOTAN_DLL operator<(const X509_Time &, const X509_Time &)