aboutsummaryrefslogtreecommitdiffstats
path: root/main/aescrypt.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-24 22:07:50 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-24 22:07:50 +0000
commit13417b262fc5bc8660119c444d99ba792220af94 (patch)
treef7d460f19cb2b61dfa1bd6eca49cf1e3afb09fcc /main/aescrypt.c
parentfb966a66a6f133dc15c95c01dcbef4532311898f (diff)
use the OpenSSL AES implementation if it's available (unless configured not to)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@66071 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/aescrypt.c')
-rw-r--r--main/aescrypt.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/main/aescrypt.c b/main/aescrypt.c
index 1ccddf3f5..7b34809bb 100644
--- a/main/aescrypt.c
+++ b/main/aescrypt.c
@@ -42,13 +42,15 @@
* \author Dr Brian Gladman <brg@gladman.me.uk>
*/
-#include "aesopt.h"
-
#if defined(__cplusplus)
extern "C"
{
#endif
+#ifndef HAVE_CRYPTO
+
+#include "aesopt.h"
+
#define si(y,x,k,c) (s(y,c) = word_in(x, c) ^ (k)[c])
#define so(y,x,c) word_out(y, c, s(x,c))
@@ -312,6 +314,8 @@ aes_rval aes_decrypt(const void *in_blk, void *out_blk, const aes_decrypt_ctx cx
#endif
+#endif /* !HAVE_CRYPTO */
+
#if defined(__cplusplus)
}
#endif