|
|
@@ -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)
|