summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa
diff options
context:
space:
mode:
authortb <>2023-04-09 19:10:23 +0000
committertb <>2023-04-09 19:10:23 +0000
commitc6d2fd4172ff9d967c8568f18bee3e3fbb7c4d96 (patch)
tree4e68c064d1e2a087f3d85418eec7158852b63be6 /src/lib/libcrypto/dsa
parent716f7ee66553ba43368106520df77e5efdddef94 (diff)
downloadopenbsd-c6d2fd4172ff9d967c8568f18bee3e3fbb7c4d96.tar.gz
openbsd-c6d2fd4172ff9d967c8568f18bee3e3fbb7c4d96.tar.bz2
openbsd-c6d2fd4172ff9d967c8568f18bee3e3fbb7c4d96.zip
Move a few functions out of OPENSSL_NO_DEPRECATED
Geoff Thorpe added OPENSSL_NO_DEPRECATED nearly two decades ago. The hope was that at some point some functions can be dropped. Most of the functions marked deprecated are actually unused nowadays but unfortunately some of them are still used in the ecosystem. Move them out of OPENSSL_NO_DEPRECATED so we can define it without breaking the consumers in the next bump. ERR_remove_state() is still used by a dozen or so ports. This isn't a big deal since it is just a stupid wrapper for the not quite as deprecated ERR_remove_thread_state(). It's not worth patching these ports. Annoyingly, {DH,DSA}_generate_parameters() and RSA_generate_key() are still used. They "make use" of the old-style BN_GENCB callback, which is therefore more difficult to remove - in case you don't know know: that's the thing responsible for printing pretty '.', '+' and '*' when you generate keys. Most annoyingly, DH_generate_parameters() was added to rust-openssl in 2020 for "advanced DH support". This is very unfortunate since cargo bundles a rust-openssl and updates it only every few years or so. As a consequence we're going to be stuck with this nonsense for a good while. ok beck jsing
Diffstat (limited to 'src/lib/libcrypto/dsa')
-rw-r--r--src/lib/libcrypto/dsa/dsa.h6
-rw-r--r--src/lib/libcrypto/dsa/dsa_depr.c4
2 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/libcrypto/dsa/dsa.h b/src/lib/libcrypto/dsa/dsa.h
index 1fa5fc3132..c1ff3d7de7 100644
--- a/src/lib/libcrypto/dsa/dsa.h
+++ b/src/lib/libcrypto/dsa/dsa.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa.h,v 1.40 2023/03/04 20:47:04 tb Exp $ */ 1/* $OpenBSD: dsa.h,v 1.41 2023/04/09 19:10:23 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 *
@@ -165,13 +165,11 @@ DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
165int i2d_DSAparams(const DSA *a,unsigned char **pp); 165int i2d_DSAparams(const DSA *a,unsigned char **pp);
166extern const ASN1_ITEM DSAparams_it; 166extern const ASN1_ITEM DSAparams_it;
167 167
168/* Deprecated version */ 168/* Wrapped in OPENSSL_NO_DEPRECATED in 0.9.8. Still used in 2023. */
169#ifndef OPENSSL_NO_DEPRECATED
170DSA * DSA_generate_parameters(int bits, 169DSA * DSA_generate_parameters(int bits,
171 unsigned char *seed,int seed_len, 170 unsigned char *seed,int seed_len,
172 int *counter_ret, unsigned long *h_ret,void 171 int *counter_ret, unsigned long *h_ret,void
173 (*callback)(int, int, void *),void *cb_arg); 172 (*callback)(int, int, void *),void *cb_arg);
174#endif /* !defined(OPENSSL_NO_DEPRECATED) */
175 173
176/* New version */ 174/* New version */
177int DSA_generate_parameters_ex(DSA *dsa, int bits, 175int DSA_generate_parameters_ex(DSA *dsa, int bits,
diff --git a/src/lib/libcrypto/dsa/dsa_depr.c b/src/lib/libcrypto/dsa/dsa_depr.c
index 790db6685a..b3f7ec0413 100644
--- a/src/lib/libcrypto/dsa/dsa_depr.c
+++ b/src/lib/libcrypto/dsa/dsa_depr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_depr.c,v 1.10 2022/11/26 16:08:52 tb Exp $ */ 1/* $OpenBSD: dsa_depr.c,v 1.11 2023/04/09 19:10:23 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -70,7 +70,6 @@
70 70
71#include "bn_local.h" 71#include "bn_local.h"
72 72
73#ifndef OPENSSL_NO_DEPRECATED
74DSA * 73DSA *
75DSA_generate_parameters(int bits, unsigned char *seed_in, int seed_len, 74DSA_generate_parameters(int bits, unsigned char *seed_in, int seed_len,
76 int *counter_ret, unsigned long *h_ret, void (*callback)(int, int, void *), 75 int *counter_ret, unsigned long *h_ret, void (*callback)(int, int, void *),
@@ -91,4 +90,3 @@ DSA_generate_parameters(int bits, unsigned char *seed_in, int seed_len,
91 return NULL; 90 return NULL;
92} 91}
93#endif 92#endif
94#endif