summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_vfy.h
diff options
context:
space:
mode:
authortb <>2022-12-01 05:16:08 +0000
committertb <>2022-12-01 05:16:08 +0000
commit28ef9c3d0b11cd813f139ffe30994a5008042bf8 (patch)
treeb0ff60335c6fcd3f996c1795a3f7a071108f7e85 /src/lib/libcrypto/x509/x509_vfy.h
parent6b167b264a00d811a6f14daa45c93de7e0679e9d (diff)
downloadopenbsd-28ef9c3d0b11cd813f139ffe30994a5008042bf8.tar.gz
openbsd-28ef9c3d0b11cd813f139ffe30994a5008042bf8.tar.bz2
openbsd-28ef9c3d0b11cd813f139ffe30994a5008042bf8.zip
Getters and setters for the check_issued() callback
Open62541 uses X509_STORE_CTX_get_check_issued(), so provide it along with X509_STORE_{get,set}_check_issued(). As you would expect, they all return or take an X509_STORE_CTX_check_issued_fn. The getters aren't const in OpenSSL 1.1, but they now are in OpenSSL 3... These will be made available in the next minor bump and will ship in the stable release of LibreSSL 3.7 Part of OpenSSL commit 1060a50b See also https://github.com/libressl-portable/portable/issues/748 ok beck jsing
Diffstat (limited to 'src/lib/libcrypto/x509/x509_vfy.h')
-rw-r--r--src/lib/libcrypto/x509/x509_vfy.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_vfy.h b/src/lib/libcrypto/x509/x509_vfy.h
index 98b1cf5e92..e00db3a7af 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.54 2022/07/07 13:01:28 tb Exp $ */ 1/* $OpenBSD: x509_vfy.h,v 1.55 2022/12/01 05:16:08 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 *
@@ -310,6 +310,17 @@ void X509_STORE_set_verify_cb(X509_STORE *ctx,
310#define X509_STORE_set_verify_cb_func(ctx, func) \ 310#define X509_STORE_set_verify_cb_func(ctx, func) \
311 X509_STORE_set_verify_cb((ctx), (func)) 311 X509_STORE_set_verify_cb((ctx), (func))
312 312
313#if defined(LIBRESSL_INTERNAL) || defined(LIBRESSL_NEXT_API)
314typedef int (*X509_STORE_CTX_check_issued_fn)(X509_STORE_CTX *ctx,
315 X509 *subject, X509 *issuer);
316
317X509_STORE_CTX_check_issued_fn X509_STORE_get_check_issued(X509_STORE *store);
318void X509_STORE_set_check_issued(X509_STORE *store,
319 X509_STORE_CTX_check_issued_fn check_issued);
320X509_STORE_CTX_check_issued_fn
321 X509_STORE_CTX_get_check_issued(X509_STORE_CTX *ctx);
322#endif
323
313X509_STORE_CTX *X509_STORE_CTX_new(void); 324X509_STORE_CTX *X509_STORE_CTX_new(void);
314 325
315int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); 326int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);