From 9ce6d42abbee2bbb79dcac77411f6b466b1d644e Mon Sep 17 00:00:00 2001 From: tb Date: Sat, 2 Mar 2024 10:54:39 +0000 Subject: [PATCH] Expose X509_STORE_get1_objects() Safer replacement API for the unsafe X509_STORE_get0_objects(). ok jsing --- lib/libcrypto/Symbols.list | 1 + lib/libcrypto/x509/x509_vfy.h | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index ea67b1faa0e..10562c675a3 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -2812,6 +2812,7 @@ X509_STORE_add_crl X509_STORE_add_lookup X509_STORE_free X509_STORE_get0_objects +X509_STORE_get1_objects X509_STORE_get0_param X509_STORE_get_check_issued X509_STORE_get_ex_data diff --git a/lib/libcrypto/x509/x509_vfy.h b/lib/libcrypto/x509/x509_vfy.h index 914a83bb00b..6474d5238a3 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.66 2024/03/02 10:40:05 tb Exp $ */ +/* $OpenBSD: x509_vfy.h,v 1.67 2024/03/02 10:54:39 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -293,9 +293,7 @@ int X509_STORE_up_ref(X509_STORE *x); STACK_OF(X509) *X509_STORE_CTX_get1_certs(X509_STORE_CTX *st, X509_NAME *nm); STACK_OF(X509_CRL) *X509_STORE_CTX_get1_crls(X509_STORE_CTX *st, X509_NAME *nm); STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(X509_STORE *xs); -#if defined(LIBRESSL_INTERNAL) || defined(LIBRESSL_NEXT_API) STACK_OF(X509_OBJECT) *X509_STORE_get1_objects(X509_STORE *xs); -#endif void *X509_STORE_get_ex_data(X509_STORE *xs, int idx); int X509_STORE_set_ex_data(X509_STORE *xs, int idx, void *data); -- 2.20.1