From 173ad74d3ea137d27f351861b2fc977ee0a3c413 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Sun, 2 Nov 2014 22:35:36 -0800 Subject: [PATCH 1/5] Fix integer narrowing warnings in tests. --- test/default/box_easy2.c | 4 ++-- test/default/generichash.c | 2 +- test/default/generichash2.c | 2 +- test/default/generichash3.c | 2 +- test/default/pwhash.c | 7 ++----- test/default/secretbox_easy2.c | 4 ++-- test/default/shorthash.c | 2 +- 7 files changed, 10 insertions(+), 13 deletions(-) diff --git a/test/default/box_easy2.c b/test/default/box_easy2.c index 9feea81c..2d5bf998 100644 --- a/test/default/box_easy2.c +++ b/test/default/box_easy2.c @@ -14,12 +14,12 @@ unsigned char mac[crypto_box_MACBYTES]; int main(void) { - unsigned long long mlen; + uint32_t mlen; unsigned long long i; crypto_box_keypair(alicepk, alicesk); crypto_box_keypair(bobpk, bobsk); - mlen = (unsigned long long)randombytes_uniform((uint32_t)sizeof m); + mlen = randombytes_uniform((uint32_t)sizeof m); randombytes_buf(m, mlen); randombytes_buf(nonce, sizeof nonce); crypto_box_easy(c, m, mlen, nonce, bobpk, alicesk); diff --git a/test/default/generichash.c b/test/default/generichash.c index 71c12e44..d6d3afee 100644 --- a/test/default/generichash.c +++ b/test/default/generichash.c @@ -7,7 +7,7 @@ int main(void) #define MAXLEN 64 unsigned char in[MAXLEN], out[crypto_generichash_BYTES_MAX], k[crypto_generichash_KEYBYTES_MAX]; - size_t h, i, j; + unsigned char h, i, j; for (h = 0; h < crypto_generichash_KEYBYTES_MAX; ++h) k[h] = h; diff --git a/test/default/generichash2.c b/test/default/generichash2.c index cd9c889c..5984d7fd 100644 --- a/test/default/generichash2.c +++ b/test/default/generichash2.c @@ -8,7 +8,7 @@ int main(void) crypto_generichash_state st; unsigned char in[MAXLEN], out[crypto_generichash_BYTES_MAX], k[crypto_generichash_KEYBYTES_MAX]; - size_t h, i, j; + unsigned char h, i, j; for (h = 0; h < crypto_generichash_KEYBYTES_MAX; ++h) k[h] = h; diff --git a/test/default/generichash3.c b/test/default/generichash3.c index dca852d5..36d6203b 100644 --- a/test/default/generichash3.c +++ b/test/default/generichash3.c @@ -14,7 +14,7 @@ int main(void) '3', '7', '4', '0', '0', 'd', '2', 'a' }; unsigned char in[MAXLEN], out[crypto_generichash_blake2b_BYTES_MAX], k[crypto_generichash_blake2b_KEYBYTES_MAX]; - size_t h, i, j; + unsigned char h, i, j; for (h = 0; h < crypto_generichash_blake2b_KEYBYTES_MAX; ++h) k[h] = h; diff --git a/test/default/pwhash.c b/test/default/pwhash.c index f61214ff..e3a83f5c 100644 --- a/test/default/pwhash.c +++ b/test/default/pwhash.c @@ -8,7 +8,7 @@ static void tv(void) const char *passwd_hex; unsigned long long passwdlen; const char *salt_hex; - unsigned long long outlen; + size_t outlen; unsigned long long opslimit; size_t memlimit; } tests[] = { @@ -114,7 +114,7 @@ static void tv2(void) const char *passwd_hex; unsigned long long passwdlen; const char *salt_hex; - unsigned long long outlen; + size_t outlen; unsigned long long opslimit; size_t memlimit; } tests[] = { @@ -285,11 +285,8 @@ int main(void) { char str_out[crypto_pwhash_scryptsalsa208sha256_STRBYTES]; char str_out2[crypto_pwhash_scryptsalsa208sha256_STRBYTES]; - unsigned char out[OUT_LEN]; - char out_hex[OUT_LEN * 2 + 1]; const char *salt = "[<~A 32-bytes salt for scrypt~>]"; const char *passwd = "Correct Horse Battery Staple"; - size_t i; tv(); tv2(); diff --git a/test/default/secretbox_easy2.c b/test/default/secretbox_easy2.c index 99e1b097..b1d24597 100644 --- a/test/default/secretbox_easy2.c +++ b/test/default/secretbox_easy2.c @@ -11,11 +11,11 @@ unsigned char mac[crypto_secretbox_MACBYTES]; int main(void) { - unsigned long long mlen; + uint32_t mlen; unsigned long long i; randombytes_buf(k, sizeof k); - mlen = (unsigned long long)randombytes_uniform((uint32_t)sizeof m); + mlen = randombytes_uniform((uint32_t)sizeof m); randombytes_buf(m, mlen); randombytes_buf(nonce, sizeof nonce); crypto_secretbox_easy(c, m, mlen, nonce, k); diff --git a/test/default/shorthash.c b/test/default/shorthash.c index 18081cd0..9918ef21 100644 --- a/test/default/shorthash.c +++ b/test/default/shorthash.c @@ -7,7 +7,7 @@ int main(void) #define MAXLEN 64 unsigned char in[MAXLEN], out[crypto_shorthash_BYTES], k[crypto_shorthash_KEYBYTES]; - size_t i, j; + unsigned char i, j; for (i = 0; i < crypto_shorthash_KEYBYTES; ++i) k[i] = i; From 72af365edcb90c32d3fb4f995845fa80a2050de3 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Sun, 2 Nov 2014 22:36:21 -0800 Subject: [PATCH 2/5] Revert changes to common props. --- builds/msvc/properties/Common.props | 4 +--- builds/msvc/properties/Release.props | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builds/msvc/properties/Common.props b/builds/msvc/properties/Common.props index 6e10d886..72588d6e 100644 --- a/builds/msvc/properties/Common.props +++ b/builds/msvc/properties/Common.props @@ -14,10 +14,8 @@ true UNICODE;_UNICODE;%(PreprocessorDefinitions) - NATIVE_LITTLE_ENDIAN=1;%(PreprocessorDefinitions) - inline=__inline;%(PreprocessorDefinitions) Level3 - + \ No newline at end of file diff --git a/builds/msvc/properties/Release.props b/builds/msvc/properties/Release.props index 296dbfe3..1c5415bc 100644 --- a/builds/msvc/properties/Release.props +++ b/builds/msvc/properties/Release.props @@ -20,8 +20,10 @@ OnlyExplicitInline false MaxSpeed + NDEBUG;%(PreprocessorDefinitions) + NDEBUG;%(PreprocessorDefinitions) true @@ -36,4 +38,4 @@ - + \ No newline at end of file From ebeafff62f1280cf22eb77a0371ed5df9b5281cd Mon Sep 17 00:00:00 2001 From: evoskuil Date: Sun, 2 Nov 2014 22:37:34 -0800 Subject: [PATCH 3/5] Bump VS dll resource version to 1.0.1.0 --- builds/msvc/resource.rc | Bin 4616 -> 4616 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/builds/msvc/resource.rc b/builds/msvc/resource.rc index 39dfb3b3fca66a8a51cbb66d124fb8829c7add39..74b9cd683cdcd6090dc9163db6145fae7f9a859e 100644 GIT binary patch delta 85 zcmeBB=}_6w#ldOFpu=DQ#D NpUlB0w3vgB1pxZx5Rw1@ From 34c71ac38adacdfb19da6fc79bb4add1f416b03e Mon Sep 17 00:00:00 2001 From: evoskuil Date: Sun, 2 Nov 2014 22:38:13 -0800 Subject: [PATCH 4/5] Add/remove tests from VS test projects. --- builds/msvc/vs2010/test/test.vcxproj | 18 ++++++++++++------ builds/msvc/vs2010/test/test.vcxproj.filters | 20 +++++++++++++------- builds/msvc/vs2012/test/test.vcxproj | 18 ++++++++++++------ builds/msvc/vs2012/test/test.vcxproj.filters | 20 +++++++++++++------- builds/msvc/vs2013/test/test.vcxproj | 18 ++++++++++++------ builds/msvc/vs2013/test/test.vcxproj.filters | 20 +++++++++++++------- 6 files changed, 75 insertions(+), 39 deletions(-) diff --git a/builds/msvc/vs2010/test/test.vcxproj b/builds/msvc/vs2010/test/test.vcxproj index 4c8f9315..953995fe 100644 --- a/builds/msvc/vs2010/test/test.vcxproj +++ b/builds/msvc/vs2010/test/test.vcxproj @@ -64,9 +64,12 @@ - + false + + true + true @@ -76,6 +79,12 @@ true + + true + + + true + true @@ -211,10 +220,7 @@ true - - true - - + true @@ -223,4 +229,4 @@ - + \ No newline at end of file diff --git a/builds/msvc/vs2010/test/test.vcxproj.filters b/builds/msvc/vs2010/test/test.vcxproj.filters index 42b85288..4643541b 100644 --- a/builds/msvc/vs2010/test/test.vcxproj.filters +++ b/builds/msvc/vs2010/test/test.vcxproj.filters @@ -142,18 +142,24 @@ src - - src - - - src - src src + + src + + + src + + + src + + + src + @@ -171,4 +177,4 @@ {5b5af4b5-c6aa-4b30-bdef-074b1bdc43ea} - + \ No newline at end of file diff --git a/builds/msvc/vs2012/test/test.vcxproj b/builds/msvc/vs2012/test/test.vcxproj index dcde649b..6ae0a575 100644 --- a/builds/msvc/vs2012/test/test.vcxproj +++ b/builds/msvc/vs2012/test/test.vcxproj @@ -64,9 +64,12 @@ - + false + + true + true @@ -76,6 +79,12 @@ true + + true + + + true + true @@ -211,10 +220,7 @@ true - - true - - + true @@ -223,4 +229,4 @@ - + \ No newline at end of file diff --git a/builds/msvc/vs2012/test/test.vcxproj.filters b/builds/msvc/vs2012/test/test.vcxproj.filters index 42b85288..4643541b 100644 --- a/builds/msvc/vs2012/test/test.vcxproj.filters +++ b/builds/msvc/vs2012/test/test.vcxproj.filters @@ -142,18 +142,24 @@ src - - src - - - src - src src + + src + + + src + + + src + + + src + @@ -171,4 +177,4 @@ {5b5af4b5-c6aa-4b30-bdef-074b1bdc43ea} - + \ No newline at end of file diff --git a/builds/msvc/vs2013/test/test.vcxproj b/builds/msvc/vs2013/test/test.vcxproj index 04f12bc2..70315965 100644 --- a/builds/msvc/vs2013/test/test.vcxproj +++ b/builds/msvc/vs2013/test/test.vcxproj @@ -64,9 +64,12 @@ - + false + + true + true @@ -76,6 +79,12 @@ true + + true + + + true + true @@ -211,10 +220,7 @@ true - - true - - + true @@ -223,4 +229,4 @@ - + \ No newline at end of file diff --git a/builds/msvc/vs2013/test/test.vcxproj.filters b/builds/msvc/vs2013/test/test.vcxproj.filters index 42b85288..4643541b 100644 --- a/builds/msvc/vs2013/test/test.vcxproj.filters +++ b/builds/msvc/vs2013/test/test.vcxproj.filters @@ -142,18 +142,24 @@ src - - src - - - src - src src + + src + + + src + + + src + + + src + @@ -171,4 +177,4 @@ {5b5af4b5-c6aa-4b30-bdef-074b1bdc43ea} - + \ No newline at end of file From ecf86654bf56700cea5c93df0bf0da6d5d21963e Mon Sep 17 00:00:00 2001 From: evoskuil Date: Sun, 2 Nov 2014 22:38:58 -0800 Subject: [PATCH 5/5] Update NuGet packaging for 1.0.0.0 release (last published). --- packaging/nuget/package.config | 2 +- packaging/nuget/package.nuspec | 50 ++++++++++++++++----------------- packaging/nuget/package.targets | 40 +++++++++++++------------- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/packaging/nuget/package.config b/packaging/nuget/package.config index 6e68a3b6..388009a1 100644 --- a/packaging/nuget/package.config +++ b/packaging/nuget/package.config @@ -1,4 +1,4 @@ - + diff --git a/packaging/nuget/package.nuspec b/packaging/nuget/package.nuspec index f836a8a3..d0d62bc9 100644 --- a/packaging/nuget/package.nuspec +++ b/packaging/nuget/package.nuspec @@ -7,7 +7,7 @@ libsodium_vc120 - 0.7.0.0 + 1.0.0.0 libsodium_vc120 libsodium contributors Eric Voskuil @@ -40,52 +40,52 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - libsodium-x86-v120-mt-s-0_7_0_0.lib;%(AdditionalDependencies) + libsodium-x86-v120-mt-s-1_0_0_0.lib;%(AdditionalDependencies) - libsodium-x86-v120-mt-sgd-0_7_0_0.lib;%(AdditionalDependencies) + libsodium-x86-v120-mt-sgd-1_0_0_0.lib;%(AdditionalDependencies) - libsodium-x64-v120-mt-s-0_7_0_0.lib;%(AdditionalDependencies) + libsodium-x64-v120-mt-s-1_0_0_0.lib;%(AdditionalDependencies) - libsodium-x64-v120-mt-sgd-0_7_0_0.lib;%(AdditionalDependencies) + libsodium-x64-v120-mt-sgd-1_0_0_0.lib;%(AdditionalDependencies) - libsodium-x86-v120-mt-s-0_7_0_0.ltcg.lib;%(AdditionalDependencies) + libsodium-x86-v120-mt-s-1_0_0_0.ltcg.lib;%(AdditionalDependencies) - libsodium-x86-v120-mt-sgd-0_7_0_0.ltcg.lib;%(AdditionalDependencies) + libsodium-x86-v120-mt-sgd-1_0_0_0.ltcg.lib;%(AdditionalDependencies) - libsodium-x64-v120-mt-s-0_7_0_0.ltcg.lib;%(AdditionalDependencies) + libsodium-x64-v120-mt-s-1_0_0_0.ltcg.lib;%(AdditionalDependencies) - libsodium-x64-v120-mt-sgd-0_7_0_0.ltcg.lib;%(AdditionalDependencies) + libsodium-x64-v120-mt-sgd-1_0_0_0.ltcg.lib;%(AdditionalDependencies) - libsodium-x86-v120-mt-0_7_0_0.imp.lib;%(AdditionalDependencies) + libsodium-x86-v120-mt-1_0_0_0.imp.lib;%(AdditionalDependencies) - libsodium-x86-v120-mt-gd-0_7_0_0.imp.lib;%(AdditionalDependencies) + libsodium-x86-v120-mt-gd-1_0_0_0.imp.lib;%(AdditionalDependencies) - libsodium-x64-v120-mt-0_7_0_0.imp.lib;%(AdditionalDependencies) + libsodium-x64-v120-mt-1_0_0_0.imp.lib;%(AdditionalDependencies) - libsodium-x64-v120-mt-gd-0_7_0_0.imp.lib;%(AdditionalDependencies) + libsodium-x64-v120-mt-gd-1_0_0_0.imp.lib;%(AdditionalDependencies) @@ -98,26 +98,26 @@ - - + + - - + + - - + + - - + +