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