diff options
author | tb <> | 2022-12-01 05:16:08 +0000 |
---|---|---|
committer | tb <> | 2022-12-01 05:16:08 +0000 |
commit | 28ef9c3d0b11cd813f139ffe30994a5008042bf8 (patch) | |
tree | b0ff60335c6fcd3f996c1795a3f7a071108f7e85 /src/lib/libcrypto/x509/x509_vfy.c | |
parent | 6b167b264a00d811a6f14daa45c93de7e0679e9d (diff) | |
download | openbsd-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.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_vfy.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c index 9b7f371cea..675aba4322 100644 --- a/src/lib/libcrypto/x509/x509_vfy.c +++ b/src/lib/libcrypto/x509/x509_vfy.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_vfy.c,v 1.107 2022/11/26 16:08:55 tb Exp $ */ | 1 | /* $OpenBSD: x509_vfy.c,v 1.108 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 | * |
@@ -2587,6 +2587,28 @@ X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx, int (*verify)(X509_STORE_CTX *)) | |||
2587 | } | 2587 | } |
2588 | LCRYPTO_ALIAS(X509_STORE_CTX_set_verify) | 2588 | LCRYPTO_ALIAS(X509_STORE_CTX_set_verify) |
2589 | 2589 | ||
2590 | X509_STORE_CTX_check_issued_fn | ||
2591 | X509_STORE_get_check_issued(X509_STORE *store) | ||
2592 | { | ||
2593 | return store->check_issued; | ||
2594 | } | ||
2595 | LCRYPTO_ALIAS(X509_STORE_get_check_issued) | ||
2596 | |||
2597 | void | ||
2598 | X509_STORE_set_check_issued(X509_STORE *store, | ||
2599 | X509_STORE_CTX_check_issued_fn check_issued) | ||
2600 | { | ||
2601 | store->check_issued = check_issued; | ||
2602 | } | ||
2603 | LCRYPTO_ALIAS(X509_STORE_set_check_issued) | ||
2604 | |||
2605 | X509_STORE_CTX_check_issued_fn | ||
2606 | X509_STORE_CTX_get_check_issued(X509_STORE_CTX *ctx) | ||
2607 | { | ||
2608 | return ctx->check_issued; | ||
2609 | } | ||
2610 | LCRYPTO_ALIAS(X509_STORE_CTX_get_check_issued) | ||
2611 | |||
2590 | X509 * | 2612 | X509 * |
2591 | X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx) | 2613 | X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx) |
2592 | { | 2614 | { |