summaryrefslogtreecommitdiffstats
path: root/crypto/mdc2
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-01-09 11:18:58 +1000
committerPauli <paul.dale@oracle.com>2020-01-12 12:02:17 +1000
commit33ee9ae059ac6f0ce1871da96116c6d582ec524b (patch)
tree1b1af5690e78714f79dfc315f4eb35525444945f /crypto/mdc2
parent0feef76fe07e75b70155468f0a5956242d27b316 (diff)
Deprecate the low level MDC2 functions.
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10790)
Diffstat (limited to 'crypto/mdc2')
-rw-r--r--crypto/mdc2/build.info11
-rw-r--r--crypto/mdc2/mdc2_one.c6
-rw-r--r--crypto/mdc2/mdc2dgst.c6
3 files changed, 21 insertions, 2 deletions
diff --git a/crypto/mdc2/build.info b/crypto/mdc2/build.info
index 8fe6878d60..54df262514 100644
--- a/crypto/mdc2/build.info
+++ b/crypto/mdc2/build.info
@@ -1,3 +1,10 @@
LIBS=../../libcrypto
-SOURCE[../../libcrypto]=\
- mdc2dgst.c mdc2_one.c
+
+SOURCE[../../libcrypto]=mdc2dgst.c mdc2_one.c
+
+# When all deprecated symbols are removed, libcrypto doesn't export the
+# MDC2 functions, so we must include them directly in liblegacy.a
+IF[{- $disabled{"deprecated"}
+ && (defined $config{"api"} && $config{"api"} >= 30000) -}]
+ SOURCE[../../providers/liblegacy.a]=mdc2dgst.c mdc2_one.c
+ENDIF
diff --git a/crypto/mdc2/mdc2_one.c b/crypto/mdc2/mdc2_one.c
index 7b80bac50e..c8bfdcc9d6 100644
--- a/crypto/mdc2/mdc2_one.c
+++ b/crypto/mdc2/mdc2_one.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * MD2 low level APIs are deprecated for public use, but still ok for
+ * internal use.
+ */
+#include "internal/deprecated.h"
+
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/mdc2.h>
diff --git a/crypto/mdc2/mdc2dgst.c b/crypto/mdc2/mdc2dgst.c
index 46142f11d2..8893be16e4 100644
--- a/crypto/mdc2/mdc2dgst.c
+++ b/crypto/mdc2/mdc2dgst.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * MD2 low level APIs are deprecated for public use, but still ok for
+ * internal use.
+ */
+#include "internal/deprecated.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>