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
This commit is contained in:
Jeffrey Altman
2015-11-24 09:48:44 -05:00
parent 3e6fffed60
commit 6fbe672451

View File

@@ -53,7 +53,11 @@
#include <roken.h>
#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