[openssl] master update

Matt Caswell matt at openssl.org
Thu Aug 29 11:07:56 UTC 2019


The branch master has been updated
       via  bad41b689fd67fa44efbe6488c1c0b9d6e14c139 (commit)
      from  7f6b035b523898cf5318d023d50cb3665a67d686 (commit)


- Log -----------------------------------------------------------------
commit bad41b689fd67fa44efbe6488c1c0b9d6e14c139
Author: Matt Caswell <matt at openssl.org>
Date:   Wed Aug 28 15:46:26 2019 +0100

    Fix no-cmac
    
    Don't include files that we don't want to build
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/9718)

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

Summary of changes:
 providers/common/macs/build.info  |  6 +++++-
 providers/common/macs/cmac_prov.c | 21 ++++++++-------------
 providers/fips/fipsprov.c         |  2 ++
 3 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/providers/common/macs/build.info b/providers/common/macs/build.info
index 6bd17291a6..832a1e76ec 100644
--- a/providers/common/macs/build.info
+++ b/providers/common/macs/build.info
@@ -1,4 +1,8 @@
-$COMMON=cmac_prov.c gmac_prov.c hmac_prov.c kmac_prov.c
+$COMMON=gmac_prov.c hmac_prov.c kmac_prov.c
+
+IF[{- !$disabled{cmac} -}]
+  $COMMON=$COMMON cmac_prov.c
+ENDIF
 
 LIBS=../../../libcrypto
 SOURCE[../../../libcrypto]=$COMMON
diff --git a/providers/common/macs/cmac_prov.c b/providers/common/macs/cmac_prov.c
index 693423130d..f63f405abf 100644
--- a/providers/common/macs/cmac_prov.c
+++ b/providers/common/macs/cmac_prov.c
@@ -7,18 +7,15 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <openssl/opensslconf.h>
-#ifndef OPENSSL_NO_CMAC
+#include <openssl/core_numbers.h>
+#include <openssl/core_names.h>
+#include <openssl/params.h>
+#include <openssl/engine.h>
+#include <openssl/evp.h>
+#include <openssl/cmac.h>
 
-# include <openssl/core_numbers.h>
-# include <openssl/core_names.h>
-# include <openssl/params.h>
-# include <openssl/engine.h>
-# include <openssl/evp.h>
-# include <openssl/cmac.h>
-
-# include "internal/provider_algs.h"
-# include "internal/provider_ctx.h"
+#include "internal/provider_algs.h"
+#include "internal/provider_ctx.h"
 
 /*
  * Forward declaration of everything implemented here.  This is not strictly
@@ -256,5 +253,3 @@ const OSSL_DISPATCH cmac_functions[] = {
     { OSSL_FUNC_MAC_SET_CTX_PARAMS, (void (*)(void))cmac_set_ctx_params },
     { 0, NULL }
 };
-
-#endif
diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c
index 9a7193bb4f..f8f0a90c24 100644
--- a/providers/fips/fipsprov.c
+++ b/providers/fips/fipsprov.c
@@ -332,7 +332,9 @@ static const OSSL_ALGORITHM fips_ciphers[] = {
 };
 
 static const OSSL_ALGORITHM fips_macs[] = {
+#ifndef OPENSSL_NO_CMAC
     { "CMAC", "fips=yes", cmac_functions },
+#endif
     { "GMAC", "fips=yes", gmac_functions },
     { "HMAC", "fips=yes", hmac_functions },
     { "KMAC128", "fips=yes", kmac128_functions },


More information about the openssl-commits mailing list