diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-28 00:17:55 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-28 00:17:55 +0000 |
commit | 4070819100a5f786c976e2740b8e086fdef93b25 (patch) | |
tree | bfadbcb165d3eb13f8533023bc5863e1f5bfaeec /funcs | |
parent | 50319cf4f9e2503a8aa60ba6836e72dc0ee71bc2 (diff) |
Fix some signedness problems in func_aes.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@171797 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_aes.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/funcs/func_aes.c b/funcs/func_aes.c index 6011fd9ae..40dafab1c 100644 --- a/funcs/func_aes.c +++ b/funcs/func_aes.c @@ -98,8 +98,8 @@ static int aes_helper(struct ast_channel *chan, const char *cmd, char *data, return -1; } - ast_aes_encrypt_key(args.key, &ecx); /* encryption: plaintext -> encryptedtext -> base64 */ - ast_aes_decrypt_key(args.key, &dcx); /* decryption: base64 -> encryptedtext -> plaintext */ + ast_aes_encrypt_key((unsigned char *) args.key, &ecx); /* encryption: plaintext -> encryptedtext -> base64 */ + ast_aes_decrypt_key((unsigned char *) args.key, &dcx); /* decryption: base64 -> encryptedtext -> plaintext */ tmp = ast_calloc(1, len); /* requires a tmp buffer for the base64 decode */ tmpP = tmp; encrypt = strcmp("AES_DECRYPT", cmd); /* -1 if encrypting, 0 if decrypting */ @@ -120,9 +120,9 @@ static int aes_helper(struct ast_channel *chan, const char *cmd, char *data, memset(curblock, 0, AES_BLOCK_SIZE); memcpy(curblock, tmpP, (data_len < AES_BLOCK_SIZE) ? data_len : AES_BLOCK_SIZE); if (encrypt) { - ast_aes_encrypt(curblock, tmpP, &ecx); + ast_aes_encrypt(curblock, (unsigned char *) tmpP, &ecx); } else { - ast_aes_decrypt(curblock, tmpP, &dcx); + ast_aes_decrypt(curblock, (unsigned char *) tmpP, &dcx); } tmpP += AES_BLOCK_SIZE; data_len -= AES_BLOCK_SIZE; |