summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_verify.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/x509/x509_verify.h')
-rw-r--r--src/lib/libcrypto/x509/x509_verify.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/lib/libcrypto/x509/x509_verify.h b/src/lib/libcrypto/x509/x509_verify.h
new file mode 100644
index 0000000000..a097404f2e
--- /dev/null
+++ b/src/lib/libcrypto/x509/x509_verify.h
@@ -0,0 +1,42 @@
1/* $OpenBSD: x509_verify.h,v 1.1 2020/09/13 15:06:17 beck Exp $ */
2/*
3 * Copyright (c) 2020 Bob Beck <beck@openbsd.org>
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17#ifndef HEADER_X509_VERIFY_H
18#define HEADER_X509_VERIFY_H
19
20#ifdef LIBRESSL_INTERNAL
21struct x509_verify_ctx;
22typedef struct x509_verify_ctx X509_VERIFY_CTX;
23
24X509_VERIFY_CTX *x509_verify_ctx_new(STACK_OF(X509) *roots);
25void x509_verify_ctx_free(struct x509_verify_ctx *ctx);
26
27int x509_verify_ctx_set_max_depth(X509_VERIFY_CTX *ctx, size_t max);
28int x509_verify_ctx_set_max_chains(X509_VERIFY_CTX *ctx, size_t max);
29int x509_verify_ctx_set_max_signatures(X509_VERIFY_CTX *ctx, size_t max);
30int x509_verify_ctx_set_purpose(X509_VERIFY_CTX *ctx, int purpose_id);
31int x509_verify_ctx_set_intermediates(X509_VERIFY_CTX *ctx,
32 STACK_OF(X509) *intermediates);
33
34const char *x509_verify_ctx_error_string(X509_VERIFY_CTX *ctx);
35size_t x509_verify_ctx_error_depth(X509_VERIFY_CTX *ctx);
36
37STACK_OF(X509) *x509_verify_ctx_chain(X509_VERIFY_CTX *ctx, size_t chain);
38
39size_t x509_verify(X509_VERIFY_CTX *ctx, X509 *leaf, char *name);
40#endif
41
42#endif