summaryrefslogtreecommitdiffstats
path: root/crypto/des
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-01-16 13:50:03 +1000
committerPauli <paul.dale@oracle.com>2020-01-25 09:30:59 +1000
commitc6fec81b88131d08c1022504ccf6effa95497afb (patch)
tree8f9875a9f3a83fa13c6404faa8b7fa71f2c1f6f6 /crypto/des
parentf6edde4f06d2cadaf0949399e5df0b6f6a5b3598 (diff)
Deprecate the low level DES functions.
Use of the low level DES 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/10858)
Diffstat (limited to 'crypto/des')
-rw-r--r--crypto/des/build.info7
-rw-r--r--crypto/des/cbc_cksm.c6
-rw-r--r--crypto/des/cbc_enc.c6
-rw-r--r--crypto/des/cfb64ede.c6
-rw-r--r--crypto/des/cfb64enc.c6
-rw-r--r--crypto/des/cfb_enc.c6
-rw-r--r--crypto/des/des_enc.c6
-rw-r--r--crypto/des/ecb3_enc.c6
-rw-r--r--crypto/des/ecb_enc.c6
-rw-r--r--crypto/des/fcrypt.c6
-rw-r--r--crypto/des/fcrypt_b.c6
-rw-r--r--crypto/des/ofb64ede.c6
-rw-r--r--crypto/des/ofb64enc.c6
-rw-r--r--crypto/des/ofb_enc.c6
-rw-r--r--crypto/des/pcbc_enc.c6
-rw-r--r--crypto/des/qud_cksm.c7
-rw-r--r--crypto/des/rand_key.c6
-rw-r--r--crypto/des/set_key.c7
-rw-r--r--crypto/des/str2key.c6
-rw-r--r--crypto/des/xcbc_enc.c6
20 files changed, 123 insertions, 0 deletions
diff --git a/crypto/des/build.info b/crypto/des/build.info
index 40e874823c..8ce3daf37e 100644
--- a/crypto/des/build.info
+++ b/crypto/des/build.info
@@ -25,6 +25,13 @@ SOURCE[../../providers/libfips.a]=$COMMON
DEFINE[../../libcrypto]=$DESDEF
DEFINE[../../providers/libfips.a]=$DESDEF
+IF[{- $disabled{"deprecated"}
+ && !$disabled{"mdc2"}
+ && (defined $config{"api"} && $config{"api"} >= 30000) -}]
+ SOURCE[../../providers/liblegacy.a]=set_key.c $DESASM
+ DEFINE[../../providers/liblegacy.a]=$DESDEF
+ENDIF
+
GENERATE[des_enc-sparc.S]=asm/des_enc.m4
GENERATE[dest4-sparcv9.S]=asm/dest4-sparcv9.pl
INCLUDE[dest4-sparcv9.o]=..
diff --git a/crypto/des/cbc_cksm.c b/crypto/des/cbc_cksm.c
index 1fb76b5562..aacbaa6512 100644
--- a/crypto/des/cbc_cksm.c
+++ b/crypto/des/cbc_cksm.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include "des_local.h"
DES_LONG DES_cbc_cksum(const unsigned char *in, DES_cblock *output,
diff --git a/crypto/des/cbc_enc.c b/crypto/des/cbc_enc.c
index ecb98f2e1f..ed68f37674 100644
--- a/crypto/des/cbc_enc.c
+++ b/crypto/des/cbc_enc.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#define CBC_ENC_C__DONT_UPDATE_IV
#include "ncbc_enc.c" /* des_cbc_encrypt */
diff --git a/crypto/des/cfb64ede.c b/crypto/des/cfb64ede.c
index cb5dad2ca6..ad9469e713 100644
--- a/crypto/des/cfb64ede.c
+++ b/crypto/des/cfb64ede.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include "des_local.h"
/*
diff --git a/crypto/des/cfb64enc.c b/crypto/des/cfb64enc.c
index 7c44f2ac3f..21132e898a 100644
--- a/crypto/des/cfb64enc.c
+++ b/crypto/des/cfb64enc.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include "des_local.h"
/*
diff --git a/crypto/des/cfb_enc.c b/crypto/des/cfb_enc.c
index 8630cc4293..bfb5f5a186 100644
--- a/crypto/des/cfb_enc.c
+++ b/crypto/des/cfb_enc.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include "e_os.h"
#include "des_local.h"
#include <assert.h>
diff --git a/crypto/des/des_enc.c b/crypto/des/des_enc.c
index 5666c6e303..ed24595136 100644
--- a/crypto/des/des_enc.c
+++ b/crypto/des/des_enc.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include <openssl/crypto.h>
#include "des_local.h"
#include "spr.h"
diff --git a/crypto/des/ecb3_enc.c b/crypto/des/ecb3_enc.c
index 7244b7b588..02e6e9f73a 100644
--- a/crypto/des/ecb3_enc.c
+++ b/crypto/des/ecb3_enc.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include "des_local.h"
void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output,
diff --git a/crypto/des/ecb_enc.c b/crypto/des/ecb_enc.c
index 39b8237ce7..e161af68e4 100644
--- a/crypto/des/ecb_enc.c
+++ b/crypto/des/ecb_enc.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include "des_local.h"
#include <openssl/opensslv.h>
#include <openssl/bio.h>
diff --git a/crypto/des/fcrypt.c b/crypto/des/fcrypt.c
index 9aebf2847c..b38419617e 100644
--- a/crypto/des/fcrypt.c
+++ b/crypto/des/fcrypt.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
/* NOCW */
#include <stdio.h>
#ifdef _OSD_POSIX
diff --git a/crypto/des/fcrypt_b.c b/crypto/des/fcrypt_b.c
index 87ad1b3025..32b0fa6519 100644
--- a/crypto/des/fcrypt_b.c
+++ b/crypto/des/fcrypt_b.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include <stdio.h>
#define DES_FCRYPT
diff --git a/crypto/des/ofb64ede.c b/crypto/des/ofb64ede.c
index 284224df6c..80fb9d164a 100644
--- a/crypto/des/ofb64ede.c
+++ b/crypto/des/ofb64ede.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include "des_local.h"
/*
diff --git a/crypto/des/ofb64enc.c b/crypto/des/ofb64enc.c
index eec46ae7de..fc59c4e6c9 100644
--- a/crypto/des/ofb64enc.c
+++ b/crypto/des/ofb64enc.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include "des_local.h"
/*
diff --git a/crypto/des/ofb_enc.c b/crypto/des/ofb_enc.c
index 75100005ce..cd1fec83fe 100644
--- a/crypto/des/ofb_enc.c
+++ b/crypto/des/ofb_enc.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include "des_local.h"
/*
diff --git a/crypto/des/pcbc_enc.c b/crypto/des/pcbc_enc.c
index 13df94218b..4e123535c0 100644
--- a/crypto/des/pcbc_enc.c
+++ b/crypto/des/pcbc_enc.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include "des_local.h"
void DES_pcbc_encrypt(const unsigned char *input, unsigned char *output,
diff --git a/crypto/des/qud_cksm.c b/crypto/des/qud_cksm.c
index 5123914852..c0e2fa39f8 100644
--- a/crypto/des/qud_cksm.c
+++ b/crypto/des/qud_cksm.c
@@ -13,6 +13,13 @@
* only based on the code in this paper and is almost definitely not the same
* as the MIT implementation.
*/
+
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include "des_local.h"
#define Q_B0(a) (((DES_LONG)(a)))
diff --git a/crypto/des/rand_key.c b/crypto/des/rand_key.c
index 7de9146fcc..38f04de166 100644
--- a/crypto/des/rand_key.c
+++ b/crypto/des/rand_key.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include <openssl/des.h>
#include <openssl/rand.h>
diff --git a/crypto/des/set_key.c b/crypto/des/set_key.c
index 7972d84ac2..dc9e8451f3 100644
--- a/crypto/des/set_key.c
+++ b/crypto/des/set_key.c
@@ -15,6 +15,13 @@
* 1.1 added norm_expand_bits
* 1.0 First working version
*/
+
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include <openssl/crypto.h>
#include "des_local.h"
diff --git a/crypto/des/str2key.c b/crypto/des/str2key.c
index d348c06d6b..2600c63d02 100644
--- a/crypto/des/str2key.c
+++ b/crypto/des/str2key.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include <openssl/crypto.h>
#include "des_local.h"
diff --git a/crypto/des/xcbc_enc.c b/crypto/des/xcbc_enc.c
index 8a952f63a6..861f71167d 100644
--- a/crypto/des/xcbc_enc.c
+++ b/crypto/des/xcbc_enc.c
@@ -7,6 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+/*
+ * DES low level APIs are deprecated for public use, but still ok for internal
+ * use.
+ */
+#include "internal/deprecated.h"
+
#include "des_local.h"
/* RSA's DESX */