summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-01-14 09:38:09 +1000
committerPauli <paul.dale@oracle.com>2020-01-16 07:07:27 +1000
commita8fca7284a98ca58804e17ade92fadd7a62056ae (patch)
tree772f41a9e4b5058da12f0a0df765d75314519131 /apps
parentae856791e264fed50b8ee5070fcee7af11e7691c (diff)
Deprecate the low level RC4 functions
Use of the low level RC4 functions has been informally discouraged for a long time. We now formally deprecate them. Applications should instead use the EVP APIs, e.g. EVP_EncryptInit_ex, EVP_EncryptUpdate, EVP_EncryptFinal_ex and the equivalently named decrypt functions. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10834)
Diffstat (limited to 'apps')
-rw-r--r--apps/speed.c10
-rw-r--r--apps/version.c6
2 files changed, 5 insertions, 11 deletions
diff --git a/apps/speed.c b/apps/speed.c
index ae02393dd1..f567b48d2e 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -353,7 +353,7 @@ static const OPT_PAIR doit_choices[] = {
{"rmd160", D_RMD160},
{"ripemd160", D_RMD160},
#endif
-#ifndef OPENSSL_NO_RC4
+#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_DEPRECATED_3_0)
{"rc4", D_RC4},
#endif
#ifndef OPENSSL_NO_DES
@@ -712,7 +712,7 @@ static int EVP_Digest_RMD160_loop(void *args)
}
#endif
-#ifndef OPENSSL_NO_RC4
+#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_DEPRECATED_3_0)
static RC4_KEY rc4_ks;
static int RC4_loop(void *args)
{
@@ -1973,7 +1973,7 @@ int speed_main(int argc, char **argv)
if (doit[D_CBC_SEED])
SEED_set_key(key16, &seed_ks);
#endif
-#ifndef OPENSSL_NO_RC4
+#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_DEPRECATED_3_0)
if (doit[D_RC4])
RC4_set_key(&rc4_ks, 16, key16);
#endif
@@ -2379,7 +2379,7 @@ int speed_main(int argc, char **argv)
}
}
#endif
-#ifndef OPENSSL_NO_RC4
+#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_DEPRECATED_3_0)
if (doit[D_RC4]) {
for (testnum = 0; testnum < size_num; testnum++) {
print_message(names[D_RC4], c[D_RC4][testnum], lengths[testnum],
@@ -3492,7 +3492,7 @@ int speed_main(int argc, char **argv)
#if !defined(OPENSSL_NO_MD2) && !defined(OPENSSL_NO_DEPRECATED_3_0)
printf("%s ", MD2_options());
#endif
-#ifndef OPENSSL_NO_RC4
+#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_DEPRECATED_3_0)
printf("%s ", RC4_options());
#endif
#ifndef OPENSSL_NO_DES
diff --git a/apps/version.c b/apps/version.c
index 09d903d844..deb9133855 100644
--- a/apps/version.c
+++ b/apps/version.c
@@ -18,9 +18,6 @@
#ifndef OPENSSL_NO_MD2
# include <openssl/md2.h>
#endif
-#ifndef OPENSSL_NO_RC4
-# include <openssl/rc4.h>
-#endif
#ifndef OPENSSL_NO_DES
# include <openssl/des.h>
#endif
@@ -129,9 +126,6 @@ opthelp:
if (options) {
printf("options: ");
printf(" %s", BN_options());
-#ifndef OPENSSL_NO_RC4
- printf(" %s", RC4_options());
-#endif
#ifndef OPENSSL_NO_DES
printf(" %s", DES_options());
#endif