summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2021-10-31 15:55:45 +0000
committertb <>2021-10-31 15:55:45 +0000
commit7e5274a3b813cdd58de14a2b9b45421cc45a94c9 (patch)
tree829401844325050eeb577e354200bda12846dac3 /src/lib
parent37ad91f93072b92870424d2df62fdc1acf386e5b (diff)
downloadopenbsd-7e5274a3b813cdd58de14a2b9b45421cc45a94c9.tar.gz
openbsd-7e5274a3b813cdd58de14a2b9b45421cc45a94c9.tar.bz2
openbsd-7e5274a3b813cdd58de14a2b9b45421cc45a94c9.zip
Prepare definitions X509_STORE_set_verify{,_cb}_func() that work with
opaque structs. ok beck inoguchi jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/x509/x509_vfy.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509/x509_vfy.h b/src/lib/libcrypto/x509/x509_vfy.h
index 2981f94788..097e1f69f4 100644
--- a/src/lib/libcrypto/x509/x509_vfy.h
+++ b/src/lib/libcrypto/x509/x509_vfy.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_vfy.h,v 1.38 2021/10/31 15:54:08 tb Exp $ */ 1/* $OpenBSD: x509_vfy.h,v 1.39 2021/10/31 15:55:45 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -209,8 +209,9 @@ struct x509_store_st {
209 209
210int X509_STORE_set_depth(X509_STORE *store, int depth); 210int X509_STORE_set_depth(X509_STORE *store, int depth);
211 211
212#define X509_STORE_set_verify_cb_func(ctx,func) ((ctx)->verify_cb=(func)) 212#if !defined(LIBRESSL_NEW_API)
213#define X509_STORE_set_verify_func(ctx,func) ((ctx)->verify=(func)) 213#define X509_STORE_set_verify_func(ctx,func) ((ctx)->verify=(func))
214#endif
214 215
215#if defined(LIBRESSL_INTERNAL) || !defined(LIBRESSL_OPAQUE_X509) 216#if defined(LIBRESSL_INTERNAL) || !defined(LIBRESSL_OPAQUE_X509)
216/* This is the functions plus an instance of the local variables. */ 217/* This is the functions plus an instance of the local variables. */
@@ -466,7 +467,9 @@ int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm);
466X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *ctx); 467X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *ctx);
467 468
468void X509_STORE_set_verify_cb(X509_STORE *ctx, 469void X509_STORE_set_verify_cb(X509_STORE *ctx,
469 int (*verify_cb)(int, X509_STORE_CTX *)); 470 int (*verify_cb)(int, X509_STORE_CTX *));
471#define X509_STORE_set_verify_cb_func(ctx, func) \
472 X509_STORE_set_verify_cb((ctx), (func))
470 473
471X509_STORE_CTX *X509_STORE_CTX_new(void); 474X509_STORE_CTX *X509_STORE_CTX_new(void);
472 475
@@ -556,6 +559,8 @@ void X509_STORE_CTX_set0_verified_chain(X509_STORE_CTX *ctx, STACK_OF(X509) *sk)
556int (*X509_STORE_CTX_get_verify(X509_STORE_CTX *ctx))(X509_STORE_CTX *); 559int (*X509_STORE_CTX_get_verify(X509_STORE_CTX *ctx))(X509_STORE_CTX *);
557void X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx, 560void X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx,
558 int (*verify)(X509_STORE_CTX *)); 561 int (*verify)(X509_STORE_CTX *));
562#define X509_STORE_set_verify_func(ctx, func) \
563 X509_STORE_set_verify((ctx), (func))
559int (*X509_STORE_CTX_get_verify_cb(X509_STORE_CTX *ctx))(int, X509_STORE_CTX *); 564int (*X509_STORE_CTX_get_verify_cb(X509_STORE_CTX *ctx))(int, X509_STORE_CTX *);
560#endif 565#endif
561void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, 566void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,