argon2 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rubocop.yml +16 -0
  3. data/.github/workflows/ruby.yml +32 -0
  4. data/.rubocop.yml +150 -5
  5. data/Changelog.md +3 -0
  6. data/Gemfile +2 -0
  7. data/README.md +8 -7
  8. data/Rakefile +2 -0
  9. data/argon2.gemspec +9 -6
  10. data/bin/console +1 -0
  11. data/ext/argon2_wrap/argon_wrap.c +2 -0
  12. data/ext/argon2_wrap/extconf.rb +1 -0
  13. data/ext/phc-winner-argon2/.gitignore +1 -0
  14. data/ext/phc-winner-argon2/Argon2.sln +2 -4
  15. data/ext/phc-winner-argon2/LICENSE +2 -2
  16. data/ext/phc-winner-argon2/Makefile +86 -18
  17. data/ext/phc-winner-argon2/README.md +3 -1
  18. data/ext/phc-winner-argon2/include/argon2.h +3 -3
  19. data/ext/phc-winner-argon2/libargon2.pc.in +18 -0
  20. data/ext/phc-winner-argon2/src/argon2.c +2 -2
  21. data/ext/phc-winner-argon2/src/bench.c +4 -4
  22. data/ext/phc-winner-argon2/src/blake2/blake2-impl.h +3 -3
  23. data/ext/phc-winner-argon2/src/blake2/blake2.h +2 -2
  24. data/ext/phc-winner-argon2/src/blake2/blake2b.c +2 -2
  25. data/ext/phc-winner-argon2/src/blake2/blamka-round-opt.h +2 -2
  26. data/ext/phc-winner-argon2/src/blake2/blamka-round-ref.h +2 -2
  27. data/ext/phc-winner-argon2/src/core.c +20 -6
  28. data/ext/phc-winner-argon2/src/core.h +2 -2
  29. data/ext/phc-winner-argon2/src/encoding.c +2 -2
  30. data/ext/phc-winner-argon2/src/encoding.h +2 -2
  31. data/ext/phc-winner-argon2/src/genkat.c +9 -3
  32. data/ext/phc-winner-argon2/src/genkat.h +2 -2
  33. data/ext/phc-winner-argon2/src/opt.c +2 -2
  34. data/ext/phc-winner-argon2/src/ref.c +2 -2
  35. data/ext/phc-winner-argon2/src/run.c +2 -2
  36. data/ext/phc-winner-argon2/src/test.c +2 -2
  37. data/ext/phc-winner-argon2/src/thread.c +2 -2
  38. data/ext/phc-winner-argon2/src/thread.h +2 -2
  39. data/ext/phc-winner-argon2/vs2015/Argon2Opt/Argon2Opt.vcxproj +11 -6
  40. data/ext/phc-winner-argon2/vs2015/Argon2OptBench/Argon2OptBench.vcxproj +11 -6
  41. data/ext/phc-winner-argon2/vs2015/Argon2OptDll/Argon2OptDll.vcxproj +11 -6
  42. data/ext/phc-winner-argon2/vs2015/Argon2OptGenKAT/Argon2OptGenKAT.vcxproj +11 -6
  43. data/ext/phc-winner-argon2/vs2015/Argon2OptTestCI/Argon2OptTestCI.vcxproj +16 -8
  44. data/ext/phc-winner-argon2/vs2015/Argon2Ref/Argon2Ref.vcxproj +25 -8
  45. data/ext/phc-winner-argon2/vs2015/Argon2RefBench/Argon2RefBench.vcxproj +11 -6
  46. data/ext/phc-winner-argon2/vs2015/Argon2RefDll/Argon2RefDll.vcxproj +11 -6
  47. data/ext/phc-winner-argon2/vs2015/Argon2RefGenKAT/Argon2RefGenKAT.vcxproj +11 -6
  48. data/ext/phc-winner-argon2/vs2015/Argon2RefTestCI/Argon2RefTestCI.vcxproj +11 -6
  49. data/lib/argon2.rb +4 -2
  50. data/lib/argon2/ffi_engine.rb +31 -21
  51. data/lib/argon2/version.rb +1 -1
  52. metadata +40 -31
  53. data/.travis.yml +0 -13
  54. data/ext/phc-winner-argon2/libargon2.pc +0 -16
@@ -243,6 +243,7 @@ Argon2i 1 iterations 4096 MiB 4 threads: 2.72 cpb 11124.86 Mcycles
243
243
  Bindings are available for the following languages (make sure to read
244
244
  their documentation):
