[Cmake-commits] CMake branch, next, updated. v3.4.0-rc2-855-ge6d7f76

Brad King brad.king at kitware.com
Thu Oct 22 09:30:38 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  e6d7f7695df7997fe20a4f14e8710f95bb87bff9 (commit)
       via  cbe044c42d1b11d780c7eac6a78dffa62ac62966 (commit)
      from  8d3944cc9860454b1309ce8932cc15a94536964b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6d7f7695df7997fe20a4f14e8710f95bb87bff9
commit e6d7f7695df7997fe20a4f14e8710f95bb87bff9
Merge: 8d3944c cbe044c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Oct 22 09:30:38 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Oct 22 09:30:38 2015 -0400

    Merge topic 'update-libarchive' into next
    
    cbe044c4 libarchive: Use CommonCrypto APIs on OS X only when available


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cbe044c42d1b11d780c7eac6a78dffa62ac62966
commit cbe044c42d1b11d780c7eac6a78dffa62ac62966
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 21 14:30:16 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Oct 22 09:30:27 2015 -0400

    libarchive: Use CommonCrypto APIs on OS X only when available
    
    Use each CommonCrypto API only when using an OS X SDK version new enough
    to provide it.

diff --git a/Utilities/cmlibarchive/libarchive/archive_cryptor.c b/Utilities/cmlibarchive/libarchive/archive_cryptor.c
index 9b01df8..efd350d 100644
--- a/Utilities/cmlibarchive/libarchive/archive_cryptor.c
+++ b/Utilities/cmlibarchive/libarchive/archive_cryptor.c
@@ -31,7 +31,7 @@
 #include "archive.h"
 #include "archive_cryptor_private.h"
 
-#ifdef __APPLE__
+#ifdef ARCHIVE_CRYPTOR_USE_Apple_CommonCrypto
 
 static int
 pbkdf2_sha1(const char *pw, size_t pw_len, const uint8_t *salt,
@@ -114,7 +114,10 @@ pbkdf2_sha1(const char *pw, size_t pw_len, const uint8_t *salt,
 
 #endif
 
-#ifdef __APPLE__
+#ifdef ARCHIVE_CRYPTOR_USE_Apple_CommonCrypto
+# if MAC_OS_X_VERSION_MAX_ALLOWED < 1090
+#  define kCCAlgorithmAES kCCAlgorithmAES128
+# endif
 
 static int
 aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *key, size_t key_len)
diff --git a/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h b/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h
index b62ec0c..9a96aee 100644
--- a/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h
+++ b/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h
@@ -31,6 +31,13 @@
 #define ARCHIVE_CRYPTOR_PRIVATE_H_INCLUDED
 
 #ifdef __APPLE__
+# include <AvailabilityMacros.h>
+# if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
+#  define ARCHIVE_CRYPTOR_USE_Apple_CommonCrypto
+# endif
+#endif
+
+#ifdef ARCHIVE_CRYPTOR_USE_Apple_CommonCrypto
 #include <CommonCrypto/CommonCryptor.h>
 #include <CommonCrypto/CommonKeyDerivation.h>
 #define AES_BLOCK_SIZE	16
diff --git a/Utilities/cmlibarchive/libarchive/archive_hmac.c b/Utilities/cmlibarchive/libarchive/archive_hmac.c
index 898853b..36e3e1c 100644
--- a/Utilities/cmlibarchive/libarchive/archive_hmac.c
+++ b/Utilities/cmlibarchive/libarchive/archive_hmac.c
@@ -31,7 +31,7 @@
 #include "archive.h"
 #include "archive_hmac_private.h"
 
-#ifdef __APPLE__
+#ifdef ARCHIVE_HMAC_USE_Apple_CommonCrypto
 
 static int
 __hmac_sha1_init(archive_hmac_sha1_ctx *ctx, const uint8_t *key, size_t key_len)
diff --git a/Utilities/cmlibarchive/libarchive/archive_hmac_private.h b/Utilities/cmlibarchive/libarchive/archive_hmac_private.h
index 6a8bbf2..a9fb8ec 100644
--- a/Utilities/cmlibarchive/libarchive/archive_hmac_private.h
+++ b/Utilities/cmlibarchive/libarchive/archive_hmac_private.h
@@ -31,6 +31,13 @@
 #define ARCHIVE_HMAC_PRIVATE_H_INCLUDED
 
 #ifdef __APPLE__
+# include <AvailabilityMacros.h>
+# if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
+#  define ARCHIVE_HMAC_USE_Apple_CommonCrypto
+# endif
+#endif
+
+#ifdef ARCHIVE_HMAC_USE_Apple_CommonCrypto
 #include <CommonCrypto/CommonHMAC.h>
 
 typedef	CCHmacContext archive_hmac_sha1_ctx;

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list