Botan 3.13.0
Crypto and TLS for C&
x509path.h
Go to the documentation of this file.
1/*
2* X.509 Cert Path Validation
3* (C) 2010-2011 Jack Lloyd
4*
5* Botan is released under the Simplified BSD License (see license.txt)
6*/
7
8#ifndef BOTAN_X509_CERT_PATH_VALIDATION_H_
9#define BOTAN_X509_CERT_PATH_VALIDATION_H_
10
11#include <botan/certstor.h>
12#include <botan/ocsp.h>
13#include <botan/pkix_enums.h>
14#include <botan/x509cert.h>
15#include <chrono>
16#include <optional>
17#include <set>
18
19#if defined(BOTAN_TARGET_OS_HAS_THREADS) && defined(BOTAN_HAS_HTTP_UTIL)
20 #define BOTAN_HAS_ONLINE_REVOCATION_CHECKS
21#endif
22
23namespace Botan {
24
25/**
26* This type represents the validation status of an entire certificate path.
27* There is one set of status codes for each certificate in the path.
28*/
29typedef std::vector<std::set<Certificate_Status_Code>> CertificatePathStatusCodes;
30
31/**
32* Specifies restrictions on the PKIX path validation
33*/
35 public:
36 /**
37 * @param require_rev if true, revocation information is required
38
39 * @param minimum_key_strength is the minimum strength (in terms of
40 * operations, eg 80 means 2^80) of a signature. Signatures weaker than
41 * this are rejected. If more than 80, SHA-1 signatures are also
42 * rejected. If possible use at least setting 110.
43 *
44 * 80 bit strength requires 1024 bit RSA
45 * 110 bit strength requires 2k bit RSA
46 * 128 bit strength requires ~3k bit RSA or P-256
47 * @param ocsp_all_intermediates Make OCSP requests for all CAs as
48 * well as end entity (if OCSP enabled in path validation request)
49 * @param max_ocsp_age maximum age of OCSP responses w/o next_update.
50 * If zero, there is no maximum age
51 * @param trusted_ocsp_responders optional certificate store containing certificates
52 * of trusted OCSP responders (additionally to the CA's responders)
53 * @param ignore_trusted_root_time_range if true, validity checks on the
54 * time range of the trusted root certificate only produce warnings
55 * @param require_self_signed_trust_anchors if true, only self-signed certificates
56 * are allowed as trust anchors. Trust anchors based on intermediate
57 * and leaf certificates are forbidden in this case.
58 * @param accept_ocsp_softfail if true then soft fail conditions (the OCSP
59 * responder being unavailable or returning an error status, no
60 * responder URL, or the library being built without HTTP support)
61 * will be accepted as satisfying revocation requirements.
62 * Not recommended.
63 */
65 bool require_rev = false,
66 size_t minimum_key_strength = 110,
67 bool ocsp_all_intermediates = false,
68 std::chrono::seconds max_ocsp_age = std::chrono::hours(24 * 7),
69 std::unique_ptr<Certificate_Store> trusted_ocsp_responders = nullptr,
72 bool accept_ocsp_softfail = false);
73
74 /**
75 * @param require_rev if true, revocation information is required
76 * @param minimum_key_strength is the minimum strength (in terms of
77 * operations, eg 80 means 2^80) of a signature. Signatures
78 * weaker than this are rejected.
79 * @param ocsp_all_intermediates Make OCSP requests for all CAs as
80 * well as end entity (if OCSP enabled in path validation request)
81 * @param trusted_hashes a set of trusted hashes. Any signatures
82 * created using a hash other than one of these will be
83 * rejected.
84 * @param max_ocsp_age maximum age of OCSP responses w/o next_update.
85 * If zero, there is no maximum age
86 * @param trusted_ocsp_responders optional certificate store containing certificates
87 * of trusted OCSP responders (additionally to the CA's responders)
88 * @param ignore_trusted_root_time_range if true, validity checks on the
89 * time range of the trusted root certificate only produce warnings
90 * @param require_self_signed_trust_anchors if true, only self-signed certificates
91 * are allowed as trust anchors. Trust anchors based on intermediate
92 * and leaf certificates are forbidden in this case.
93 * @param accept_ocsp_softfail if true then soft fail conditions (the OCSP
94 * responder being unavailable or returning an error status, no
95 * responder URL, or the library being built without HTTP support)
96 * will be accepted as satisfying revocation requirements.
97 * Not recommended.
98 */
102 const std::set<std::string>& trusted_hashes,
103 std::chrono::seconds max_ocsp_age = std::chrono::hours(24 * 7),
104 std::unique_ptr<Certificate_Store> trusted_ocsp_responders = nullptr,
107 bool accept_ocsp_softfail = false) :
108 m_require_revocation_information(require_rev),
109 m_ocsp_all_intermediates(ocsp_all_intermediates),
110 m_trusted_hashes(trusted_hashes),
111 m_minimum_key_strength(minimum_key_strength),
112 m_max_ocsp_age(max_ocsp_age),
113 m_trusted_ocsp_responders(std::move(trusted_ocsp_responders)),
114 m_ignore_trusted_root_time_range(ignore_trusted_root_time_range),
115 m_require_self_signed_trust_anchors(require_self_signed_trust_anchors),
116 m_accept_ocsp_softfail(accept_ocsp_softfail) {}
117
118 /**
119 * @return whether revocation information is required
120 */
121 bool require_revocation_information() const { return m_require_revocation_information; }
122
123 /**
124 * @return whether all intermediate CAs should also be OCSPed. If false
125 * then only end entity OCSP is required/requested.
126 */
127 bool ocsp_all_intermediates() const { return m_ocsp_all_intermediates; }
128
129 /**
130 * @return trusted signature hash functions
131 */
132 const std::set<std::string>& trusted_hashes() const { return m_trusted_hashes; }
133
134 /**
135 * @return minimum required key strength
136 */
137 size_t minimum_key_strength() const { return m_minimum_key_strength; }
138
139 /**
140 * @return maximum age of OCSP responses w/o next_update.
141 * If zero, there is no maximum age
142 */
143 std::chrono::seconds max_ocsp_age() const { return m_max_ocsp_age; }
144
145 /**
146 * Certificates in this store are trusted to sign OCSP responses
147 * additionally to the CA's responder certificates.
148 * @return certificate store containing trusted OCSP responder certs
149 */
150 const Certificate_Store* trusted_ocsp_responders() const { return m_trusted_ocsp_responders.get(); }
151
152 /**
153 * RFC 5280 does not disallow trusted anchors signing certificates with wider validity
154 * ranges than theirs. When checking a certificate chain at a specific
155 * point in time, this can lead to situations where a root certificate is expired, but
156 * the lower-chain certificates are not.
157 *
158 * If this flag is set to true, such chains are considered valid (with warning
159 * TRUSTED_CERT_HAS_EXPIRED). Otherwise, the chain is rejected with the error
160 * code CERT_HAS_EXPIRED. The same holds for not yet valid certificates with the
161 * error code CERT_NOT_YET_VALID (or warning TRUSTED_CERT_NOT_YET_VALID).
162 */
163 bool ignore_trusted_root_time_range() const { return m_ignore_trusted_root_time_range; }
164
165 /**
166 * By default Botan requires trust anchors to be self-signed.
167 * This prevents using intermediate CA certificates and leaf certificates
168 * as trust anchors, even if they are included in the Certificate Store.
169 * This restriction can be removed by setting
170 * require_self_signed_trust_anchors=false in the constructor.
171 */
172 bool require_self_signed_trust_anchors() const { return m_require_self_signed_trust_anchors; }
173
174 /**
175 * By default OCSP soft-fail conditions (such as a network error)
176 * do not count as satisfying revocation requirements.
177 * This restriction can be removed by setting
178 * accept_ocsp_softfail=true in the constructor.
179 */
180 bool accept_ocsp_softfail() const { return m_accept_ocsp_softfail; }
181
182 private:
183 bool m_require_revocation_information;
184 bool m_ocsp_all_intermediates;
185 std::set<std::string> m_trusted_hashes;
186 size_t m_minimum_key_strength;
187 std::chrono::seconds m_max_ocsp_age;
188 std::unique_ptr<Certificate_Store> m_trusted_ocsp_responders;
189 bool m_ignore_trusted_root_time_range;
190 bool m_require_self_signed_trust_anchors;
191 bool m_accept_ocsp_softfail;
192};
193
194/**
195* Represents the result of a PKIX path validation
196*/
198 public:
200
201 /**
202 * @return the trust root of the validation if successful
203 * throws an exception if the validation failed
204 */
205 const X509_Certificate& trust_root() const;
206
207 /**
208 * @return the full path from subject to trust root
209 * This path may be empty
210 */
211 const std::vector<X509_Certificate>& cert_path() const { return m_cert_path; }
212
213 /**
214 * @return true iff the validation was successful
215 */
216 bool successful_validation() const;
217
218 /**
219 * @return true iff no warnings occurred during validation
220 */
221 bool no_warnings() const;
222
223 /**
224 * @return overall validation result code
225 */
226 Certificate_Status_Code result() const { return m_overall; }
227
228 /**
229 * @return a set of status codes for each certificate in the chain
230 */
231 const CertificatePathStatusCodes& all_statuses() const { return m_all_status; }
232
233 /**
234 * @return the subset of status codes that are warnings
235 */
236 CertificatePathStatusCodes warnings() const;
237
238 /**
239 * @return string representation of the validation result
240 */
241 std::string result_string() const;
242
243 /**
244 * @return string representation of the warnings
245 */
246 std::string warnings_string() const;
247
248 /**
249 * @param code validation status code
250 * @return corresponding validation status message
251 */
252 static const char* status_string(Certificate_Status_Code code);
253
254 /**
255 * Create a Path_Validation_Result
256 * @param status list of validation status codes
257 * @param cert_chain the certificate chain that was validated
258 */
259 Path_Validation_Result(CertificatePathStatusCodes status, std::vector<X509_Certificate>&& cert_chain);
260
261 /**
262 * Create a Path_Validation_Result
263 * @param status validation status code
264 */
265 explicit Path_Validation_Result(Certificate_Status_Code status) : m_overall(status) {}
266
267 private:
268 CertificatePathStatusCodes m_all_status;
270 std::vector<X509_Certificate> m_cert_path;
271 Certificate_Status_Code m_overall;
272};
273
274/**
275* PKIX Path Validation
276* @param end_certs certificate chain to validate (with end entity certificate in end_certs[0])
277* @param restrictions path validation restrictions
278* @param trusted_roots list of certificate stores that contain trusted certificates
279* @param hostname if not empty, compared against the DNS name in end_certs[0]
280* @param usage if not set to UNSPECIFIED, compared against the key usage in end_certs[0]
281* @param validation_time what reference time to use for validation
282* @param ocsp_timeout timeout for OCSP operations, 0 disables OCSP check
283* @param ocsp_resp additional OCSP responses to consider (eg from peer)
284* @return result of the path validation
285*/
286Path_Validation_Result BOTAN_PUBLIC_API(2, 0)
287 x509_path_validate(const std::vector<X509_Certificate>& end_certs,
288 const Path_Validation_Restrictions& restrictions,
289 const std::vector<Certificate_Store*>& trusted_roots,
290 std::string_view hostname = "",
292 std::chrono::system_clock::time_point validation_time = std::chrono::system_clock::now(),
293 std::chrono::milliseconds ocsp_timeout = std::chrono::milliseconds(0),
294 const std::vector<std::optional<OCSP::Response>>& ocsp_resp = {});
295
296/**
297* PKIX Path Validation
298* @param end_cert certificate to validate
299* @param restrictions path validation restrictions
300* @param trusted_roots list of stores that contain trusted certificates
301* @param hostname if not empty, compared against the DNS name in end_cert
302* @param usage if not set to UNSPECIFIED, compared against the key usage in end_cert
303* @param validation_time what reference time to use for validation
304* @param ocsp_timeout timeout for OCSP operations, 0 disables OCSP check
305* @param ocsp_resp additional OCSP responses to consider (eg from peer)
306* @return result of the path validation
307*/
309 x509_path_validate(const X509_Certificate& end_cert,
310 const Path_Validation_Restrictions& restrictions,
311 const std::vector<Certificate_Store*>& trusted_roots,
312 std::string_view hostname = "",
314 std::chrono::system_clock::time_point validation_time = std::chrono::system_clock::now(),
315 std::chrono::milliseconds ocsp_timeout = std::chrono::milliseconds(0),
316 const std::vector<std::optional<OCSP::Response>>& ocsp_resp = {});
317
318/**
319* PKIX Path Validation
320* @param end_cert certificate to validate
321* @param restrictions path validation restrictions
322* @param store store that contains trusted certificates
323* @param hostname if not empty, compared against the DNS name in end_cert
324* @param usage if not set to UNSPECIFIED, compared against the key usage in end_cert
325* @param validation_time what reference time to use for validation
326* @param ocsp_timeout timeout for OCSP operations, 0 disables OCSP check
327* @param ocsp_resp additional OCSP responses to consider (eg from peer)
328* @return result of the path validation
329*/
331 x509_path_validate(const X509_Certificate& end_cert,
332 const Path_Validation_Restrictions& restrictions,
333 const Certificate_Store& store,
334 std::string_view hostname = "",
336 std::chrono::system_clock::time_point validation_time = std::chrono::system_clock::now(),
337 std::chrono::milliseconds ocsp_timeout = std::chrono::milliseconds(0),
338 const std::vector<std::optional<OCSP::Response>>& ocsp_resp = {});
339
340/**
341* PKIX Path Validation
342* @param end_certs certificate chain to validate
343* @param restrictions path validation restrictions
344* @param store store that contains trusted certificates
345* @param hostname if not empty, compared against the DNS name in end_certs[0]
346* @param usage if not set to UNSPECIFIED, compared against the key usage in end_certs[0]
347* @param validation_time what reference time to use for validation
348* @param ocsp_timeout timeout for OCSP operations, 0 disables OCSP check
349* @param ocsp_resp additional OCSP responses to consider (eg from peer)
350* @return result of the path validation
351*/
353 x509_path_validate(const std::vector<X509_Certificate>& end_certs,
354 const Path_Validation_Restrictions& restrictions,
355 const Certificate_Store& store,
356 std::string_view hostname = "",
358 std::chrono::system_clock::time_point validation_time = std::chrono::system_clock::now(),
359 std::chrono::milliseconds ocsp_timeout = std::chrono::milliseconds(0),
360 const std::vector<std::optional<OCSP::Response>>& ocsp_resp = {});
361
362/**
363* namespace PKIX holds the building blocks that are called by x509_path_validate.
364* This allows custom validation logic to be written by applications and makes
365* for easier testing, but unless you're positive you know what you're doing you
366* probably want to just call x509_path_validate instead.
367*/
368namespace PKIX {
369
370/**
371* Create all certificate paths by identifying all possible routes from the
372* end-entity certificate to any certificate in the certificate store list. Paths
373* may also end in intermediate or leaf certificates found in the certificate
374* stores.
375*
376* WARNING: The validity (e.g. signatures or constraints) of the output path IS
377* NOT checked.
378*
379* @param cert_paths output parameter to be filled with all discovered certificate paths
380* @param trusted_certstores list of certificate stores that contain trusted certificates
381* @param end_entity the cert to be validated
382* @param end_entity_extra optional list of additional untrusted certs for path building
383* @param max_paths if set, enumerate at most this many paths and return
384* EXCEEDED_SEARCH_LIMITS if more paths exist; if nullopt, unbounded
385* @return result of the path building operation (OK or error)
386*/
388 build_all_certificate_paths(std::vector<std::vector<X509_Certificate>>& cert_paths,
389 const std::vector<Certificate_Store*>& trusted_certstores,
390 const X509_Certificate& end_entity,
391 const std::vector<X509_Certificate>& end_entity_extra,
392 std::optional<size_t> max_paths = std::nullopt);
393
394/**
395* Same as build_all_certificate_paths but only outputs a single path. If there are
396* paths ending in self-signed certificates, these are prioritized over paths ending
397* in intermediate or leaf certificates of the certificate store.
398*
399* WARNING: The validity (e.g. signatures or constraints) of the output path IS
400* NOT checked.
401*
402* @param cert_path_out output parameter, cert_path will be appended to this vector
403* @param trusted_certstores list of certificate stores that contain trusted certificates
404* @param end_entity the cert to be validated
405* @param end_entity_extra optional list of additional untrusted certs for path building
406* @param max_paths if set, examine at most this many candidate paths; if nullopt, unbounded
407* @return result of the path building operation (OK or error)
408*/
409BOTAN_DEPRECATED("Use build_all_certificate_paths")
411 build_certificate_path(std::vector<X509_Certificate>& cert_path_out,
412 const std::vector<Certificate_Store*>& trusted_certstores,
413 const X509_Certificate& end_entity,
414 const std::vector<X509_Certificate>& end_entity_extra,
415 std::optional<size_t> max_paths = std::nullopt);
416
417/**
418* Check the certificate chain, but not any revocation data
419*
420* @param cert_path path built by build_certificate_path with OK result.
421* The first element is the end entity certificate, the last element is
422* the trusted root certificate.
423* @param ref_time whatever time you want to perform the validation
424* against (normally current system clock)
425* @param hostname the hostname
426* @param usage end entity usage checks
427* @param restrictions the relevant path validation restrictions object
428* @return vector of results on per certificate in the path, each containing a set of
429* results. If all codes in the set are < Certificate_Status_Code::FIRST_ERROR_STATUS,
430* then the result for that certificate is successful. If all results are
431*/
432CertificatePathStatusCodes BOTAN_PUBLIC_API(3, 0) check_chain(const std::vector<X509_Certificate>& cert_path,
433 std::chrono::system_clock::time_point ref_time,
434 std::string_view hostname,
435 Usage_Type usage,
436 const Path_Validation_Restrictions& restrictions);
437
438/**
439* Check OCSP responses for revocation information
440* @param cert_path path already validated by check_chain
441* @param ocsp_responses the OCSP responses to consider
442* @param certstores trusted roots
443* @param ref_time whatever time you want to perform the validation against
444* (normally current system clock)
445* @param restrictions the relevant path validation restrictions object
446* @return revocation status
447*/
449 check_ocsp(const std::vector<X509_Certificate>& cert_path,
450 const std::vector<std::optional<OCSP::Response>>& ocsp_responses,
451 const std::vector<Certificate_Store*>& certstores,
452 std::chrono::system_clock::time_point ref_time,
453 const Path_Validation_Restrictions& restrictions);
454
455/**
456* Check CRLs for revocation information
457* @param cert_path path already validated by check_chain
458* @param crls the list of CRLs to check, it is assumed that crls[i] (if not null)
459* is the associated CRL for the subject in cert_path[i].
460* @param ref_time whatever time you want to perform the validation against
461* (normally current system clock)
462* @return revocation status
463*/
464CertificatePathStatusCodes BOTAN_PUBLIC_API(2, 0) check_crl(const std::vector<X509_Certificate>& cert_path,
465 const std::vector<std::optional<X509_CRL>>& crls,
466 std::chrono::system_clock::time_point ref_time);
467
468/**
469* Check CRLs for revocation information
470* @param cert_path path already validated by check_chain
471* @param certstores a list of certificate stores to query for the CRL
472* @param ref_time whatever time you want to perform the validation against
473* (normally current system clock)
474* @return revocation status
475*/
476CertificatePathStatusCodes BOTAN_PUBLIC_API(2, 0) check_crl(const std::vector<X509_Certificate>& cert_path,
477 const std::vector<Certificate_Store*>& certstores,
478 std::chrono::system_clock::time_point ref_time);
479
480#if defined(BOTAN_HAS_ONLINE_REVOCATION_CHECKS)
481
482/**
483* Check OCSP using online (HTTP) access. Current version creates a thread and
484* network connection per OCSP request made.
485*
486* @param cert_path path already validated by check_chain
487* @param trusted_certstores a list of certstores with trusted certs
488* @param ref_time whatever time you want to perform the validation against
489* (normally current system clock)
490* @param timeout for timing out the responses, though actually this function
491* may block for up to timeout*cert_path.size()*C for some small C.
492* @param restrictions the relevant path validation restrictions object
493* @return revocation status
494*/
496 check_ocsp_online(const std::vector<X509_Certificate>& cert_path,
497 const std::vector<Certificate_Store*>& trusted_certstores,
498 std::chrono::system_clock::time_point ref_time,
499 std::chrono::milliseconds timeout,
500 const Path_Validation_Restrictions& restrictions);
501
502/**
503* Check CRL using online (HTTP) access. Current version creates a thread and
504* network connection per CRL access.
505
506* @param cert_path path already validated by check_chain
507* @param trusted_certstores a list of certstores with trusted certs
508* @param certstore_to_recv_crls optional (nullptr to disable), all CRLs
509* retrieved will be saved to this cert store.
510* @param ref_time whatever time you want to perform the validation against
511* (normally current system clock)
512* @param timeout for timing out the responses, though actually this function
513* may block for up to timeout*cert_path.size()*C for some small C.
514* @return revocation status
515*/
517 check_crl_online(const std::vector<X509_Certificate>& cert_path,
518 const std::vector<Certificate_Store*>& trusted_certstores,
519 Certificate_Store_In_Memory* certstore_to_recv_crls,
520 std::chrono::system_clock::time_point ref_time,
521 std::chrono::milliseconds timeout);
522
523#endif
524
525/**
526* Find overall status (OK, error) of a validation
527* @param cert_status result of merge_revocation_status or check_chain
528*/
530
531/**
532* Merge the results from CRL and/or OCSP checks into chain_status
533* @param chain_status the certificate status
534* @param crl_status results from check_crl
535* @param ocsp_status results from check_ocsp
536* @param restrictions the relevant path validation restrictions object
537*/
539 const CertificatePathStatusCodes& crl_status,
540 const CertificatePathStatusCodes& ocsp_status,
541 const Path_Validation_Restrictions& restrictions);
542
543} // namespace PKIX
544
545} // namespace Botan
546
547#endif
#define BOTAN_PUBLIC_API(maj, min)
Definition api.h:21
#define BOTAN_DEPRECATED(msg)
Definition api.h:73
#define BOTAN_FUTURE_EXPLICIT
Definition api.h:52
BOTAN_FUTURE_EXPLICIT Path_Validation_Restrictions(bool require_rev=false, size_t minimum_key_strength=110, bool ocsp_all_intermediates=false, std::chrono::seconds max_ocsp_age=std::chrono::hours(24 *7), std::unique_ptr< Certificate_Store > trusted_ocsp_responders=nullptr, bool ignore_trusted_root_time_range=false, bool require_self_signed_trust_anchors=true, bool accept_ocsp_softfail=false)
bool require_revocation_information() const
Definition x509path.h:121
const std::set< std::string > & trusted_hashes() const
Definition x509path.h:132
std::chrono::seconds max_ocsp_age() const
Definition x509path.h:143
bool ignore_trusted_root_time_range() const
Definition x509path.h:163
bool require_self_signed_trust_anchors() const
Definition x509path.h:172
Path_Validation_Restrictions(bool require_rev, size_t minimum_key_strength, bool ocsp_all_intermediates, const std::set< std::string > &trusted_hashes, std::chrono::seconds max_ocsp_age=std::chrono::hours(24 *7), std::unique_ptr< Certificate_Store > trusted_ocsp_responders=nullptr, bool ignore_trusted_root_time_range=false, bool require_self_signed_trust_anchors=true, bool accept_ocsp_softfail=false)
Definition x509path.h:99
const Certificate_Store * trusted_ocsp_responders() const
Definition x509path.h:150
Certificate_Status_Code result() const
Definition x509path.h:226
Certificate_Status_Code Code
Definition x509path.h:199
Path_Validation_Result(Certificate_Status_Code status)
Definition x509path.h:265
const std::vector< X509_Certificate > & cert_path() const
Definition x509path.h:211
Path_Validation_Result(CertificatePathStatusCodes status, std::vector< X509_Certificate > &&cert_chain)
const X509_Certificate & trust_root() const
const CertificatePathStatusCodes & all_statuses() const
Definition x509path.h:231
void merge_revocation_status(CertificatePathStatusCodes &chain_status, const CertificatePathStatusCodes &crl_status, const CertificatePathStatusCodes &ocsp_status, const Path_Validation_Restrictions &restrictions)
Certificate_Status_Code build_certificate_path(std::vector< X509_Certificate > &cert_path_out, const std::vector< Certificate_Store * > &trusted_certstores, const X509_Certificate &end_entity, const std::vector< X509_Certificate > &end_entity_extra, std::optional< size_t > max_paths=std::nullopt)
Certificate_Status_Code build_all_certificate_paths(std::vector< std::vector< X509_Certificate > > &cert_paths, const std::vector< Certificate_Store * > &trusted_certstores, const X509_Certificate &end_entity, const std::vector< X509_Certificate > &end_entity_extra, std::optional< size_t > max_paths=std::nullopt)
Certificate_Status_Code overall_status(const CertificatePathStatusCodes &cert_status)
CertificatePathStatusCodes check_ocsp(const std::vector< X509_Certificate > &cert_path, const std::vector< std::optional< OCSP::Response > > &ocsp_responses, const std::vector< Certificate_Store * > &certstores, std::chrono::system_clock::time_point ref_time, const Path_Validation_Restrictions &restrictions)
Definition x509path.cpp:711
CertificatePathStatusCodes check_chain(const std::vector< X509_Certificate > &cert_path, std::chrono::system_clock::time_point ref_time, std::string_view hostname, Usage_Type usage, const Path_Validation_Restrictions &restrictions)
Definition x509path.cpp:344
CertificatePathStatusCodes check_crl(const std::vector< X509_Certificate > &cert_path, const std::vector< std::optional< X509_CRL > > &crls, std::chrono::system_clock::time_point ref_time)
Definition x509path.cpp:744
std::vector< std::set< Certificate_Status_Code > > CertificatePathStatusCodes
Definition x509path.h:29
Certificate_Status_Code
Definition pkix_enums.h:21
Path_Validation_Result x509_path_validate(const std::vector< X509_Certificate > &end_certs, const Path_Validation_Restrictions &restrictions, const std::vector< Certificate_Store * > &trusted_roots, std::string_view hostname, Usage_Type usage, std::chrono::system_clock::time_point ref_time, std::chrono::milliseconds ocsp_timeout, const std::vector< std::optional< OCSP::Response > > &ocsp_resp)