245
245
 
246
+ * [Android (Java/Kotlin)](https://github.com/lambdapioneer/argon2kt) by [@lambdapioneer](https://github.com/lambdapioneer)
246
247
  * [Elixir](https://github.com/riverrun/argon2_elixir) by [@riverrun](https://github.com/riverrun)
247
248
  * [Erlang](https://github.com/ergenius/eargon2) by [@ergenius](https://github.com/ergenius)
248
249
  * [Go](https://github.com/tvdburgt/go-argon2) by [@tvdburgt](https://github.com/tvdburgt)
@@ -259,6 +260,7 @@ their documentation):
259
260
  * [Python (native)](https://pypi.python.org/pypi/argon2), by [@flamewow](https://github.com/flamewow)
260
261
  * [Python (ffi)](https://pypi.python.org/pypi/argon2_cffi), by [@hynek](https://github.com/hynek)
261
262
  * [Python (ffi, with keyed hashing)](https://github.com/thusoy/porridge), by [@thusoy](https://github.com/thusoy)
263
+ * [Python (ffi, with keyed hashing)](https://github.com/ultrahorizon/pyargon2), by [@ultrahorizon](https://github.com/ultrahorizon)
262
264
  * [R](https://cran.r-project.org/package=argon2) by [@wrathematics](https://github.com/wrathematics)
263
265
  * [Ruby](https://github.com/technion/ruby-argon2) by [@technion](https://github.com/technion)
264
266
  * [Rust](https://github.com/quininer/argon2-rs) by [@quininer](https://github.com/quininer)
@@ -283,7 +285,7 @@ Except for the components listed below, the Argon2 code in this
283
285
  repository is copyright (c) 2015 Daniel Dinu, Dmitry Khovratovich (main
284
286
  authors), Jean-Philippe Aumasson and Samuel Neves, and dual licensed under the
285
287
  [CC0 License](https://creativecommons.org/about/cc0) and the
286
- [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0). For more info
288
+ [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0). For more info
287
289
  see the LICENSE file.
288
290
 
289
291
  The string encoding routines in [`src/encoding.c`](src/encoding.c) are
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -30,7 +30,7 @@ extern "C" {
30
30
  #ifdef A2_VISCTL
31
31
  #define ARGON2_PUBLIC __attribute__((visibility("default")))
32
32
  #define ARGON2_LOCAL __attribute__ ((visibility ("hidden")))
33
- #elif _MSC_VER
33
+ #elif defined(_MSC_VER)
34
34
  #define ARGON2_PUBLIC __declspec(dllexport)
35
35
  #define ARGON2_LOCAL
36
36
  #else
@@ -0,0 +1,18 @@
1
+ # libargon2 info for pkg-config
2
+ ## Template for downstream installers:
3
+ ## - replace @UPSTREAM_VER@ with current version, e.g. '20160406'
4
+ ## - replace @HOST_MULTIARCH@ with target arch lib, e.g. 'lib', 'lib/x86_64-linux-gnu' or 'lib64'
5
+ ## - replace @PREFIX@ with install path, e.g. '/usr', '/usr/local', '/usr/pkg'
6
+ ## - replace @INCLUDE@ with incluse path, e.g. 'include' or 'include/argon2'
7
+
8
+ prefix=@PREFIX@
9
+ exec_prefix=${prefix}
10
+ libdir=${prefix}/@HOST_MULTIARCH@
11
+ includedir=${prefix}/@INCLUDE@
12
+
13
+ Name: libargon2
14
+ Description: Development libraries for libargon2
15
+ Version: @UPSTREAM_VER@
16
+ Libs: -L${libdir} -largon2 @EXTRA_LIBS@
17
+ Cflags: -I${includedir}
18
+ URL: https://github.com/P-H-C/phc-winner-argon2
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -20,14 +20,14 @@
20
20
  #include <stdlib.h>
21
21
  #include <string.h>
22
22
  #include <time.h>
23
- #ifdef _MSC_VER
23
+ #ifdef _WIN32
24
24
  #include <intrin.h>
25
25
  #endif
26
26
 
27
27
  #include "argon2.h"
28
28
 
29
29
  static uint64_t rdtsc(void) {
30
- #ifdef _MSC_VER
30
+ #ifdef _WIN32
31
31
  return __rdtsc();
32
32
  #else
33
33
  #if defined(__amd64__) || defined(__x86_64__)
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -21,7 +21,7 @@
21
21
  #include <stdint.h>
22
22
  #include <string.h>
23
23
 
24
- #if defined(_MSC_VER)
24
+ #ifdef _WIN32
25
25
  #define BLAKE2_INLINE __inline
26
26
  #elif defined(__GNUC__) || defined(__clang__)
27
27
  #define BLAKE2_INLINE __inline__
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -8,15 +8,15 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
16
16
  */
17
17
 
18
18
  /*For memory wiping*/
19
- #ifdef _MSC_VER
19
+ #ifdef _WIN32
20
20
  #include <windows.h>
21
21
  #include <winbase.h> /* For SecureZeroMemory */
22
22
  #endif
@@ -25,6 +25,9 @@
25
25
  #endif
26
26
  #define VC_GE_2005(version) (version >= 1400)
27
27
 
28
+ /* for explicit_bzero() on glibc */
29
+ #define _DEFAULT_SOURCE
30
+
28
31
  #include <stdio.h>
29
32
  #include <stdlib.h>
30
33
  #include <string.h>
@@ -120,12 +123,20 @@ void free_memory(const argon2_context *context, uint8_t *memory,
120
123
  }
121
124
  }
122
125
 
126
+ #if defined(__OpenBSD__)
127
+ #define HAVE_EXPLICIT_BZERO 1
128
+ #elif defined(__GLIBC__) && defined(__GLIBC_PREREQ)
129
+ #if __GLIBC_PREREQ(2,25)
130
+ #define HAVE_EXPLICIT_BZERO 1
131
+ #endif
132
+ #endif
133
+
123
134
  void NOT_OPTIMIZED secure_wipe_memory(void *v, size_t n) {
124
- #if defined(_MSC_VER) && VC_GE_2005(_MSC_VER)
135
+ #if defined(_MSC_VER) && VC_GE_2005(_MSC_VER) || defined(__MINGW32__)
125
136
  SecureZeroMemory(v, n);
126
137
  #elif defined memset_s
127
138
  memset_s(v, n, 0, n);
128
- #elif defined(__OpenBSD__)
139
+ #elif defined(HAVE_EXPLICIT_BZERO)
129
140
  explicit_bzero(v, n);
130
141
  #else
131
142
  static void *(*const volatile memset_sec)(void *, int, size_t) = &memset;
@@ -299,7 +310,7 @@ static int fill_memory_blocks_mt(argon2_instance_t *instance) {
299
310
 
300
311
  for (r = 0; r < instance->passes; ++r) {
301
312
  for (s = 0; s < ARGON2_SYNC_POINTS; ++s) {
302
- uint32_t l;
313
+ uint32_t l, ll;
303
314
 
304
315
  /* 2. Calling threads */
305
316
  for (l = 0; l < instance->lanes; ++l) {
@@ -324,6 +335,9 @@ static int fill_memory_blocks_mt(argon2_instance_t *instance) {
324
335
  sizeof(argon2_position_t));
325
336
  if (argon2_thread_create(&thread[l], &fill_segment_thr,
326
337
  (void *)&thr_data[l])) {
338
+ /* Wait for already running threads */
339
+ for (ll = 0; ll < l; ++ll)
340
+ argon2_thread_join(thread[ll]);
327
341
  rc = ARGON2_THREAD_FAIL;
328
342
  goto fail;
329
343
  }
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -20,6 +20,12 @@
20
20
  #include <string.h>
21
21
  #include "argon2.h"
22
22
  #include "core.h"
23
+ #ifdef __MINGW32__
24
+ #include <inttypes.h>
25
+ #else
26
+ /* Don't use <inttypes.h> (it's not C89) */
27
+ #define PRIx64 "llx"
28
+ #endif
23
29
 
24
30
  void initial_kat(const uint8_t *blockhash, const argon2_context *context,
25
31
  argon2_type type) {
@@ -115,7 +121,7 @@ void internal_kat(const argon2_instance_t *instance, uint32_t pass) {
115
121
  : ARGON2_QWORDS_IN_BLOCK;
116
122
 
117
123
  for (j = 0; j < how_many_words; ++j)
118
- printf("Block %.4u [%3u]: %016llx\n", i, j,
124
+ printf("Block %.4u [%3u]: %016" PRIx64 "\n", i, j,
119
125
  (unsigned long long)instance->memory[i].v[j]);
120
126
  }
121
127
  }
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -8,8 +8,8 @@
8
8
  * License/Waiver or the Apache Public License 2.0, at your option. The terms of
9
9
  * these licenses can be found at:
10
10
  *
11
- * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
12
- * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
11
+ * - CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
12
+ * - Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
13
13
  *
14
14
  * You should have received a copy of both of these licenses along with this
15
15
  * software. If not, they may be obtained at the above URLs.
@@ -32,43 +32,44 @@
32
32
  <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
33
33
  </PropertyGroup>
34
34
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
35
+ <!-- Set DefaultPlatformToolset to v100 (VS2010) if not defined -->
36
+ <PropertyGroup Label="EmptyDefaultPlatformToolset">
37
+ <DefaultPlatformToolset Condition=" '$(DefaultPlatformToolset)' == '' ">v100</DefaultPlatformToolset>
38
+ </PropertyGroup>
39
+ <PropertyGroup Label="PlatformToolset">
40
+ <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
41
+ </PropertyGroup>
35
42
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
36
43
  <ConfigurationType>Application</ConfigurationType>
37
44
  <UseDebugLibraries>true</UseDebugLibraries>
38
- <PlatformToolset>v140</PlatformToolset>
39
45
  <CharacterSet>MultiByte</CharacterSet>
40
46
  </PropertyGroup>
41
47
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
42
48
  <ConfigurationType>Application</ConfigurationType>
43
49
  <UseDebugLibraries>false</UseDebugLibraries>
44
- <PlatformToolset>v140</PlatformToolset>
45
50
  <WholeProgramOptimization>true</WholeProgramOptimization>
46
51
  <CharacterSet>MultiByte</CharacterSet>
47
52
  </PropertyGroup>
48
53
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'" Label="Configuration">
49
54
  <ConfigurationType>Application</ConfigurationType>
50
55
  <UseDebugLibraries>false</UseDebugLibraries>
51
- <PlatformToolset>v140</PlatformToolset>
52
56
  <WholeProgramOptimization>true</WholeProgramOptimization>
53
57
  <CharacterSet>MultiByte</CharacterSet>
54
58
  </PropertyGroup>
55
59
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
56
60
  <ConfigurationType>Application</ConfigurationType>
57
61
  <UseDebugLibraries>true</UseDebugLibraries>
58
- <PlatformToolset>v140</PlatformToolset>
59
62
  <CharacterSet>MultiByte</CharacterSet>
60
63
  </PropertyGroup>
61
64
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
62
65
  <ConfigurationType>Application</ConfigurationType>
63
66
  <UseDebugLibraries>false</UseDebugLibraries>
64
- <PlatformToolset>v140</PlatformToolset>
65
67
  <WholeProgramOptimization>true</WholeProgramOptimization>
66
68
  <CharacterSet>MultiByte</CharacterSet>
67
69
  </PropertyGroup>
68
70
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="Configuration">
69
71
  <ConfigurationType>Application</ConfigurationType>
70
72
  <UseDebugLibraries>false</UseDebugLibraries>
71
- <PlatformToolset>v140</PlatformToolset>
72
73
  <WholeProgramOptimization>true</WholeProgramOptimization>
73
74
  <CharacterSet>MultiByte</CharacterSet>
74
75
  </PropertyGroup>
@@ -154,6 +155,7 @@
154
155
  <Link>
155
156
  <EnableCOMDATFolding>true</EnableCOMDATFolding>
156
157
  <OptimizeReferences>true</OptimizeReferences>
158
+ <GenerateDebugInformation>true</GenerateDebugInformation>
157
159
  </Link>
158
160
  </ItemDefinitionGroup>
159
161
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">
@@ -169,6 +171,7 @@
169
171
  <Link>
170
172
  <EnableCOMDATFolding>true</EnableCOMDATFolding>
171
173
  <OptimizeReferences>true</OptimizeReferences>
174
+ <GenerateDebugInformation>true</GenerateDebugInformation>
172
175
  </Link>
173
176
  </ItemDefinitionGroup>
174
177
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -183,6 +186,7 @@
183
186
  <Link>
184
187
  <EnableCOMDATFolding>true</EnableCOMDATFolding>
185
188
  <OptimizeReferences>true</OptimizeReferences>
189
+ <GenerateDebugInformation>true</GenerateDebugInformation>
186
190
  </Link>
187
191
  </ItemDefinitionGroup>
188
192
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">
@@ -198,6 +202,7 @@
198
202
  <Link>
199
203
  <EnableCOMDATFolding>true</EnableCOMDATFolding>
200
204
  <OptimizeReferences>true</OptimizeReferences>
205
+ <GenerateDebugInformation>true</GenerateDebugInformation>
201
206
  </Link>
202
207
  </ItemDefinitionGroup>
203
208
  <ItemGroup>