summaryrefslogtreecommitdiffstats
path: root/crypto/ripemd
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-01-09 09:08:31 +1000
committerPauli <paul.dale@oracle.com>2020-01-12 12:00:31 +1000
commit601fca1778f8d3cb38031655d2aa01b91b8f0cde (patch)
tree651fb601498df124cfba7443d029eae278067192 /crypto/ripemd
parent65167dba890b2e92821ee3b90e8f7f46fa30f9c1 (diff)
Deprecate the low level RIPEMD160 functions.
Use of the low level RIPEMD160 functions has been informally discouraged for a long time. We now formally deprecate them. Applications should instead use the EVP APIs, e.g. EVP_Digest, EVP_DigestInit_ex, EVP_DigestUpdate and EVP_DigestFinal_ex. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10789)
Diffstat (limited to 'crypto/ripemd')
-rw-r--r--crypto/ripemd/build.info14
-rw-r--r--crypto/ripemd/rmd_dgst.c6
-rw-r--r--crypto/ripemd/rmd_one.c6
3 files changed, 23 insertions, 3 deletions
diff --git a/crypto/ripemd/build.info b/crypto/ripemd/build.info
index a0a45b0e84..055da5dab8 100644
--- a/crypto/ripemd/build.info
+++ b/crypto/ripemd/build.info
@@ -12,12 +12,20 @@ IF[{- !$disabled{asm} -}]
ENDIF
ENDIF
-SOURCE[../../libcrypto]=rmd_dgst.c rmd_one.c $RMD160ASM
-
# Implementations are now spread across several libraries, so the defines
# need to be applied to all affected libraries and modules
-DEFINE[../../libcrypto]=$RMD160DEF
DEFINE[../providers/libimplementations.a]=$RMD160DEF
+SOURCE[../../libcrypto]=rmd_dgst.c rmd_one.c $RMD160ASM
+DEFINE[../../libcrypto]=$RMD160DEF
+
+# When all deprecated symbols are removed, libcrypto doesn't export the
+# RIPEMD160 functions, so we must include them directly in liblegacy.a
+IF[{- $disabled{"deprecated"}
+ && (defined $config{"api"} && $config{"api"} >= 30000) -}]
+ SOURCE[../../providers/liblegacy.a]=rmd_dgst.c rmd_one.c $RMD160ASM
+ DEFINE[../../providers/liblegacy.a]=$RMD160DEF
+ENDIF
+
GENERATE[rmd-586.s]=asm/rmd-586.pl
DEPEND[rmd-586.s]=../perlasm/x86asm.pl
diff --git a/crypto/ripemd/rmd_dgst.c b/crypto/ripemd/rmd_dgst.c
index f4a69c8862..d815f173cd 100644
--- a/crypto/ripemd/rmd_dgst.c
+++ b/crypto/ripemd/rmd_dgst.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * RIPEMD160 low level APIs are deprecated for public use, but still ok for
+ * internal use.
+ */
+#include "internal/deprecated.h"
+
#include <stdio.h>
#include "rmd_local.h"
#include <openssl/opensslv.h>
diff --git a/crypto/ripemd/rmd_one.c b/crypto/ripemd/rmd_one.c
index 5efb36b887..30a83da8db 100644
--- a/crypto/ripemd/rmd_one.c
+++ b/crypto/ripemd/rmd_one.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * RIPEMD160 low level APIs are deprecated for public use, but still ok for
+ * internal use.
+ */
+#include "internal/deprecated.h"
+
#include <stdio.h>
#include <string.h>
#include <openssl/ripemd.h>