From: tb Date: Sat, 2 Mar 2024 10:33:51 +0000 (+0000) Subject: Remove X509_ALGOR_set_md() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4a5e4343154e9cd368a854da8c580e0cd1fe0c6f;p=openbsd Remove X509_ALGOR_set_md() One of those void APIs that are super hard to use safely since they can fail but can't communicate failure. Nothing uses this. Internal uses have been converted to error checked X509_ALGOR_set_evp_md(). ok jsing --- diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index 715999858e7..f27d1fbffd9 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -2540,7 +2540,6 @@ X509_ALGOR_get0 X509_ALGOR_it X509_ALGOR_new X509_ALGOR_set0 -X509_ALGOR_set_md X509_ATTRIBUTE_count X509_ATTRIBUTE_create X509_ATTRIBUTE_create_by_NID diff --git a/lib/libcrypto/asn1/x_algor.c b/lib/libcrypto/asn1/x_algor.c index d9a6cf9d8ea..939ce4b669f 100644 --- a/lib/libcrypto/asn1/x_algor.c +++ b/lib/libcrypto/asn1/x_algor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_algor.c,v 1.38 2023/11/01 20:41:12 tb Exp $ */ +/* $OpenBSD: x_algor.c,v 1.39 2024/03/02 10:33:51 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -268,12 +268,6 @@ X509_ALGOR_set_evp_md(X509_ALGOR *alg, const EVP_MD *md) return 1; } -void -X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md) -{ - (void)X509_ALGOR_set_evp_md(alg, md); -} - int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b) { diff --git a/lib/libcrypto/x509/x509.h b/lib/libcrypto/x509/x509.h index 66752f34e98..c84ff6b6b38 100644 --- a/lib/libcrypto/x509/x509.h +++ b/lib/libcrypto/x509/x509.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509.h,v 1.105 2024/03/02 10:20:27 tb Exp $ */ +/* $OpenBSD: x509.h,v 1.106 2024/03/02 10:33:51 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -510,9 +510,6 @@ X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn); int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval); void X509_ALGOR_get0(const ASN1_OBJECT **paobj, int *pptype, const void **ppval, const X509_ALGOR *algor); -#ifndef LIBRESSL_INTERNAL -void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md); -#endif int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b); X509_NAME *X509_NAME_dup(X509_NAME *xn);