[asterisk-commits] murf: branch group/newcdr r171824 - in /team/group/newcdr: ./ funcs/func_aes.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 27 18:23:21 CST 2009


Author: murf
Date: Tue Jan 27 18:23:20 2009
New Revision: 171824

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=171824
Log:
Merged revisions 171797 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r171797 | mmichelson | 2009-01-27 17:17:55 -0700 (Tue, 27 Jan 2009) | 3 lines

Fix some signedness problems in func_aes.c


........

Modified:
    team/group/newcdr/   (props changed)
    team/group/newcdr/funcs/func_aes.c

Propchange: team/group/newcdr/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jan 27 18:23:20 2009
@@ -1,1 +1,1 @@
-/trunk:1-171793
+/trunk:1-171815

Modified: team/group/newcdr/funcs/func_aes.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/newcdr/funcs/func_aes.c?view=diff&rev=171824&r1=171823&r2=171824
==============================================================================
--- team/group/newcdr/funcs/func_aes.c (original)
+++ team/group/newcdr/funcs/func_aes.c Tue Jan 27 18:23:20 2009
@@ -98,8 +98,8 @@
 		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 @@
 		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;




More information about the asterisk-commits mailing list