Debian Codegraph @

debian/rust-vendor/aws-lc-sys/aws-lc/crypto/test/x509_util.h

raw
1 // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 // SPDX-License-Identifier: Apache-2.0 OR ISC
3
4 #ifndef OPENSSL_HEADER_CRYPTO_TEST_X509_UTIL_H
5 #define OPENSSL_HEADER_CRYPTO_TEST_X509_UTIL_H
6
7 #include <functional>
8 #include <vector>
9
10 #include <openssl/x509.h>
11
12 int Verify(
13 X509 *leaf, const std::vector<X509 *> &roots,
14 const std::vector<X509 *> &intermediates,
15 const std::vector<X509_CRL *> &crls, unsigned long flags = 0,
16 std::function<void(X509_STORE_CTX *)> configure_callback = nullptr);
17
18 // CRLsToStack converts a vector of |X509_CRL*| to an OpenSSL
19 // STACK_OF(X509_CRL), bumping the reference counts for each CRL in question.
20 bssl::UniquePtr<STACK_OF(X509_CRL)> CRLsToStack(
21 const std::vector<X509_CRL *> &crls);
22
23 #endif