summaryrefslogtreecommitdiff
path: root/lib/libcrypto/rsa/rsa.h
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2023-04-09 19:10:24 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2023-04-09 19:10:24 +0000
commit8b4f54a41d2afcc8169b3830081f4599ae0dce2e (patch)
treedc7bc9667e1dc2f5ced873537b516eb07a6cbce7 /lib/libcrypto/rsa/rsa.h
parent0fb5c1206a7633f0a80374f729faf8b7995bc2d1 (diff)
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 'lib/libcrypto/rsa/rsa.h')
-rw-r--r--lib/libcrypto/rsa/rsa.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libcrypto/rsa/rsa.h b/lib/libcrypto/rsa/rsa.h
index 73ec9d5a426..fa98f9cf764 100644
--- a/lib/libcrypto/rsa/rsa.h
+++ b/lib/libcrypto/rsa/rsa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsa.h,v 1.58 2022/07/12 14:42:50 kn Exp $ */
+/* $OpenBSD: rsa.h,v 1.59 2023/04/09 19:10:23 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -240,11 +240,12 @@ RSA *RSA_new_method(ENGINE *engine);
int RSA_bits(const RSA *rsa);
int RSA_size(const RSA *rsa);
-/* Deprecated version */
-#ifndef OPENSSL_NO_DEPRECATED
+/*
+ * Wrapped in OPENSSL_NO_DEPRECATED in 0.9.8. Still used for libressl bindings
+ * in rust-openssl.
+ */
RSA *RSA_generate_key(int bits, unsigned long e,
void (*callback)(int, int, void *), void *cb_arg);
-#endif /* !defined(OPENSSL_NO_DEPRECATED) */
/* New version */
int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);