diff options
author | marha <marha@users.sourceforge.net> | 2011-01-23 20:17:10 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-01-23 20:17:10 +0000 |
commit | 1b639dab951fb73d5031aa0c1afb13e8480d1dae (patch) | |
tree | 4e13a4d1e4c609bd01d0bf5d65c6a8acdc3d0c50 /openssl/crypto/aes/aes_wrap.c | |
parent | 51181fb7f4d135d214974bb6611d51f21475eec8 (diff) | |
parent | b680cf39ed5bc37e0eb7eb86ad8599bf92df3f2b (diff) | |
download | vcxsrv-1b639dab951fb73d5031aa0c1afb13e8480d1dae.tar.gz vcxsrv-1b639dab951fb73d5031aa0c1afb13e8480d1dae.tar.bz2 vcxsrv-1b639dab951fb73d5031aa0c1afb13e8480d1dae.zip |
svn merge ^/branches/released .
Diffstat (limited to 'openssl/crypto/aes/aes_wrap.c')
-rw-r--r-- | openssl/crypto/aes/aes_wrap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/openssl/crypto/aes/aes_wrap.c b/openssl/crypto/aes/aes_wrap.c index 9feacd65d..e2d73d37c 100644 --- a/openssl/crypto/aes/aes_wrap.c +++ b/openssl/crypto/aes/aes_wrap.c @@ -85,9 +85,9 @@ int AES_wrap_key(AES_KEY *key, const unsigned char *iv, A[7] ^= (unsigned char)(t & 0xff); if (t > 0xff) { - A[6] ^= (unsigned char)((t & 0xff) >> 8); - A[5] ^= (unsigned char)((t & 0xff) >> 16); - A[4] ^= (unsigned char)((t & 0xff) >> 24); + A[6] ^= (unsigned char)((t >> 8) & 0xff); + A[5] ^= (unsigned char)((t >> 16) & 0xff); + A[4] ^= (unsigned char)((t >> 24) & 0xff); } memcpy(R, B + 8, 8); } @@ -119,9 +119,9 @@ int AES_unwrap_key(AES_KEY *key, const unsigned char *iv, A[7] ^= (unsigned char)(t & 0xff); if (t > 0xff) { - A[6] ^= (unsigned char)((t & 0xff) >> 8); - A[5] ^= (unsigned char)((t & 0xff) >> 16); - A[4] ^= (unsigned char)((t & 0xff) >> 24); + A[6] ^= (unsigned char)((t >> 8) & 0xff); + A[5] ^= (unsigned char)((t >> 16) & 0xff); + A[4] ^= (unsigned char)((t >> 24) & 0xff); } memcpy(B + 8, R, 8); AES_decrypt(B, B, key); |