From 6fbe672451be28a66952b13657fd5d5760a899f6 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Tue, 24 Nov 2015 09:48:44 -0500 Subject: [PATCH] hcrypto: Default to CommonCrypto on Apple OSes When __APPLE__ is defined and HCRYPTO_DEF_PROVIDER is not defined, define HCRYPTO_DEF_PROVIDER to be "cc" so that Apple's CommonCrypto implementations are used instead of the built-in "hcrypto" implementations. Change-Id: I393e5fc3f6c3b9339c96db58d926ff8ea1867cbb --- lib/hcrypto/evp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/hcrypto/evp.c b/lib/hcrypto/evp.c index c564353e4..cfabf377e 100644 --- a/lib/hcrypto/evp.c +++ b/lib/hcrypto/evp.c @@ -53,7 +53,11 @@ #include #ifndef HCRYPTO_DEF_PROVIDER -#define HCRYPTO_DEF_PROVIDER hcrypto +# ifdef __APPLE__ +# define HCRYPTO_DEF_PROVIDER cc +# else +# define HCRYPTO_DEF_PROVIDER hcrypto +# endif #endif #define HC_CONCAT4(x,y,z,aa) x ## y ## z ## aa