Deprecate the AES_ige_*() functions
authorMatt Caswell <matt@openssl.org>
Fri, 29 Nov 2019 12:02:54 +0000 (12:02 +0000)
committerMatt Caswell <matt@openssl.org>
Wed, 4 Dec 2019 17:46:38 +0000 (17:46 +0000)
These functions were already partially deprecated. Now we do it fully.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10558)

apps/speed.c
include/openssl/aes.h
test/igetest.c

index 53ae4c4e5876a319500858e71891d7f91f8fe683..e4b104e9c3117b5cadaa623bacca7ff97aa18d16 100644 (file)
@@ -17,6 +17,9 @@
 #define EdDSA_SECONDS   10
 #define SM2_SECONDS     10
 
+/* We need to use some deprecated APIs */
+#define OPENSSL_SUPPRESS_DEPRECATED
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index a21e72d47375e29814919068a38d448b1e09c869..510edce18d9050497dffa745fc99b96e4f4e56a6 100644 (file)
@@ -73,17 +73,18 @@ void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
 void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
                         size_t length, const AES_KEY *key,
                         unsigned char *ivec, int *num);
-# ifndef OPENSSL_NO_DEPRECATED_3_0
+
 /* NB: the IV is _two_ blocks long */
-void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
-                     size_t length, const AES_KEY *key,
-                     unsigned char *ivec, const int enc);
+DEPRECATEDIN_3_0(void
+                 AES_ige_encrypt(const unsigned char *in, unsigned char *out,
+                                 size_t length, const AES_KEY *key,
+                                 unsigned char *ivec, const int enc))
 /* NB: the IV is _four_ blocks long */
-void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
-                        size_t length, const AES_KEY *key,
-                        const AES_KEY *key2, const unsigned char *ivec,
-                        const int enc);
-# endif
+DEPRECATEDIN_3_0(void
+                 AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
+                                    size_t length, const AES_KEY *key,
+                                    const AES_KEY *key2,
+                                    const unsigned char *ivec, const int enc))
 
 int AES_wrap_key(AES_KEY *key, const unsigned char *iv,
                  unsigned char *out,
index 5a9ebb5b565b753093dce8b4307341f27b1822cb..7a8ff6880270c61eee5b5e87df0fdacea402d379 100644 (file)
@@ -7,6 +7,9 @@
  * https://www.openssl.org/source/license.html
  */
 
+/* The AES_ige_* functions are deprecated, so we suppress warnings about them */
+#define OPENSSL_SUPPRESS_DEPRECATED
+
 #include <openssl/crypto.h>
 #include <openssl/aes.h>
 #include <openssl/rand.h>