diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2023-04-25 18:32:43 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2023-04-25 18:32:43 +0000 |
commit | e4b9378f6306af7cf785bce6c4da16bd15122dc9 (patch) | |
tree | 103b4c3ec720d276c0096487e0953a4dc66c5e44 /lib/libcrypto | |
parent | 7ebcc862c06d7351ed30ee20602eeca4d9c369d9 (diff) |
X509_STORE_get1_{certs,crls} become X509_STORE_CTX_*
This matches the OpenSSL 1.1 API a bit better.
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/hidden/openssl/x509_vfy.h | 6 | ||||
-rw-r--r-- | lib/libcrypto/x509/x509_lu.c | 20 | ||||
-rw-r--r-- | lib/libcrypto/x509/x509_vfy.h | 7 |
3 files changed, 5 insertions, 28 deletions
diff --git a/lib/libcrypto/hidden/openssl/x509_vfy.h b/lib/libcrypto/hidden/openssl/x509_vfy.h index aae3ed1351a..29b90bef5a7 100644 --- a/lib/libcrypto/hidden/openssl/x509_vfy.h +++ b/lib/libcrypto/hidden/openssl/x509_vfy.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_vfy.h,v 1.3 2023/04/25 18:28:05 tb Exp $ */ +/* $OpenBSD: x509_vfy.h,v 1.4 2023/04/25 18:32:42 tb Exp $ */ /* * Copyright (c) 2022 Bob Beck <beck@openbsd.org> * @@ -35,8 +35,6 @@ LCRYPTO_USED(X509_OBJECT_get0_X509_CRL); LCRYPTO_USED(X509_STORE_new); LCRYPTO_USED(X509_STORE_free); LCRYPTO_USED(X509_STORE_up_ref); -LCRYPTO_USED(X509_STORE_get1_certs); -LCRYPTO_USED(X509_STORE_get1_crls); LCRYPTO_USED(X509_STORE_get0_objects); LCRYPTO_USED(X509_STORE_get_ex_data); LCRYPTO_USED(X509_STORE_set_ex_data); @@ -59,6 +57,8 @@ LCRYPTO_USED(X509_STORE_CTX_get0_chain); LCRYPTO_USED(X509_STORE_CTX_get0_store); LCRYPTO_USED(X509_STORE_CTX_get0_untrusted); LCRYPTO_USED(X509_STORE_CTX_set0_untrusted); +LCRYPTO_USED(X509_STORE_CTX_get1_certs); +LCRYPTO_USED(X509_STORE_CTX_get1_crls); LCRYPTO_USED(X509_STORE_CTX_trusted_stack); LCRYPTO_USED(X509_STORE_CTX_set0_trusted_stack); LCRYPTO_USED(X509_STORE_CTX_cleanup); diff --git a/lib/libcrypto/x509/x509_lu.c b/lib/libcrypto/x509/x509_lu.c index 584251d18f5..05730f56cce 100644 --- a/lib/libcrypto/x509/x509_lu.c +++ b/lib/libcrypto/x509/x509_lu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_lu.c,v 1.59 2023/04/16 08:30:21 tb Exp $ */ +/* $OpenBSD: x509_lu.c,v 1.60 2023/04/25 18:32:42 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -593,13 +593,8 @@ X509_get1_certs_from_cache(X509_STORE *store, X509_NAME *name) return NULL; } -#if defined(LIBRESSL_NEXT_API) STACK_OF(X509) * X509_STORE_CTX_get1_certs(X509_STORE_CTX *ctx, X509_NAME *name) -#else -STACK_OF(X509) * -X509_STORE_get1_certs(X509_STORE_CTX *ctx, X509_NAME *name) -#endif { X509_STORE *store = ctx->store; STACK_OF(X509) *sk; @@ -619,19 +614,10 @@ X509_STORE_get1_certs(X509_STORE_CTX *ctx, X509_NAME *name) return X509_get1_certs_from_cache(store, name); } -#if defined(LIBRESSL_NEXT_API) LCRYPTO_ALIAS(X509_STORE_CTX_get1_certs); -#else -LCRYPTO_ALIAS(X509_STORE_get1_certs); -#endif -#if defined(LIBRESSL_NEXT_API) STACK_OF(X509_CRL) * X509_STORE_CTX_get1_crls(X509_STORE_CTX *ctx, X509_NAME *name) -#else -STACK_OF(X509_CRL) * -X509_STORE_get1_crls(X509_STORE_CTX *ctx, X509_NAME *name) -#endif { X509_STORE *store = ctx->store; STACK_OF(X509_CRL) *sk = NULL; @@ -679,11 +665,7 @@ X509_STORE_get1_crls(X509_STORE_CTX *ctx, X509_NAME *name) sk_X509_CRL_pop_free(sk, X509_CRL_free); return NULL; } -#if defined(LIBRESSL_NEXT_API) LCRYPTO_ALIAS(X509_STORE_CTX_get1_crls); -#else -LCRYPTO_ALIAS(X509_STORE_get1_crls); -#endif X509_OBJECT * X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h, X509_OBJECT *x) diff --git a/lib/libcrypto/x509/x509_vfy.h b/lib/libcrypto/x509/x509_vfy.h index cfa35331195..7e91155dc37 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.61 2023/04/25 18:28:05 tb Exp $ */ +/* $OpenBSD: x509_vfy.h,v 1.62 2023/04/25 18:32:42 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -285,15 +285,10 @@ X509_CRL *X509_OBJECT_get0_X509_CRL(X509_OBJECT *xo); X509_STORE *X509_STORE_new(void); void X509_STORE_free(X509_STORE *v); int X509_STORE_up_ref(X509_STORE *x); -#if defined(LIBRESSL_NEXT_API) #define X509_STORE_get1_certs X509_STORE_CTX_get1_certs #define X509_STORE_get1_crls X509_STORE_CTX_get1_crls 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); -#else -STACK_OF(X509) *X509_STORE_get1_certs(X509_STORE_CTX *st, X509_NAME *nm); -STACK_OF(X509_CRL) *X509_STORE_get1_crls(X509_STORE_CTX *st, X509_NAME *nm); -#endif STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(X509_STORE *xs); void *X509_STORE_get_ex_data(X509_STORE *xs, int idx); int X509_STORE_set_ex_data(X509_STORE *xs, int idx, void *data); |