summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/hcrypto/evp-cc.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-11-13 10:51:14 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-11-13 23:19:05 +1100
commit4f8ba5ad6ac9b7153b0e13654e59f47e67b3f608 (patch)
treeca189d440b0a298cdcb3769d994828508dcd2e76 /source4/heimdal/lib/hcrypto/evp-cc.c
parent5bc87c14a1f5b45ed86e7ff9663f5f0aa2f70094 (diff)
downloadsamba-4f8ba5ad6ac9b7153b0e13654e59f47e67b3f608.tar.gz
s4:heimdal: import lorikeet-heimdal-200911122202 (commit 9291fd2d101f3eecec550178634faa94ead3e9a1)
Diffstat (limited to 'source4/heimdal/lib/hcrypto/evp-cc.c')
-rw-r--r--source4/heimdal/lib/hcrypto/evp-cc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/heimdal/lib/hcrypto/evp-cc.c b/source4/heimdal/lib/hcrypto/evp-cc.c
index 1bf8ca8af98..15b3479f8ed 100644
--- a/source4/heimdal/lib/hcrypto/evp-cc.c
+++ b/source4/heimdal/lib/hcrypto/evp-cc.c
@@ -296,6 +296,7 @@ EVP_cc_aes_256_cbc(void)
*
*/
+#ifdef COMMONCRYPTO_SUPPORTS_RC2
static int
cc_rc2_cbc_init(EVP_CIPHER_CTX *ctx,
const unsigned char * key,
@@ -305,6 +306,7 @@ cc_rc2_cbc_init(EVP_CIPHER_CTX *ctx,
struct cc_key *cc = ctx->cipher_data;
return init_cc_key(encp, kCCAlgorithmRC2, key, ctx->cipher->key_len, iv, &cc->href);
}
+#endif
/**
* The RC2 cipher type - common crypto
@@ -318,6 +320,7 @@ cc_rc2_cbc_init(EVP_CIPHER_CTX *ctx,
const EVP_CIPHER *
EVP_cc_rc2_cbc(void)
{
+#ifdef COMMONCRYPTO_SUPPORTS_RC2
static const EVP_CIPHER rc2_cbc = {
0,
kCCBlockSizeRC2,
@@ -334,6 +337,9 @@ EVP_cc_rc2_cbc(void)
NULL
};
return &rc2_cbc;
+#else
+ return NULL;
+#endif
}
/**
@@ -348,6 +354,7 @@ EVP_cc_rc2_cbc(void)
const EVP_CIPHER *
EVP_cc_rc2_40_cbc(void)
{
+#ifdef COMMONCRYPTO_SUPPORTS_RC2
static const EVP_CIPHER rc2_40_cbc = {
0,
kCCBlockSizeRC2,
@@ -364,6 +371,9 @@ EVP_cc_rc2_40_cbc(void)
NULL
};
return &rc2_40_cbc;
+#else
+ return NULL;
+#endif
}
@@ -379,6 +389,7 @@ EVP_cc_rc2_40_cbc(void)
const EVP_CIPHER *
EVP_cc_rc2_64_cbc(void)
{
+#ifdef COMMONCRYPTO_SUPPORTS_RC2
static const EVP_CIPHER rc2_64_cbc = {
0,
kCCBlockSizeRC2,
@@ -395,6 +406,9 @@ EVP_cc_rc2_64_cbc(void)
NULL
};
return &rc2_64_cbc;
+#else
+ return NULL;
+#endif
}
/**