mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user