diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2021-10-31 15:55:46 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2021-10-31 15:55:46 +0000 |
commit | f92c0e2daf537b3c39da4fbec4183c6102c96e70 (patch) | |
tree | 71437a7c8c1da7bb0e2b68a07b8124ee0f255220 | |
parent | fe9423e0c757b964c55393944cff2458393611fe (diff) |
Prepare definitions X509_STORE_set_verify{,_cb}_func() that work with
opaque structs.
ok beck inoguchi jsing
-rw-r--r-- | lib/libcrypto/x509/x509_vfy.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/libcrypto/x509/x509_vfy.h b/lib/libcrypto/x509/x509_vfy.h index 2981f947887..097e1f69f4b 100644 --- a/lib/libcrypto/x509/x509_vfy.h +++ b/lib/libcrypto/x509/x509_vfy.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_vfy.h,v 1.38 2021/10/31 15:54:08 tb Exp $ */ +/* $OpenBSD: x509_vfy.h,v 1.39 2021/10/31 15:55:45 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -209,8 +209,9 @@ struct x509_store_st { int X509_STORE_set_depth(X509_STORE *store, int depth); -#define X509_STORE_set_verify_cb_func(ctx,func) ((ctx)->verify_cb=(func)) +#if !defined(LIBRESSL_NEW_API) #define X509_STORE_set_verify_func(ctx,func) ((ctx)->verify=(func)) +#endif #if defined(LIBRESSL_INTERNAL) || !defined(LIBRESSL_OPAQUE_X509) /* 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); X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *ctx); void X509_STORE_set_verify_cb(X509_STORE *ctx, - int (*verify_cb)(int, X509_STORE_CTX *)); + int (*verify_cb)(int, X509_STORE_CTX *)); +#define X509_STORE_set_verify_cb_func(ctx, func) \ + X509_STORE_set_verify_cb((ctx), (func)) X509_STORE_CTX *X509_STORE_CTX_new(void); @@ -556,6 +559,8 @@ void X509_STORE_CTX_set0_verified_chain(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) int (*X509_STORE_CTX_get_verify(X509_STORE_CTX *ctx))(X509_STORE_CTX *); void X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx, int (*verify)(X509_STORE_CTX *)); +#define X509_STORE_set_verify_func(ctx, func) \ + X509_STORE_set_verify((ctx), (func)) int (*X509_STORE_CTX_get_verify_cb(X509_STORE_CTX *ctx))(int, X509_STORE_CTX *); #endif void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, |