summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--imap-send.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/imap-send.c b/imap-send.c
index d9bcfb44dc..d6b65e204c 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -29,8 +29,18 @@
#ifdef NO_OPENSSL
typedef void *SSL;
#else
+#ifdef APPLE_COMMON_CRYPTO
+#include <CommonCrypto/CommonHMAC.h>
+#define HMAC_CTX CCHmacContext
+#define HMAC_Init(hmac, key, len, algo) CCHmacInit(hmac, algo, key, len)
+#define HMAC_Update CCHmacUpdate
+#define HMAC_Final(hmac, hash, ptr) CCHmacFinal(hmac, hash)
+#define HMAC_CTX_cleanup(ignore)
+#define EVP_md5() kCCHmacAlgMD5
+#else
#include <openssl/evp.h>
#include <openssl/hmac.h>
+#endif
#include <openssl/x509v3.h>
#endif