Wrap <CommonCrypto/CommonDigest.h> with ifdef since it doesn't exists on Tiger
This commit is contained in:
@@ -45,7 +45,9 @@
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H
|
||||
#include <CommonCrypto/CommonDigest.h>
|
||||
#endif
|
||||
#include <CommonCrypto/CommonCryptor.h>
|
||||
|
||||
#include <evp.h>
|
||||
@@ -422,6 +424,7 @@ EVP_cc_rc2_64_cbc(void)
|
||||
const EVP_MD *
|
||||
EVP_cc_md2(void)
|
||||
{
|
||||
#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H
|
||||
static const struct hc_evp_md md2 = {
|
||||
CC_MD2_DIGEST_LENGTH,
|
||||
CC_MD2_BLOCK_BYTES,
|
||||
@@ -432,6 +435,9 @@ EVP_cc_md2(void)
|
||||
(hc_evp_md_cleanup)NULL
|
||||
};
|
||||
return &md2;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -443,6 +449,7 @@ EVP_cc_md2(void)
|
||||
const EVP_MD *
|
||||
EVP_cc_md4(void)
|
||||
{
|
||||
#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H
|
||||
static const struct hc_evp_md md4 = {
|
||||
CC_MD4_DIGEST_LENGTH,
|
||||
CC_MD4_BLOCK_BYTES,
|
||||
@@ -453,6 +460,9 @@ EVP_cc_md4(void)
|
||||
(hc_evp_md_cleanup)NULL
|
||||
};
|
||||
return &md4;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -464,6 +474,7 @@ EVP_cc_md4(void)
|
||||
const EVP_MD *
|
||||
EVP_cc_md5(void)
|
||||
{
|
||||
#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H
|
||||
static const struct hc_evp_md md5 = {
|
||||
CC_MD5_DIGEST_LENGTH,
|
||||
CC_MD5_BLOCK_BYTES,
|
||||
@@ -474,6 +485,9 @@ EVP_cc_md5(void)
|
||||
(hc_evp_md_cleanup)NULL
|
||||
};
|
||||
return &md5;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -485,6 +499,7 @@ EVP_cc_md5(void)
|
||||
const EVP_MD *
|
||||
EVP_cc_sha1(void)
|
||||
{
|
||||
#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H
|
||||
static const struct hc_evp_md sha1 = {
|
||||
CC_SHA1_DIGEST_LENGTH,
|
||||
CC_SHA1_BLOCK_BYTES,
|
||||
@@ -495,6 +510,9 @@ EVP_cc_sha1(void)
|
||||
(hc_evp_md_cleanup)NULL
|
||||
};
|
||||
return &sha1;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -506,6 +524,7 @@ EVP_cc_sha1(void)
|
||||
const EVP_MD *
|
||||
EVP_cc_sha256(void)
|
||||
{
|
||||
#ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H
|
||||
static const struct hc_evp_md sha256 = {
|
||||
CC_SHA256_DIGEST_LENGTH,
|
||||
CC_SHA256_BLOCK_BYTES,
|
||||
@@ -516,6 +535,9 @@ EVP_cc_sha256(void)
|
||||
(hc_evp_md_cleanup)NULL
|
||||
};
|
||||
return &sha256;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user