summaryrefslogtreecommitdiff
path: root/src/lib/libssl/hidden
diff options
context:
space:
mode:
authortb <>2024-08-03 04:50:27 +0000
committertb <>2024-08-03 04:50:27 +0000
commit795f6cc947a840bd8785ed0cad261a251e7f3ee6 (patch)
treeab072a8587850bb026552dec2888fdf2051ad344 /src/lib/libssl/hidden
parent8f247dc49d0a8e1e624ddd39b58455f90c3f00f5 (diff)
downloadopenbsd-795f6cc947a840bd8785ed0cad261a251e7f3ee6.tar.gz
openbsd-795f6cc947a840bd8785ed0cad261a251e7f3ee6.tar.bz2
openbsd-795f6cc947a840bd8785ed0cad261a251e7f3ee6.zip
Prepare to provide SSL_CTX_set1_cert_store()
SSL_CTX_set_cert_store() should have been called SSL_CTX_set0_cert_store() since it takes ownership of the store argument. Apparently a few people ran into the issue of not bumping the refcount themselves, leading to use after frees about 10 years ago. This is a quite rarely used API and there are no misuses in the ports tree, but since someone did the work of writing a diff, we can still add it. Needless to say that SSL_CTX_get_cert_store() obviously has the exact same issue and nobody seems to have thought of adding a get0 or get1 version to match... Fixes https://github.com/libressl/openbsd/issues/71 From Kenjiro Nakayama
Diffstat (limited to 'src/lib/libssl/hidden')
-rw-r--r--src/lib/libssl/hidden/openssl/ssl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libssl/hidden/openssl/ssl.h b/src/lib/libssl/hidden/openssl/ssl.h
index cff250ee75..6cf8d0c797 100644
--- a/src/lib/libssl/hidden/openssl/ssl.h
+++ b/src/lib/libssl/hidden/openssl/ssl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl.h,v 1.7 2024/07/14 15:39:36 tb Exp $ */ 1/* $OpenBSD: ssl.h,v 1.8 2024/08/03 04:50:27 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2023 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2023 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -105,6 +105,7 @@ LSSL_USED(SSL_CTX_set_timeout);
105LSSL_USED(SSL_CTX_get_timeout); 105LSSL_USED(SSL_CTX_get_timeout);
106LSSL_USED(SSL_CTX_get_cert_store); 106LSSL_USED(SSL_CTX_get_cert_store);
107LSSL_USED(SSL_CTX_set_cert_store); 107LSSL_USED(SSL_CTX_set_cert_store);
108LSSL_USED(SSL_CTX_set1_cert_store);
108LSSL_USED(SSL_CTX_get0_certificate); 109LSSL_USED(SSL_CTX_get0_certificate);
109LSSL_USED(SSL_CTX_get0_privatekey); 110LSSL_USED(SSL_CTX_get0_privatekey);
110LSSL_USED(SSL_want); 111LSSL_USED(SSL_want);