[openssl] master update

Matt Caswell matt at openssl.org
Wed Dec 4 17:51:29 UTC 2019


The branch master has been updated
       via  7573fe1af54c190ccd8d07d753b334637a30f3a2 (commit)
       via  67b8f5bdbf95ad4def2dd27c220545b15d847aae (commit)
      from  25d7cd1d69e5d5df9c9f346922a48797baca03b7 (commit)


- Log -----------------------------------------------------------------
commit 7573fe1af54c190ccd8d07d753b334637a30f3a2
Author: Matt Caswell <matt at openssl.org>
Date:   Fri Nov 29 12:02:54 2019 +0000

    Deprecate the AES_ige_*() functions
    
    These functions were already partially deprecated. Now we do it fully.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/10558)

commit 67b8f5bdbf95ad4def2dd27c220545b15d847aae
Author: Matt Caswell <matt at openssl.org>
Date:   Fri Nov 29 12:01:18 2019 +0000

    Add the ability to supress deprecation warnings
    
    We add a new macro OPENSSL_SUPRESS_DEPRECATED which enables applications
    to supress deprecation warnings where necessary.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/10558)

-----------------------------------------------------------------------

Summary of changes:
 apps/speed.c             |  3 +++
 include/openssl/aes.h    | 19 ++++++++++---------
 include/openssl/macros.h | 20 +++++++++++---------
 test/igetest.c           |  3 +++
 4 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/apps/speed.c b/apps/speed.c
index 53ae4c4e58..e4b104e9c3 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -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>
diff --git a/include/openssl/aes.h b/include/openssl/aes.h
index a21e72d473..510edce18d 100644
--- a/include/openssl/aes.h
+++ b/include/openssl/aes.h
@@ -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,
diff --git a/include/openssl/macros.h b/include/openssl/macros.h
index 8548bde542..a38387f131 100644
--- a/include/openssl/macros.h
+++ b/include/openssl/macros.h
@@ -28,15 +28,17 @@
  */
 # ifndef DECLARE_DEPRECATED
 #  define DECLARE_DEPRECATED(f)   f;
-#  ifdef __GNUC__
-#   if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
-#    undef DECLARE_DEPRECATED
-#    define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
-#   endif
-#  elif defined(__SUNPRO_C)
-#   if (__SUNPRO_C >= 0x5130)
-#    undef DECLARE_DEPRECATED
-#    define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
+#  ifndef OPENSSL_SUPPRESS_DEPRECATED
+#   ifdef __GNUC__
+#    if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
+#     undef DECLARE_DEPRECATED
+#     define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
+#    endif
+#   elif defined(__SUNPRO_C)
+#    if (__SUNPRO_C >= 0x5130)
+#     undef DECLARE_DEPRECATED
+#     define DECLARE_DEPRECATED(f)    f __attribute__ ((deprecated));
+#    endif
 #   endif
 #  endif
 # endif
diff --git a/test/igetest.c b/test/igetest.c
index 5a9ebb5b56..7a8ff68802 100644
--- a/test/igetest.c
+++ b/test/igetest.c
@@ -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>


More information about the openssl-commits mailing list