diff options
author | tb <> | 2024-03-02 10:33:51 +0000 |
---|---|---|
committer | tb <> | 2024-03-02 10:33:51 +0000 |
commit | 89eb64e4c740465b9ae86211f8cea0d76ff94956 (patch) | |
tree | 58ebaeb44569122a7b0c6e9b5308c23847976977 /src | |
parent | 9d772caea5ef17a78884a0e00950b1ea69769acd (diff) | |
download | openbsd-89eb64e4c740465b9ae86211f8cea0d76ff94956.tar.gz openbsd-89eb64e4c740465b9ae86211f8cea0d76ff94956.tar.bz2 openbsd-89eb64e4c740465b9ae86211f8cea0d76ff94956.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/Symbols.list | 1 | ||||
-rw-r--r-- | src/lib/libcrypto/asn1/x_algor.c | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/x509/x509.h | 5 |
3 files changed, 2 insertions, 12 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list index 715999858e..f27d1fbffd 100644 --- a/src/lib/libcrypto/Symbols.list +++ b/src/lib/libcrypto/Symbols.list | |||
@@ -2540,7 +2540,6 @@ X509_ALGOR_get0 | |||
2540 | X509_ALGOR_it | 2540 | X509_ALGOR_it |
2541 | X509_ALGOR_new | 2541 | X509_ALGOR_new |
2542 | X509_ALGOR_set0 | 2542 | X509_ALGOR_set0 |
2543 | X509_ALGOR_set_md | ||
2544 | X509_ATTRIBUTE_count | 2543 | X509_ATTRIBUTE_count |
2545 | X509_ATTRIBUTE_create | 2544 | X509_ATTRIBUTE_create |
2546 | X509_ATTRIBUTE_create_by_NID | 2545 | X509_ATTRIBUTE_create_by_NID |
diff --git a/src/lib/libcrypto/asn1/x_algor.c b/src/lib/libcrypto/asn1/x_algor.c index d9a6cf9d8e..939ce4b669 100644 --- a/src/lib/libcrypto/asn1/x_algor.c +++ b/src/lib/libcrypto/asn1/x_algor.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x_algor.c,v 1.38 2023/11/01 20:41:12 tb Exp $ */ | 1 | /* $OpenBSD: x_algor.c,v 1.39 2024/03/02 10:33:51 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -268,12 +268,6 @@ X509_ALGOR_set_evp_md(X509_ALGOR *alg, const EVP_MD *md) | |||
268 | return 1; | 268 | return 1; |
269 | } | 269 | } |
270 | 270 | ||
271 | void | ||
272 | X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md) | ||
273 | { | ||
274 | (void)X509_ALGOR_set_evp_md(alg, md); | ||
275 | } | ||
276 | |||
277 | int | 271 | int |
278 | X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b) | 272 | X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b) |
279 | { | 273 | { |
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index 66752f34e9..c84ff6b6b3 100644 --- a/src/lib/libcrypto/x509/x509.h +++ b/src/lib/libcrypto/x509/x509.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509.h,v 1.105 2024/03/02 10:20:27 tb Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.106 2024/03/02 10:33:51 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 | * |
@@ -510,9 +510,6 @@ X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn); | |||
510 | int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval); | 510 | int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval); |
511 | void X509_ALGOR_get0(const ASN1_OBJECT **paobj, int *pptype, const void **ppval, | 511 | void X509_ALGOR_get0(const ASN1_OBJECT **paobj, int *pptype, const void **ppval, |
512 | const X509_ALGOR *algor); | 512 | const X509_ALGOR *algor); |
513 | #ifndef LIBRESSL_INTERNAL | ||
514 | void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md); | ||
515 | #endif | ||
516 | int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b); | 513 | int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b); |
517 | 514 | ||
518 | X509_NAME *X509_NAME_dup(X509_NAME *xn); | 515 | X509_NAME *X509_NAME_dup(X509_NAME *xn); |