Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-03-23 13:43:09+01:00, msvensson@stripped +23 -0
Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
MERGE: 1.1810.2374.91
extra/yassl/include/buffer.hpp@stripped, 2007-03-23 13:41:24+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.7.1.2
extra/yassl/include/crypto_wrapper.hpp@stripped, 2007-03-23 13:41:24+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.6.1.2
extra/yassl/include/openssl/ssl.h@stripped, 2007-03-23 13:43:07+01:00, msvensson@stripped +0 -6
Manual merge
MERGE: 1.14.1.8
extra/yassl/include/socket_wrapper.hpp@stripped, 2007-03-23 13:43:07+01:00, msvensson@stripped +0 -1
Manual merge
MERGE: 1.11.1.1
extra/yassl/include/yassl_imp.hpp@stripped, 2007-03-23 13:41:24+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.8.1.2
extra/yassl/include/yassl_int.hpp@stripped, 2007-03-23 13:41:24+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.11.1.7
extra/yassl/src/crypto_wrapper.cpp@stripped, 2007-03-23 13:41:24+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.10.1.2
extra/yassl/src/ssl.cpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -1
Auto merged
MERGE: 1.16.1.11
extra/yassl/taocrypt/include/algebra.hpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.4.1.5
extra/yassl/taocrypt/include/des.hpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.6.1.2
extra/yassl/taocrypt/include/hash.hpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.7.1.2
extra/yassl/taocrypt/include/hmac.hpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.7.1.2
extra/yassl/taocrypt/include/modarith.hpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.4.1.2
extra/yassl/taocrypt/include/modes.hpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.9.1.2
extra/yassl/taocrypt/include/rsa.hpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.5.1.2
extra/yassl/taocrypt/include/type_traits.hpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.4.1.2
extra/yassl/taocrypt/mySTL/list.hpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.2.1.2
extra/yassl/taocrypt/src/aes.cpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.6.1.2
extra/yassl/taocrypt/src/algebra.cpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.13.1.2
extra/yassl/taocrypt/src/asn.cpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -2
Auto merged
MERGE: 1.12.1.3
extra/yassl/taocrypt/src/integer.cpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -1
Auto merged
MERGE: 1.29.1.1
extra/yassl/taocrypt/test/test.cpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.5.1.2
extra/yassl/testsuite/testsuite.cpp@stripped, 2007-03-23 13:41:25+01:00, msvensson@stripped +0 -2
Auto merged
MERGE: 1.5.1.3
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: pilot.blaudden
# Root: /home/msvensson/mysql/mysql-5.1-maint/RESYNC
--- 1.4/extra/yassl/taocrypt/mySTL/list.hpp 2007-02-23 12:23:37 +01:00
+++ 1.5/extra/yassl/taocrypt/mySTL/list.hpp 2007-03-23 13:41:25 +01:00
@@ -231,7 +231,7 @@ void list<T>::push_front(T t)
template<typename T>
void list<T>::pop_front()
{
- node* local_front = head_;
+ node* front = head_;
if (head_ == 0)
return;
@@ -241,8 +241,8 @@ void list<T>::pop_front()
head_ = head_->next_;
head_->prev_ = 0;
}
- destroy(local_front);
- FreeMemory(local_front);
+ destroy(front);
+ FreeMemory(front);
--sz_;
}
@@ -303,13 +303,13 @@ T list<T>::back() const
template<typename T>
typename list<T>::node* list<T>::look_up(T t)
{
- node* local_list = head_;
+ node* list = head_;
- if (local_list == 0) return 0;
+ if (list == 0) return 0;
- for (; local_list; local_list = local_list->next_)
- if (local_list->value_ == t)
- return local_list;
+ for (; list; list = list->next_)
+ if (list->value_ == t)
+ return list;
return 0;
}
--- 1.7/extra/yassl/taocrypt/test/test.cpp 2007-02-23 12:23:37 +01:00
+++ 1.8/extra/yassl/taocrypt/test/test.cpp 2007-03-23 13:41:25 +01:00
@@ -29,6 +29,12 @@
using TaoCrypt::byte;
using TaoCrypt::word32;
using TaoCrypt::SHA;
+using TaoCrypt::SHA256;
+using TaoCrypt::SHA224;
+#ifdef WORD64_AVAILABLE
+ using TaoCrypt::SHA512;
+ using TaoCrypt::SHA384;
+#endif
using TaoCrypt::MD5;
using TaoCrypt::MD2;
using TaoCrypt::MD4;
@@ -90,6 +96,12 @@ struct testVector {
void file_test(int, char**);
int sha_test();
+int sha256_test();
+#ifdef WORD64_AVAILABLE
+ int sha512_test();
+ int sha384_test();
+#endif
+int sha224_test();
int md5_test();
int md2_test();
int md4_test();
@@ -139,20 +151,20 @@ const byte msgTmp[] = { // "now is the t
0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20
};
-byte* global_msg = 0; // for block cipher input
-byte* global_plain = 0; // for cipher decrypt comparison
-byte* global_cipher = 0; // block output
+byte* msg = 0; // for block cipher input
+byte* plain = 0; // for cipher decrypt comparison
+byte* cipher = 0; // block output
void taocrypt_test(void* args)
{
((func_args*)args)->return_code = -1; // error state
- global_msg = NEW_TC byte[24];
- global_plain = NEW_TC byte[24];
- global_cipher = NEW_TC byte[24];
+ msg = NEW_TC byte[24];
+ plain = NEW_TC byte[24];
+ cipher = NEW_TC byte[24];
- memcpy(global_msg, msgTmp, 24);
+ memcpy(msg, msgTmp, 24);
int ret = 0;
if ( (ret = sha_test()) )
@@ -160,6 +172,30 @@ void taocrypt_test(void* args)
else
printf( "SHA test passed!\n");
+ if ( (ret = sha256_test()) )
+ err_sys("SHA-256 test failed!\n", ret);
+ else
+ printf( "SHA-256 test passed!\n");
+
+ if ( (ret = sha224_test()) )
+ err_sys("SHA-224 test failed!\n", ret);
+ else
+ printf( "SHA-224 test passed!\n");
+
+#ifdef WORD64_AVAILABLE
+
+ if ( (ret = sha512_test()) )
+ err_sys("SHA-512 test failed!\n", ret);
+ else
+ printf( "SHA-512 test passed!\n");
+
+ if ( (ret = sha384_test()) )
+ err_sys("SHA-384 test failed!\n", ret);
+ else
+ printf( "SHA-384 test passed!\n");
+
+#endif
+
if ( (ret = md5_test()) )
err_sys("MD5 test failed!\n", ret);
else
@@ -237,9 +273,9 @@ void taocrypt_test(void* args)
printf( "PKCS12 test passed!\n");
*/
- tcArrayDelete(global_cipher);
- tcArrayDelete(global_plain);
- tcArrayDelete(global_msg);
+ tcArrayDelete(cipher);
+ tcArrayDelete(plain);
+ tcArrayDelete(msg);
((func_args*)args)->return_code = ret;
}
@@ -328,6 +364,136 @@ int sha_test()
}
+int sha256_test()
+{
+ SHA256 sha;
+ byte hash[SHA256::DIGEST_SIZE];
+
+ testVector test_sha[] =
+ {
+ testVector("abc",
+ "\xBA\x78\x16\xBF\x8F\x01\xCF\xEA\x41\x41\x40\xDE\x5D\xAE\x22"
+ "\x23\xB0\x03\x61\xA3\x96\x17\x7A\x9C\xB4\x10\xFF\x61\xF2\x00"
+ "\x15\xAD"),
+ testVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+ "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60"
+ "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB"
+ "\x06\xC1")
+ };
+
+ int times( sizeof(test_sha) / sizeof(testVector) );
+ for (int i = 0; i < times; ++i) {
+ sha.Update(test_sha[i].input_, test_sha[i].inLen_);
+ sha.Final(hash);
+
+ if (memcmp(hash, test_sha[i].output_, SHA256::DIGEST_SIZE) != 0)
+ return -1 - i;
+ }
+
+ return 0;
+}
+
+
+#ifdef WORD64_AVAILABLE
+
+int sha512_test()
+{
+ SHA512 sha;
+ byte hash[SHA512::DIGEST_SIZE];
+
+ testVector test_sha[] =
+ {
+ testVector("abc",
+ "\xdd\xaf\x35\xa1\x93\x61\x7a\xba\xcc\x41\x73\x49\xae\x20\x41"
+ "\x31\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2\x0a\x9e\xee\xe6\x4b\x55"
+ "\xd3\x9a\x21\x92\x99\x2a\x27\x4f\xc1\xa8\x36\xba\x3c\x23\xa3"
+ "\xfe\xeb\xbd\x45\x4d\x44\x23\x64\x3c\xe8\x0e\x2a\x9a\xc9\x4f"
+ "\xa5\x4c\xa4\x9f"),
+ testVector("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi"
+ "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
+ "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14"
+ "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88"
+ "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4"
+ "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b"
+ "\x87\x4b\xe9\x09")
+ };
+
+ int times( sizeof(test_sha) / sizeof(testVector) );
+ for (int i = 0; i < times; ++i) {
+ sha.Update(test_sha[i].input_, test_sha[i].inLen_);
+ sha.Final(hash);
+
+ if (memcmp(hash, test_sha[i].output_, SHA512::DIGEST_SIZE) != 0)
+ return -1 - i;
+ }
+
+ return 0;
+}
+
+
+int sha384_test()
+{
+ SHA384 sha;
+ byte hash[SHA384::DIGEST_SIZE];
+
+ testVector test_sha[] =
+ {
+ testVector("abc",
+ "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b\xb5\xa0\x3d\x69\x9a\xc6\x50"
+ "\x07\x27\x2c\x32\xab\x0e\xde\xd1\x63\x1a\x8b\x60\x5a\x43\xff"
+ "\x5b\xed\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34"
+ "\xc8\x25\xa7"),
+ testVector("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi"
+ "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
+ "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b"
+ "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0"
+ "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91"
+ "\x74\x60\x39")
+ };
+
+ int times( sizeof(test_sha) / sizeof(testVector) );
+ for (int i = 0; i < times; ++i) {
+ sha.Update(test_sha[i].input_, test_sha[i].inLen_);
+ sha.Final(hash);
+
+ if (memcmp(hash, test_sha[i].output_, SHA384::DIGEST_SIZE) != 0)
+ return -1 - i;
+ }
+
+ return 0;
+}
+
+#endif // WORD64_AVAILABLE
+
+
+int sha224_test()
+{
+ SHA224 sha;
+ byte hash[SHA224::DIGEST_SIZE];
+
+ testVector test_sha[] =
+ {
+ testVector("abc",
+ "\x23\x09\x7d\x22\x34\x05\xd8\x22\x86\x42\xa4\x77\xbd\xa2\x55"
+ "\xb3\x2a\xad\xbc\xe4\xbd\xa0\xb3\xf7\xe3\x6c\x9d\xa7"),
+ testVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+ "\x75\x38\x8b\x16\x51\x27\x76\xcc\x5d\xba\x5d\xa1\xfd\x89\x01"
+ "\x50\xb0\xc6\x45\x5c\xb4\xf5\x8b\x19\x52\x52\x25\x25")
+ };
+
+ int times( sizeof(test_sha) / sizeof(testVector) );
+ for (int i = 0; i < times; ++i) {
+ sha.Update(test_sha[i].input_, test_sha[i].inLen_);
+ sha.Final(hash);
+
+ if (memcmp(hash, test_sha[i].output_, SHA224::DIGEST_SIZE) != 0)
+ return -1 - i;
+ }
+
+ return 0;
+}
+
+
int md5_test()
{
MD5 md5;
@@ -606,11 +772,11 @@ int des_test()
const byte iv[] = { 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef };
enc.SetKey(key, sizeof(key));
- enc.Process(global_cipher, global_msg, sz);
+ enc.Process(cipher, msg, sz);
dec.SetKey(key, sizeof(key));
- dec.Process(global_plain, global_cipher, sz);
+ dec.Process(plain, cipher, sz);
- if (memcmp(global_plain, global_msg, sz))
+ if (memcmp(plain, msg, sz))
return -50;
const byte verify1[] =
@@ -620,7 +786,7 @@ int des_test()
0x89,0x3d,0x51,0xec,0x4b,0x56,0x3b,0x53
};
- if (memcmp(global_cipher, verify1, sz))
+ if (memcmp(cipher, verify1, sz))
return -51;
// CBC mode
@@ -628,11 +794,11 @@ int des_test()
DES_CBC_Decryption dec2;
enc2.SetKey(key, sizeof(key), iv);
- enc2.Process(global_cipher, global_msg, sz);
+ enc2.Process(cipher, msg, sz);
dec2.SetKey(key, sizeof(key), iv);
- dec2.Process(global_plain, global_cipher, sz);
+ dec2.Process(plain, cipher, sz);
- if (memcmp(global_plain, global_msg, sz))
+ if (memcmp(plain, msg, sz))
return -52;
const byte verify2[] =
@@ -642,7 +808,7 @@ int des_test()
0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b
};
- if (memcmp(global_cipher, verify2, sz))
+ if (memcmp(cipher, verify2, sz))
return -53;
// EDE3 CBC mode
@@ -664,11 +830,11 @@ int des_test()
};
enc3.SetKey(key3, sizeof(key3), iv3);
- enc3.Process(global_cipher, global_msg, sz);
+ enc3.Process(cipher, msg, sz);
dec3.SetKey(key3, sizeof(key3), iv3);
- dec3.Process(global_plain, global_cipher, sz);
+ dec3.Process(plain, cipher, sz);
- if (memcmp(global_plain, global_msg, sz))
+ if (memcmp(plain, msg, sz))
return -54;
const byte verify3[] =
@@ -678,7 +844,7 @@ int des_test()
0x18,0xbc,0xbb,0x6d,0xd2,0xb1,0x16,0xda
};
- if (memcmp(global_cipher, verify3, sz))
+ if (memcmp(cipher, verify3, sz))
return -55;
return 0;
@@ -697,10 +863,10 @@ int aes_test()
enc.SetKey(key, bs, iv);
dec.SetKey(key, bs, iv);
- enc.Process(global_cipher, global_msg, bs);
- dec.Process(global_plain, global_cipher, bs);
+ enc.Process(cipher, msg, bs);
+ dec.Process(plain, cipher, bs);
- if (memcmp(global_plain, global_msg, bs))
+ if (memcmp(plain, msg, bs))
return -60;
const byte verify[] =
@@ -709,7 +875,7 @@ int aes_test()
0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb
};
- if (memcmp(global_cipher, verify, bs))
+ if (memcmp(cipher, verify, bs))
return -61;
AES_ECB_Encryption enc2;
@@ -718,10 +884,10 @@ int aes_test()
enc2.SetKey(key, bs, iv);
dec2.SetKey(key, bs, iv);
- enc2.Process(global_cipher, global_msg, bs);
- dec2.Process(global_plain, global_cipher, bs);
+ enc2.Process(cipher, msg, bs);
+ dec2.Process(plain, cipher, bs);
- if (memcmp(global_plain, global_msg, bs))
+ if (memcmp(plain, msg, bs))
return -62;
const byte verify2[] =
@@ -730,7 +896,7 @@ int aes_test()
0xc8,0x8c,0x33,0x3b,0xb5,0x8f,0x85,0xd1
};
- if (memcmp(global_cipher, verify2, bs))
+ if (memcmp(cipher, verify2, bs))
return -63;
return 0;
@@ -749,10 +915,10 @@ int twofish_test()
enc.SetKey(key, bs, iv);
dec.SetKey(key, bs, iv);
- enc.Process(global_cipher, global_msg, bs);
- dec.Process(global_plain, global_cipher, bs);
+ enc.Process(cipher, msg, bs);
+ dec.Process(plain, cipher, bs);
- if (memcmp(global_plain, global_msg, bs))
+ if (memcmp(plain, msg, bs))
return -60;
const byte verify[] =
@@ -761,7 +927,7 @@ int twofish_test()
0x21,0x03,0x58,0x79,0x5F,0x02,0x27,0x2C
};
- if (memcmp(global_cipher, verify, bs))
+ if (memcmp(cipher, verify, bs))
return -61;
Twofish_ECB_Encryption enc2;
@@ -770,10 +936,10 @@ int twofish_test()
enc2.SetKey(key, bs, iv);
dec2.SetKey(key, bs, iv);
- enc2.Process(global_cipher, global_msg, bs);
- dec2.Process(global_plain, global_cipher, bs);
+ enc2.Process(cipher, msg, bs);
+ dec2.Process(plain, cipher, bs);
- if (memcmp(global_plain, global_msg, bs))
+ if (memcmp(plain, msg, bs))
return -62;
const byte verify2[] =
@@ -782,7 +948,7 @@ int twofish_test()
0xC4,0xCD,0x6B,0x91,0x14,0xC5,0x3A,0x09
};
- if (memcmp(global_cipher, verify2, bs))
+ if (memcmp(cipher, verify2, bs))
return -63;
return 0;
@@ -801,10 +967,10 @@ int blowfish_test()
enc.SetKey(key, 16, iv);
dec.SetKey(key, 16, iv);
- enc.Process(global_cipher, global_msg, bs * 2);
- dec.Process(global_plain, global_cipher, bs * 2);
+ enc.Process(cipher, msg, bs * 2);
+ dec.Process(plain, cipher, bs * 2);
- if (memcmp(global_plain, global_msg, bs))
+ if (memcmp(plain, msg, bs))
return -60;
const byte verify[] =
@@ -813,7 +979,7 @@ int blowfish_test()
0xBC,0xD9,0x08,0xC4,0x94,0x6C,0x89,0xA3
};
- if (memcmp(global_cipher, verify, bs))
+ if (memcmp(cipher, verify, bs))
return -61;
Blowfish_ECB_Encryption enc2;
@@ -822,10 +988,10 @@ int blowfish_test()
enc2.SetKey(key, 16, iv);
dec2.SetKey(key, 16, iv);
- enc2.Process(global_cipher, global_msg, bs * 2);
- dec2.Process(global_plain, global_cipher, bs * 2);
+ enc2.Process(cipher, msg, bs * 2);
+ dec2.Process(plain, cipher, bs * 2);
- if (memcmp(global_plain, global_msg, bs))
+ if (memcmp(plain, msg, bs))
return -62;
const byte verify2[] =
@@ -834,7 +1000,7 @@ int blowfish_test()
0x8F,0xCE,0x39,0x32,0xDE,0xD7,0xBC,0x5B
};
- if (memcmp(global_cipher, verify2, bs))
+ if (memcmp(cipher, verify2, bs))
return -63;
return 0;
--- 1.8/extra/yassl/testsuite/testsuite.cpp 2007-02-23 12:23:37 +01:00
+++ 1.9/extra/yassl/testsuite/testsuite.cpp 2007-03-23 13:41:25 +01:00
@@ -86,8 +86,8 @@ int main(int argc, char** argv)
// input output compare
byte input[TaoCrypt::MD5::DIGEST_SIZE];
byte output[TaoCrypt::MD5::DIGEST_SIZE];
- file_test((char*) "input", input);
- file_test((char*) "output", output);
+ file_test("input", input);
+ file_test("output", output);
assert(memcmp(input, output, sizeof(input)) == 0);
printf("\nAll tests passed!\n");
@@ -141,17 +141,16 @@ int test_openSSL_des()
/* test des encrypt/decrypt */
char data[] = "this is my data ";
int dataSz = strlen(data);
- DES_key_schedule local_key[3];
+ DES_key_schedule key[3];
byte iv[8];
EVP_BytesToKey(EVP_des_ede3_cbc(), EVP_md5(), NULL, (byte*)data, dataSz, 1,
- (byte*)local_key, iv);
+ (byte*)key, iv);
byte cipher[16];
- DES_ede3_cbc_encrypt((byte*)data, cipher, dataSz,
- &local_key[0], &local_key[1],
- &local_key[2], &iv, true);
+ DES_ede3_cbc_encrypt((byte*)data, cipher, dataSz, &key[0], &key[1],
+ &key[2], &iv, true);
byte plain[16];
- DES_ede3_cbc_encrypt(cipher, plain, 16, &local_key[0], &local_key[1],
- &local_key[2], &iv, false);
+ DES_ede3_cbc_encrypt(cipher, plain, 16, &key[0], &key[1], &key[2],
+ &iv, false);
return 0;
}
--- 1.9/extra/yassl/include/buffer.hpp 2007-02-23 12:23:37 +01:00
+++ 1.10/extra/yassl/include/buffer.hpp 2007-03-23 13:41:24 +01:00
@@ -49,13 +49,11 @@ const uint AUTO = 0xFEEDBEEF;
// Checking Policy should implement a check function that tests whether the
// index is within the size limit of the array
struct Check {
- Check() {}
void check(uint i, uint limit);
};
struct NoCheck {
- NoCheck() {}
void check(uint, uint);
};
@@ -193,7 +191,6 @@ inline void checked_delete(T* p)
// sets pointer to zero so safe for std conatiners
struct del_ptr_zero
{
- del_ptr_zero() {}
template <typename T>
void operator()(T*& p) const
{
--- 1.8/extra/yassl/include/crypto_wrapper.hpp 2007-02-23 12:23:37 +01:00
+++ 1.9/extra/yassl/include/crypto_wrapper.hpp 2007-03-23 13:41:24 +01:00
@@ -42,7 +42,6 @@ namespace yaSSL {
// Digest policy should implement a get_digest, update, and get sizes for pad
// and digest
struct Digest : public virtual_base {
- Digest() {}
virtual void get_digest(byte*) = 0;
virtual void get_digest(byte*, const byte*, unsigned int) = 0;
virtual void update(const byte*, unsigned int) = 0;
@@ -54,7 +53,6 @@ struct Digest : public virtual_base {
// For use with NULL Digests
struct NO_MAC : public Digest {
- NO_MAC() {}
void get_digest(byte*);
void get_digest(byte*, const byte*, unsigned int);
void update(const byte*, unsigned int);
@@ -179,7 +177,6 @@ private:
// BulkCipher policy should implement encrypt, decrypt, get block size,
// and set keys for encrypt and decrypt
struct BulkCipher : public virtual_base {
- BulkCipher() {}
virtual void encrypt(byte*, const byte*, unsigned int) = 0;
virtual void decrypt(byte*, const byte*, unsigned int) = 0;
virtual void set_encryptKey(const byte*, const byte* = 0) = 0;
@@ -193,7 +190,6 @@ struct BulkCipher : public virtual_base
// For use with NULL Ciphers
struct NO_Cipher : public BulkCipher {
- NO_Cipher() {}
void encrypt(byte*, const byte*, unsigned int) {}
void decrypt(byte*, const byte*, unsigned int) {}
void set_encryptKey(const byte*, const byte*) {}
@@ -315,14 +311,12 @@ struct Auth : public virtual_base {
virtual bool verify(const byte*, unsigned int, const byte*,
unsigned int) = 0;
virtual uint get_signatureLength() const = 0;
- Auth() {}
virtual ~Auth() {}
};
// For use with NULL Authentication schemes
struct NO_Auth : public Auth {
- NO_Auth() {}
void sign(byte*, const byte*, unsigned int, const RandomPool&) {}
bool verify(const byte*, unsigned int, const byte*, unsigned int)
{ return true; }
--- 1.24/extra/yassl/include/openssl/ssl.h 2007-02-23 21:48:11 +01:00
+++ 1.25/extra/yassl/include/openssl/ssl.h 2007-03-23 13:43:07 +01:00
@@ -33,14 +33,9 @@
#include "opensslv.h" /* for version number */
#include "rsa.h"
-#define YASSL_VERSION "1.5.8"
-#if defined(_WIN32) || defined(_WIN64)
- #include <winsock2.h>
- typedef SOCKET socket_t;
-#else
- typedef int socket_t;
-#endif
+#define YASSL_VERSION "1.6.5"
+
#if defined(__cplusplus)
extern "C" {
@@ -198,7 +193,7 @@ enum { /* ERR Constants */
SSL_CTX* SSL_CTX_new(SSL_METHOD*);
SSL* SSL_new(SSL_CTX*);
-int SSL_set_fd (SSL*, socket_t);
+int SSL_set_fd (SSL*, int);
int SSL_connect(SSL*);
int SSL_write(SSL*, const void*, int);
int SSL_read(SSL*, void*, int);
--- 1.13/extra/yassl/include/socket_wrapper.hpp 2007-02-23 21:48:11 +01:00
+++ 1.14/extra/yassl/include/socket_wrapper.hpp 2007-03-23 13:43:07 +01:00
@@ -43,7 +43,10 @@ namespace yaSSL {
typedef unsigned int uint;
-#if !defined( _WIN32) && !defined(_WIN64)
+#ifdef _WIN32
+ typedef SOCKET socket_t;
+#else
+ typedef int socket_t;
const socket_t INVALID_SOCKET = -1;
const int SD_RECEIVE = 0;
const int SD_SEND = 1;
--- 1.10/extra/yassl/include/yassl_imp.hpp 2007-02-23 12:23:37 +01:00
+++ 1.11/extra/yassl/include/yassl_imp.hpp 2007-03-23 13:41:24 +01:00
@@ -64,7 +64,6 @@ struct RecordLayerHeader {
// base for all messages
struct Message : public virtual_base {
- Message() {}
virtual input_buffer& set(input_buffer&) =0;
virtual output_buffer& get(output_buffer&) const =0;
@@ -178,7 +177,6 @@ private:
class HandShakeBase : public virtual_base {
int length_;
public:
- HandShakeBase() {}
int get_length() const;
void set_length(int);
@@ -196,7 +194,6 @@ public:
struct HelloRequest : public HandShakeBase {
- HelloRequest() {}
input_buffer& set(input_buffer& in);
output_buffer& get(output_buffer& out) const;
@@ -330,7 +327,6 @@ private:
struct ServerKeyBase : public virtual_base {
- ServerKeyBase() {}
virtual ~ServerKeyBase() {}
virtual void build(SSL&) {}
virtual void read(SSL&, input_buffer&) {}
@@ -341,21 +337,15 @@ struct ServerKeyBase : public virtual_ba
// Server random number for FORTEZZA KEA
struct Fortezza_Server : public ServerKeyBase {
- Fortezza_Server() {}
opaque r_s_[FORTEZZA_MAX];
};
struct SignatureBase : public virtual_base {
- SignatureBase() {}
virtual ~SignatureBase() {}
};
-struct anonymous_sa : public SignatureBase
-{
-public:
- anonymous_sa() {}
-};
+struct anonymous_sa : public SignatureBase {};
struct Hashes {
@@ -365,13 +355,11 @@ struct Hashes {
struct rsa_sa : public SignatureBase {
- rsa_sa() {}
Hashes hashes_;
};
struct dsa_sa : public SignatureBase {
- dsa_sa() {}
uint8 sha_[SHA_LEN];
};
@@ -399,7 +387,6 @@ private:
// Server's RSA exchange
struct RSA_Server : public ServerKeyBase {
- RSA_Server() {}
ServerRSAParams params_;
opaque* signature_; // signed rsa_sa hashes
};
@@ -474,7 +461,6 @@ struct PreMasterSecret {
struct ClientKeyBase : public virtual_base {
- ClientKeyBase() {}
virtual ~ClientKeyBase() {}
virtual void build(SSL&) {}
virtual void read(SSL&, input_buffer&) {}
@@ -505,7 +491,6 @@ private:
// Fortezza Key Parameters from page 29
// hard code lengths cause only used here
struct FortezzaKeys : public ClientKeyBase {
- FortezzaKeys() {}
opaque y_c_ [128]; // client's Yc, public value
opaque r_c_ [128]; // client's Rc
opaque y_signature_ [40]; // DSS signed public key
--- 1.19/extra/yassl/include/yassl_int.hpp 2007-02-23 12:23:37 +01:00
+++ 1.20/extra/yassl/include/yassl_int.hpp 2007-03-23 13:41:24 +01:00
@@ -228,7 +228,6 @@ struct BIGNUM {
TaoCrypt::Integer), we need to explicitly state the namespace
here to let gcc 2.96 deduce the correct type.
*/
- BIGNUM() {}
yaSSL::Integer int_;
void assign(const byte* b, uint s) { int_.assign(b,s); }
};
--- 1.12/extra/yassl/src/crypto_wrapper.cpp 2007-02-23 12:23:37 +01:00
+++ 1.13/extra/yassl/src/crypto_wrapper.cpp 2007-03-23 13:41:24 +01:00
@@ -550,7 +550,6 @@ void RandomPool::Fill(opaque* dst, uint
// Implementation of DSS Authentication
struct DSS::DSSImpl {
- DSSImpl() {}
void SetPublic (const byte*, unsigned int);
void SetPrivate(const byte*, unsigned int);
TaoCrypt::DSA_PublicKey publicKey_;
@@ -623,7 +622,6 @@ bool DSS::verify(const byte* sha_digest,
// Implementation of RSA key interface
struct RSA::RSAImpl {
- RSAImpl() {}
void SetPublic (const byte*, unsigned int);
void SetPrivate(const byte*, unsigned int);
TaoCrypt::RSA_PublicKey publicKey_;
--- 1.30/extra/yassl/src/ssl.cpp 2007-02-23 12:23:37 +01:00
+++ 1.31/extra/yassl/src/ssl.cpp 2007-03-23 13:41:25 +01:00
@@ -233,7 +233,7 @@ void SSL_free(SSL* ssl)
}
-int SSL_set_fd(SSL* ssl, socket_t fd)
+int SSL_set_fd(SSL* ssl, int fd)
{
ssl->useSocket().set_fd(fd);
return SSL_SUCCESS;
@@ -954,7 +954,7 @@ void ERR_print_errors_fp(FILE* /*fp*/)
char* ERR_error_string(unsigned long errNumber, char* buffer)
{
- static char* msg = (char*) "Please supply a buffer for error string";
+ static char* msg = "Please supply a buffer for error string";
if (buffer) {
SetErrorString(YasslError(errNumber), buffer);
--- 1.11/extra/yassl/taocrypt/include/algebra.hpp 2007-02-23 12:23:37 +01:00
+++ 1.12/extra/yassl/taocrypt/include/algebra.hpp 2007-03-23 13:41:25 +01:00
@@ -40,7 +40,6 @@ class TAOCRYPT_NO_VTABLE AbstractGroup :
public:
typedef Integer Element;
- AbstractGroup() {}
virtual ~AbstractGroup() {}
virtual bool Equal(const Element &a, const Element &b) const =0;
@@ -95,7 +94,6 @@ private:
class MultiplicativeGroupT : public AbstractGroup
{
public:
- MultiplicativeGroupT() {}
const AbstractRing& GetRing() const
{return *m_pRing;}
@@ -147,7 +145,6 @@ class TAOCRYPT_NO_VTABLE AbstractEuclide
: public AbstractRing
{
public:
- AbstractEuclideanDomain() {}
typedef Integer Element;
virtual void DivisionAlgorithm(Element &r, Element &q, const Element &a,
--- 1.8/extra/yassl/taocrypt/include/des.hpp 2007-02-23 12:23:37 +01:00
+++ 1.9/extra/yassl/taocrypt/include/des.hpp 2007-03-23 13:41:25 +01:00
@@ -41,7 +41,6 @@ enum { DES_BLOCK_SIZE = 8, DES_KEY_SIZE
class BasicDES {
public:
- BasicDES() {}
void SetKey(const byte*, word32, CipherDir dir);
void RawProcessBlock(word32&, word32&) const;
protected:
--- 1.9/extra/yassl/taocrypt/include/hash.hpp 2007-02-23 12:23:37 +01:00
+++ 1.10/extra/yassl/taocrypt/include/hash.hpp 2007-03-23 13:41:25 +01:00
@@ -31,7 +31,6 @@ namespace TaoCrypt {
// HASH
class HASH : public virtual_base {
public:
- HASH() {}
virtual ~HASH() {}
virtual void Update(const byte*, word32) = 0;
@@ -58,8 +57,7 @@ public:
word32 GetBitCountLo() const { return loLen_ << 3; }
word32 GetBitCountHi() const { return (loLen_ >> (8*sizeof(loLen_) - 3)) +
(hiLen_ << 3); }
-
- enum { MaxDigestSz = 5, MaxBufferSz = 64 };
+ enum { MaxDigestSz = 8, MaxBufferSz = 64 };
protected:
typedef word32 HashLengthType;
word32 buffLen_; // in bytes
@@ -73,6 +71,38 @@ protected:
void AddLength(word32);
};
+
+#ifdef WORD64_AVAILABLE
+
+// 64-bit HASH with Transform
+class HASH64withTransform : public HASH {
+public:
+ HASH64withTransform(word32 digSz, word32 buffSz);
+ virtual ~HASH64withTransform() {}
+ virtual ByteOrder getByteOrder() const = 0;
+ virtual word32 getPadSize() const = 0;
+
+ virtual void Update(const byte*, word32);
+ virtual void Final(byte*);
+
+ word32 GetBitCountLo() const { return loLen_ << 3; }
+ word32 GetBitCountHi() const { return (loLen_ >> (8*sizeof(loLen_) - 3)) +
+ (hiLen_ << 3); }
+ enum { MaxDigestSz = 8, MaxBufferSz = 128 };
+protected:
+ typedef word32 HashLengthType;
+ word32 buffLen_; // in bytes
+ HashLengthType loLen_; // length in bytes
+ HashLengthType hiLen_; // length in bytes
+ word64 digest_[MaxDigestSz];
+ word64 buffer_[MaxBufferSz / sizeof(word64)];
+
+ virtual void Transform() = 0;
+
+ void AddLength(word32);
+};
+
+#endif // WORD64_AVAILABLE
} // namespace
--- 1.9/extra/yassl/taocrypt/include/hmac.hpp 2007-02-23 12:23:37 +01:00
+++ 1.10/extra/yassl/taocrypt/include/hmac.hpp 2007-03-23 13:41:25 +01:00
@@ -109,11 +109,11 @@ void HMAC<T>::KeyInnerHash()
// Update
template <class T>
-void HMAC<T>::Update(const byte* msg_arg, word32 length)
+void HMAC<T>::Update(const byte* msg, word32 length)
{
if (!innerHashKeyed_)
KeyInnerHash();
- mac_.Update(msg_arg, length);
+ mac_.Update(msg, length);
}
--- 1.6/extra/yassl/taocrypt/include/modarith.hpp 2007-02-23 12:23:37 +01:00
+++ 1.7/extra/yassl/taocrypt/include/modarith.hpp 2007-03-23 13:41:25 +01:00
@@ -37,8 +37,8 @@ public:
typedef int RandomizationParameter;
typedef Integer Element;
- ModularArithmetic(const Integer &modulus_arg = Integer::One())
- : modulus(modulus_arg), result((word)0, modulus_arg.reg_.size()) {}
+ ModularArithmetic(const Integer &modulus = Integer::One())
+ : modulus(modulus), result((word)0, modulus.reg_.size()) {}
ModularArithmetic(const ModularArithmetic &ma)
: AbstractRing(),
--- 1.11/extra/yassl/taocrypt/include/modes.hpp 2007-02-23 12:23:37 +01:00
+++ 1.12/extra/yassl/taocrypt/include/modes.hpp 2007-03-23 13:41:25 +01:00
@@ -42,8 +42,8 @@ public:
{ cipher_.Process(c, p, sz); }
void SetKey(const byte* k, word32 sz)
{ cipher_.SetKey(k, sz, DIR); }
- void SetKey(const byte* k, word32 sz, const byte* iv_arg)
- { cipher_.SetKey(k, sz, DIR); cipher_.SetIV(iv_arg); }
+ void SetKey(const byte* k, word32 sz, const byte* iv)
+ { cipher_.SetKey(k, sz, DIR); cipher_.SetIV(iv); }
private:
T cipher_;
--- 1.7/extra/yassl/taocrypt/include/rsa.hpp 2007-02-23 12:23:37 +01:00
+++ 1.8/extra/yassl/taocrypt/include/rsa.hpp 2007-03-23 13:41:25 +01:00
@@ -131,7 +131,6 @@ private:
// block type 2 padding
class RSA_BlockType2 {
public:
- RSA_BlockType2() {}
void Pad(const byte*, word32, byte*, word32,
RandomNumberGenerator&) const;
word32 UnPad(const byte*, word32, byte*) const;
@@ -141,7 +140,6 @@ public:
// block type 1 padding
class RSA_BlockType1 {
public:
- RSA_BlockType1() {}
void Pad(const byte*, word32, byte*, word32,
RandomNumberGenerator&) const;
word32 UnPad(const byte*, word32, byte*) const;
@@ -176,27 +174,25 @@ public:
// Public Encrypt
template<class Pad>
-void RSA_Encryptor<Pad>::Encrypt(const byte* plain_arg, word32 sz,
- byte* cipher_arg,
- RandomNumberGenerator& rng_arg)
+void RSA_Encryptor<Pad>::Encrypt(const byte* plain, word32 sz, byte* cipher,
+ RandomNumberGenerator& rng)
{
PK_Lengths lengths(key_.GetModulus());
assert(sz <= lengths.FixedMaxPlaintextLength());
ByteBlock paddedBlock(lengths.PaddedBlockByteLength());
- padding_.Pad(plain_arg, sz, paddedBlock.get_buffer(),
- lengths.PaddedBlockBitLength(), rng_arg);
+ padding_.Pad(plain, sz, paddedBlock.get_buffer(),
+ lengths.PaddedBlockBitLength(), rng);
key_.ApplyFunction(Integer(paddedBlock.get_buffer(), paddedBlock.size())).
- Encode(cipher_arg, lengths.FixedCiphertextLength());
+ Encode(cipher, lengths.FixedCiphertextLength());
}
// Private Decrypt
template<class Pad>
-word32 RSA_Decryptor<Pad>::Decrypt(const byte* cipher_arg, word32 sz,
- byte* plain_arg,
- RandomNumberGenerator& rng_arg)
+word32 RSA_Decryptor<Pad>::Decrypt(const byte* cipher, word32 sz, byte* plain,
+ RandomNumberGenerator& rng)
{
PK_Lengths lengths(key_.GetModulus());
assert(sz == lengths.FixedCiphertextLength());
@@ -205,29 +201,29 @@ word32 RSA_Decryptor<Pad>::Decrypt(const
return 0;
ByteBlock paddedBlock(lengths.PaddedBlockByteLength());
- Integer x = key_.CalculateInverse(rng_arg, Integer(cipher_arg,
+ Integer x = key_.CalculateInverse(rng, Integer(cipher,
lengths.FixedCiphertextLength()).Ref());
if (x.ByteCount() > paddedBlock.size())
x = Integer::Zero(); // don't return false, prevents timing attack
x.Encode(paddedBlock.get_buffer(), paddedBlock.size());
return padding_.UnPad(paddedBlock.get_buffer(),
- lengths.PaddedBlockBitLength(), plain_arg);
+ lengths.PaddedBlockBitLength(), plain);
}
// Private SSL type (block 1) Encrypt
template<class Pad>
void RSA_Decryptor<Pad>::SSL_Sign(const byte* message, word32 sz, byte* sig,
- RandomNumberGenerator& rng_arg)
+ RandomNumberGenerator& rng)
{
RSA_PublicKey inverse;
inverse.Initialize(key_.GetModulus(), key_.GetPrivateExponent());
RSA_Encryptor<RSA_BlockType1> enc(inverse); // SSL Type
- enc.Encrypt(message, sz, sig, rng_arg);
+ enc.Encrypt(message, sz, sig, rng);
}
-word32 SSL_Decrypt(const RSA_PublicKey& key, const byte* sig, byte* plain_arg);
+word32 SSL_Decrypt(const RSA_PublicKey& key, const byte* sig, byte* plain);
// Public SSL type (block 1) Decrypt
@@ -235,11 +231,11 @@ template<class Pad>
bool RSA_Encryptor<Pad>::SSL_Verify(const byte* message, word32 sz,
const byte* sig)
{
- ByteBlock local_plain(PK_Lengths(key_.GetModulus()).FixedMaxPlaintextLength());
- if (SSL_Decrypt(key_, sig, local_plain.get_buffer()) != sz)
+ ByteBlock plain(PK_Lengths(key_.GetModulus()).FixedMaxPlaintextLength());
+ if (SSL_Decrypt(key_, sig, plain.get_buffer()) != sz)
return false; // not right justified or bad padding
- if ( (memcmp(local_plain.get_buffer(), message, sz)) == 0)
+ if ( (memcmp(plain.get_buffer(), message, sz)) == 0)
return true;
return false;
}
--- 1.6/extra/yassl/taocrypt/include/type_traits.hpp 2007-02-23 12:23:37 +01:00
+++ 1.7/extra/yassl/taocrypt/include/type_traits.hpp 2007-03-23 13:41:25 +01:00
@@ -62,11 +62,7 @@ MK_FUNDAMENTAL_TYPE(unsigned long)
MK_FUNDAMENTAL_TYPE(float)
MK_FUNDAMENTAL_TYPE( double)
-
-#ifdef LONG_DOUBLE_IS_DISTINCT_TYPE
-// Don't define by default as this gives warnings on power mac
- MK_FUNDAMENTAL_TYPE(long double)
-#endif
+MK_FUNDAMENTAL_TYPE(long double)
#if defined(WORD64_AVAILABLE) && defined(WORD64_IS_DISTINCT_TYPE)
MK_FUNDAMENTAL_TYPE(word64)
--- 1.8/extra/yassl/taocrypt/src/aes.cpp 2007-02-23 12:23:37 +01:00
+++ 1.9/extra/yassl/taocrypt/src/aes.cpp 2007-03-23 13:41:25 +01:00
@@ -90,14 +90,13 @@ void AES::SetKey(const byte* userKey, wo
rounds_ = keylen/4 + 6;
word32 temp, *rk = key_;
+ unsigned int i=0;
GetUserKey(BigEndianOrder, rk, keylen/4, userKey, keylen);
switch(keylen)
{
case 16:
- {
- unsigned int i=0;
while (true)
{
temp = rk[3];
@@ -115,10 +114,8 @@ void AES::SetKey(const byte* userKey, wo
rk += 4;
}
break;
- }
+
case 24:
- {
- unsigned int i=0;
while (true) // for (;;) here triggers a bug in VC60 SP4 w/ Pro Pack
{
temp = rk[ 5];
@@ -139,10 +136,7 @@ void AES::SetKey(const byte* userKey, wo
}
break;
- }
case 32:
- {
- unsigned int i=0;
while (true)
{
temp = rk[ 7];
@@ -170,7 +164,6 @@ void AES::SetKey(const byte* userKey, wo
rk += 8;
}
break;
- }
}
if (dir_ == DECRYPTION)
--- 1.15/extra/yassl/taocrypt/src/algebra.cpp 2007-02-23 12:23:37 +01:00
+++ 1.16/extra/yassl/taocrypt/src/algebra.cpp 2007-03-23 13:41:25 +01:00
@@ -186,10 +186,10 @@ Integer AbstractGroup::CascadeScalarMult
struct WindowSlider
{
- WindowSlider(const Integer &exp_arg, bool fastNegate_arg,
+ WindowSlider(const Integer &exp, bool fastNegate,
unsigned int windowSizeIn=0)
- : exp(exp_arg), windowModulus(Integer::One()), windowSize(windowSizeIn),
- windowBegin(0), fastNegate(fastNegate_arg), firstTime(true),
+ : exp(exp), windowModulus(Integer::One()), windowSize(windowSizeIn),
+ windowBegin(0), fastNegate(fastNegate), firstTime(true),
finished(false)
{
if (windowSize == 0)
--- 1.16/extra/yassl/taocrypt/src/asn.cpp 2007-02-23 12:23:37 +01:00
+++ 1.17/extra/yassl/taocrypt/src/asn.cpp 2007-03-23 13:41:25 +01:00
@@ -737,17 +737,17 @@ void CertDecoder::GetName(NameType nt)
email = true;
source_.advance(oidSz + 1);
- word32 length2 = GetLength(source_);
+ word32 length = GetLength(source_);
if (email) {
memcpy(&ptr[idx], "/emailAddress=", 14);
idx += 14;
- memcpy(&ptr[idx], source_.get_current(), length2);
- idx += length2;
+ memcpy(&ptr[idx], source_.get_current(), length);
+ idx += length;
}
- source_.advance(length2);
+ source_.advance(length);
}
}
ptr[idx++] = 0;
--- 1.30/extra/yassl/taocrypt/src/integer.cpp 2007-02-23 12:23:37 +01:00
+++ 1.31/extra/yassl/taocrypt/src/integer.cpp 2007-03-23 13:41:25 +01:00
@@ -3390,7 +3390,7 @@ void Integer::DivideByPowerOf2(Integer &
CopyWords(r.reg_.get_buffer(), a.reg_.get_buffer(), wordCount);
SetWords(r.reg_+wordCount, 0, r.reg_.size()-wordCount);
if (n % WORD_BITS != 0)
- r.reg_[wordCount-1] %= ((word) 1 << (n % WORD_BITS));
+ r.reg_[wordCount-1] %= (1 << (n % WORD_BITS));
}
else
{
| Thread |
|---|
| • bk commit into 5.1 tree (msvensson:1.2501) | msvensson | 23 Mar |