summaryrefslogtreecommitdiff
path: root/pbx/pbx_dundi.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2010-07-21 19:11:32 +0000
committerTerry Wilson <twilson@digium.com>2010-07-21 19:11:32 +0000
commitd6e1c724e59a0b01b7ed23ba3cbfc1accdc11035 (patch)
tree702c8203da791c3e168d1a0ef5d07dbafea3dd54 /pbx/pbx_dundi.c
parent318798e93236e24cd5820ee23a15561ba9b54b9e (diff)
Remove built-in AES code and use optional_api instead
Review: https://reviewboard.asterisk.org/r/793/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx/pbx_dundi.c')
-rw-r--r--pbx/pbx_dundi.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 420af27f8..aaa30da0c 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -61,7 +61,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/crypto.h"
#include "asterisk/astdb.h"
#include "asterisk/acl.h"
-#include "asterisk/aes.h"
#include "asterisk/app.h"
#include "dundi-parser.h"
@@ -1313,8 +1312,8 @@ static int update_key(struct dundi_peer *peer)
int res;
if (!peer->keyexpire || (peer->keyexpire < time(NULL))) {
build_iv(key);
- ast_aes_encrypt_key(key, &peer->us_ecx);
- ast_aes_decrypt_key(key, &peer->us_dcx);
+ ast_aes_set_encrypt_key(key, &peer->us_ecx);
+ ast_aes_set_decrypt_key(key, &peer->us_dcx);
ekey = ast_key_get(peer->inkey, AST_KEY_PUBLIC);
if (!ekey) {
ast_log(LOG_NOTICE, "No such key '%s' for creating RSA encrypted shared key for '%s'!\n",
@@ -1516,8 +1515,8 @@ static int check_key(struct dundi_peer *peer, unsigned char *newkey, unsigned ch
memcpy(peer->rxenckey, newkey, 128);
memcpy(peer->rxenckey + 128, newsig, 128);
peer->them_keycrc32 = crc32(0L, peer->rxenckey, 128);
- ast_aes_decrypt_key(dst, &peer->them_dcx);
- ast_aes_encrypt_key(dst, &peer->them_ecx);
+ ast_aes_set_decrypt_key(dst, &peer->them_dcx);
+ ast_aes_set_encrypt_key(dst, &peer->them_ecx);
return 1;
}