rbnacl-libsodium 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +4 -0
  3. data/lib/rbnacl/libsodium/version.rb +1 -1
  4. data/vendor/libsodium/ChangeLog +20 -1
  5. data/vendor/libsodium/Makefile.in +39 -27
  6. data/vendor/libsodium/README.markdown +2 -2
  7. data/vendor/libsodium/THANKS +2 -0
  8. data/vendor/libsodium/aclocal.m4 +36 -33
  9. data/vendor/libsodium/autom4te.cache/output.1 +1118 -841
  10. data/vendor/libsodium/autom4te.cache/output.4 +17517 -0
  11. data/vendor/libsodium/autom4te.cache/requests +760 -531
  12. data/vendor/libsodium/autom4te.cache/traces.1 +13 -14
  13. data/vendor/libsodium/autom4te.cache/traces.4 +2951 -0
  14. data/vendor/libsodium/build-aux/compile +1 -1
  15. data/vendor/libsodium/build-aux/config.guess +13 -160
  16. data/vendor/libsodium/build-aux/config.sub +25 -11
  17. data/vendor/libsodium/build-aux/depcomp +1 -1
  18. data/vendor/libsodium/build-aux/install-sh +170 -196
  19. data/vendor/libsodium/build-aux/ltmain.sh +3459 -2026
  20. data/vendor/libsodium/build-aux/missing +1 -1
  21. data/vendor/libsodium/build-aux/test-driver +12 -3
  22. data/vendor/libsodium/builds/msvc/version.h +2 -2
  23. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +1 -4
  24. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +3 -8
  25. data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj +11 -2
  26. data/vendor/libsodium/builds/msvc/vs2010/test/test.vcxproj.filters +11 -2
  27. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj +2 -5
  28. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +3 -8
  29. data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj +11 -2
  30. data/vendor/libsodium/builds/msvc/vs2012/test/test.vcxproj.filters +11 -2
  31. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +1 -4
  32. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +3 -8
  33. data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj +11 -2
  34. data/vendor/libsodium/builds/msvc/vs2013/test/test.vcxproj.filters +11 -2
  35. data/vendor/libsodium/builds/msvc/vs2015/libsodium.import.props +52 -0
  36. data/vendor/libsodium/{packaging/nuget/package.xml → builds/msvc/vs2015/libsodium.import.xml} +2 -7
  37. data/vendor/libsodium/builds/msvc/vs2015/libsodium.sln +81 -0
  38. data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.props +43 -0
  39. data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj +352 -0
  40. data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +1073 -0
  41. data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.xml +15 -0
  42. data/vendor/libsodium/builds/msvc/vs2015/test/test.props +43 -0
  43. data/vendor/libsodium/builds/msvc/vs2015/test/test.runner.bat +78 -0
  44. data/vendor/libsodium/builds/msvc/vs2015/test/test.vcxproj +241 -0
  45. data/vendor/libsodium/builds/msvc/vs2015/test/test.vcxproj.filters +189 -0
  46. data/vendor/libsodium/configure +1117 -840
  47. data/vendor/libsodium/configure.ac +4 -4
  48. data/vendor/libsodium/dist-build/Makefile.am +2 -2
  49. data/vendor/libsodium/dist-build/Makefile.in +19 -7
  50. data/vendor/libsodium/dist-build/android-arm.sh +3 -2
  51. data/vendor/libsodium/dist-build/android-armv7-a.sh +4 -0
  52. data/vendor/libsodium/dist-build/android-build.sh +4 -5
  53. data/vendor/libsodium/dist-build/android-mips32.sh +4 -0
  54. data/vendor/libsodium/dist-build/android-x86.sh +3 -2
  55. data/vendor/libsodium/dist-build/emscripten.sh +4 -5
  56. data/vendor/libsodium/dist-build/ios.sh +56 -25
  57. data/vendor/libsodium/dist-build/osx.sh +20 -0
  58. data/vendor/libsodium/libsodium.vcxproj +1 -0
  59. data/vendor/libsodium/libsodium.vcxproj.filters +3 -0
  60. data/vendor/libsodium/m4/libtool.m4 +1366 -1030
  61. data/vendor/libsodium/m4/ltoptions.m4 +90 -37
  62. data/vendor/libsodium/m4/ltsugar.m4 +4 -3
  63. data/vendor/libsodium/m4/ltversion.m4 +6 -6
  64. data/vendor/libsodium/m4/lt~obsolete.m4 +4 -3
  65. data/vendor/libsodium/msvc-scripts/Makefile.in +17 -5
  66. data/vendor/libsodium/msvc-scripts/process.bat +2 -2
  67. data/vendor/libsodium/packaging/nuget/package.config +1 -1
  68. data/vendor/libsodium/src/Makefile.in +17 -5
  69. data/vendor/libsodium/src/libsodium/Makefile.am +7 -2
  70. data/vendor/libsodium/src/libsodium/Makefile.in +83 -55
  71. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256_api.c +5 -0
  72. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/cp/verify_hmacsha256.c +1 -1
  73. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/auth_hmacsha512_api.c +5 -0
  74. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c +1 -1
  75. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256_api.c +5 -0
  76. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/verify_hmacsha512256.c +1 -1
  77. data/vendor/libsodium/src/libsodium/crypto_box/crypto_box_seal.c +67 -0
  78. data/vendor/libsodium/src/libsodium/crypto_generichash/crypto_generichash.c +8 -1
  79. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/hash_sha256_api.c +5 -0
  80. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/hash_sha512_api.c +5 -0
  81. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c +12 -6
  82. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h +11 -0
  83. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c +60 -25
  84. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c +12 -12
  85. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c +11 -3
  86. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +1 -1
  87. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c +1 -4
  88. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/api.h +1 -0
  89. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/xor_xsalsa20.c +13 -3
  90. data/vendor/libsodium/src/libsodium/include/Makefile.in +18 -6
  91. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha256.h +9 -5
  92. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512.h +9 -5
  93. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h +6 -2
  94. data/vendor/libsodium/src/libsodium/include/sodium/crypto_box.h +15 -0
  95. data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash.h +2 -0
  96. data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash_blake2b.h +1 -1
  97. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha256.h +2 -0
  98. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha512.h +2 -0
  99. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth.h +2 -0
  100. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_xsalsa20.h +6 -0
  101. data/vendor/libsodium/src/libsodium/include/sodium/randombytes.h +6 -6
  102. data/vendor/libsodium/src/libsodium/include/sodium/utils.h +2 -2
  103. data/vendor/libsodium/src/libsodium/randombytes/randombytes.c +82 -3
  104. data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +85 -33
  105. data/vendor/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +80 -42
  106. data/vendor/libsodium/src/libsodium/sodium/utils.c +16 -13
  107. data/vendor/libsodium/test/Makefile.am +1 -1
  108. data/vendor/libsodium/test/Makefile.in +18 -6
  109. data/vendor/libsodium/test/default/Makefile.am +9 -3
  110. data/vendor/libsodium/test/default/Makefile.in +72 -38
  111. data/vendor/libsodium/test/default/auth.c +8 -0
  112. data/vendor/libsodium/test/default/auth5.c +0 -2
  113. data/vendor/libsodium/test/default/auth7.c +0 -2
  114. data/vendor/libsodium/test/default/box8.c +0 -2
  115. data/vendor/libsodium/test/default/box_easy2.c +1 -1
  116. data/vendor/libsodium/test/default/box_seal.c +43 -0
  117. data/vendor/libsodium/test/default/box_seal.exp +4 -0
  118. data/vendor/libsodium/test/default/cmptest.h +1 -0
  119. data/vendor/libsodium/test/default/generichash2.c +1 -0
  120. data/vendor/libsodium/test/default/hash.c +2 -0
  121. data/vendor/libsodium/test/default/onetimeauth.c +1 -0
  122. data/vendor/libsodium/test/default/onetimeauth7.c +0 -2
  123. data/vendor/libsodium/test/default/pre.js.inc +0 -27
  124. data/vendor/libsodium/test/default/pwhash.c +18 -5
  125. data/vendor/libsodium/test/default/randombytes.c +44 -2
  126. data/vendor/libsodium/test/default/secretbox8.c +0 -2
  127. data/vendor/libsodium/test/default/sodium_utils2.c +5 -1
  128. data/vendor/libsodium/test/default/sodium_utils3.c +1 -1
  129. data/vendor/libsodium/test/default/stream.c +13 -1
  130. data/vendor/libsodium/test/default/stream.exp +1 -0
  131. data/vendor/libsodium/test/default/stream2.c +13 -1
  132. data/vendor/libsodium/test/default/stream2.exp +1 -0
  133. data/vendor/libsodium/test/quirks/quirks.h +26 -0
  134. metadata +23 -12
  135. data/vendor/libsodium/builds/msvc/resource.h +0 -0
  136. data/vendor/libsodium/builds/msvc/resource.rc +0 -0
  137. data/vendor/libsodium/dist-build/android-armv7.sh +0 -3
  138. data/vendor/libsodium/dist-build/android-mips.sh +0 -3
  139. data/vendor/libsodium/packaging/nuget/package.nuspec +0 -95
  140. data/vendor/libsodium/packaging/nuget/package.targets +0 -128
  141. data/vendor/libsodium/test/quirks/windows/windows-quirks.h +0 -18
@@ -4,6 +4,9 @@
4
4
  # include <sys/stat.h>
5
5
  # include <sys/time.h>
6
6
  #endif
7
+ #ifdef __linux__
8
+ # include <sys/syscall.h>
9
+ #endif
7
10
 
8
11
  #include <assert.h>
9
12
  #include <errno.h>
@@ -43,12 +46,6 @@ randombytes_sysrandom_stir(void)
43
46
  {
44
47
  }
45
48
 
46
- uint32_t
47
- randombytes_sysrandom_uniform(const uint32_t upper_bound)
48
- {
49
- return arc4random_uniform(upper_bound);
50
- }
51
-
52
49
  void
53
50
  randombytes_sysrandom_buf(void * const buf, const size_t size)
54
51
  {
@@ -64,25 +61,27 @@ randombytes_sysrandom_close(void)
64
61
  #else /* __OpenBSD__ */
65
62
 
66
63
  typedef struct SysRandom_ {
67
- int random_data_source_fd;
68
- int initialized;
64
+ int random_data_source_fd;
65
+ int initialized;
66
+ int getrandom_available;
69
67
  } SysRandom;
70
68
 
71
69
  static SysRandom stream = {
72
70
  SODIUM_C99(.random_data_source_fd =) -1,
73
- SODIUM_C99(.initialized =) 0
71
+ SODIUM_C99(.initialized =) 0,
72
+ SODIUM_C99(.getrandom_available =) 0
74
73
  };
75
74
 
76
75
  #ifndef _WIN32
77
76
  static ssize_t
78
- safe_read(const int fd, void * const buf_, size_t count)
77
+ safe_read(const int fd, void * const buf_, size_t size)
79
78
  {
80
79
  unsigned char *buf = (unsigned char *) buf_;
81
80
  ssize_t readnb;
82
81
 
83
- assert(count > (size_t) 0U);
82
+ assert(size > (size_t) 0U);
84
83
  do {
85
- while ((readnb = read(fd, buf, count)) < (ssize_t) 0 &&
84
+ while ((readnb = read(fd, buf, size)) < (ssize_t) 0 &&
86
85
  (errno == EINTR || errno == EAGAIN)); /* LCOV_EXCL_LINE */
87
86
  if (readnb < (ssize_t) 0) {
88
87
  return readnb; /* LCOV_EXCL_LINE */
@@ -90,9 +89,9 @@ safe_read(const int fd, void * const buf_, size_t count)
90
89
  if (readnb == (ssize_t) 0) {
91
90
  break; /* LCOV_EXCL_LINE */
92
91
  }
93
- count -= (size_t) readnb;
92
+ size -= (size_t) readnb;
94
93
  buf += readnb;
95
- } while (count > (ssize_t) 0);
94
+ } while (size > (ssize_t) 0);
96
95
 
97
96
  return (ssize_t) (buf - (unsigned char *) buf_);
98
97
  }
@@ -134,10 +133,59 @@ randombytes_sysrandom_random_dev_open(void)
134
133
  /* LCOV_EXCL_STOP */
135
134
  }
136
135
 
136
+ # ifdef SYS_getrandom
137
+ static int
138
+ _randombytes_linux_getrandom(void * const buf, const size_t size)
139
+ {
140
+ int readnb;
141
+
142
+ assert(size <= 256U);
143
+ do {
144
+ readnb = syscall(SYS_getrandom, buf, (int) size, 0);
145
+ } while (readnb < 0 && (errno == EINTR || errno == EAGAIN));
146
+
147
+ return (readnb == (int) size) - 1;
148
+ }
149
+
150
+ static int
151
+ randombytes_linux_getrandom(void * const buf_, size_t size)
152
+ {
153
+ unsigned char *buf = (unsigned char *) buf_;
154
+ size_t chunk_size = 256U;
155
+
156
+ do {
157
+ if (size < chunk_size) {
158
+ chunk_size = size;
159
+ assert(chunk_size > (size_t) 0U);
160
+ }
161
+ if (_randombytes_linux_getrandom(buf, chunk_size) != 0) {
162
+ return -1;
163
+ }
164
+ size -= chunk_size;
165
+ buf += chunk_size;
166
+ } while (size > (size_t) 0U);
167
+
168
+ return 0;
169
+ }
170
+ # endif
171
+
137
172
  static void
138
173
  randombytes_sysrandom_init(void)
139
174
  {
140
- const int errno_save = errno;
175
+ const int errno_save = errno;
176
+
177
+ # ifdef SYS_getrandom
178
+ {
179
+ unsigned char fodder[16];
180
+
181
+ if (randombytes_linux_getrandom(fodder, sizeof fodder) == 0) {
182
+ stream.getrandom_available = 1;
183
+ errno = errno_save;
184
+ return;
185
+ }
186
+ stream.getrandom_available = 0;
187
+ }
188
+ # endif
141
189
 
142
190
  if ((stream.random_data_source_fd =
143
191
  randombytes_sysrandom_random_dev_open()) == -1) {
@@ -183,6 +231,11 @@ randombytes_sysrandom_close(void)
183
231
  stream.initialized = 0;
184
232
  ret = 0;
185
233
  }
234
+ # ifdef SYS_getrandom
235
+ if (stream.getrandom_available != 0) {
236
+ ret = 0;
237
+ }
238
+ # endif
186
239
  #else /* _WIN32 */
187
240
  if (stream.initialized != 0) {
188
241
  stream.initialized = 0;
@@ -211,7 +264,16 @@ randombytes_sysrandom_buf(void * const buf, const size_t size)
211
264
  assert(size <= ULONG_LONG_MAX);
212
265
  #endif
213
266
  #ifndef _WIN32
214
- if (safe_read(stream.random_data_source_fd, buf, size) != (ssize_t) size) {
267
+ # ifdef SYS_getrandom
268
+ if (stream.getrandom_available != 0) {
269
+ if (randombytes_linux_getrandom(buf, size) != 0) {
270
+ abort();
271
+ }
272
+ return;
273
+ }
274
+ # endif
275
+ if (stream.random_data_source_fd == -1 ||
276
+ safe_read(stream.random_data_source_fd, buf, size) != (ssize_t) size) {
215
277
  abort(); /* LCOV_EXCL_LINE */
216
278
  }
217
279
  #else
@@ -224,31 +286,7 @@ randombytes_sysrandom_buf(void * const buf, const size_t size)
224
286
  #endif
225
287
  }
226
288
 
227
- /*
228
- * randombytes_sysrandom_uniform() derives from OpenBSD's arc4random_uniform()
229
- * Copyright (c) 2008, Damien Miller <djm@openbsd.org>
230
- */
231
-
232
- uint32_t
233
- randombytes_sysrandom_uniform(const uint32_t upper_bound)
234
- {
235
- uint32_t min;
236
- uint32_t r;
237
-
238
- if (upper_bound < 2) {
239
- return 0;
240
- }
241
- min = (uint32_t) (-upper_bound % upper_bound);
242
- for (;;) {
243
- r = randombytes_sysrandom();
244
- if (r >= min) {
245
- break;
246
- }
247
- } /* LCOV_EXCL_LINE */
248
- return r % upper_bound;
249
- }
250
-
251
- #endif
289
+ #endif /* __OpenBSD__ */
252
290
 
253
291
  const char *
254
292
  randombytes_sysrandom_implementation_name(void)
@@ -260,7 +298,7 @@ struct randombytes_implementation randombytes_sysrandom_implementation = {
260
298
  SODIUM_C99(.implementation_name =) randombytes_sysrandom_implementation_name,
261
299
  SODIUM_C99(.random =) randombytes_sysrandom,
262
300
  SODIUM_C99(.stir =) randombytes_sysrandom_stir,
263
- SODIUM_C99(.uniform =) randombytes_sysrandom_uniform,
301
+ SODIUM_C99(.uniform =) NULL,
264
302
  SODIUM_C99(.buf =) randombytes_sysrandom_buf,
265
303
  SODIUM_C99(.close =) randombytes_sysrandom_close
266
304
  };
@@ -108,14 +108,14 @@ sodium_bin2hex(char * const hex, const size_t hex_maxlen,
108
108
  while (i < bin_len) {
109
109
  c = bin[i] & 0xf;
110
110
  b = bin[i] >> 4;
111
- x = (unsigned char) (87 + c + (((c - 10) >> 31) & -39)) << 8 |
112
- (unsigned char) (87 + b + (((b - 10) >> 31) & -39));
111
+ x = (unsigned char) (87U + c + (((c - 10U) >> 8) & ~38U)) << 8 |
112
+ (unsigned char) (87U + b + (((b - 10U) >> 8) & ~38U));
113
113
  hex[i * 2U] = (char) x;
114
114
  x >>= 8;
115
115
  hex[i * 2U + 1U] = (char) x;
116
116
  i++;
117
117
  }
118
- hex[i * 2U] = 0;
118
+ hex[i * 2U] = 0U;
119
119
 
120
120
  return hex;
121
121
  }
@@ -131,22 +131,25 @@ sodium_hex2bin(unsigned char * const bin, const size_t bin_maxlen,
131
131
  int ret = 0;
132
132
  unsigned char c;
133
133
  unsigned char c_acc = 0U;
134
- unsigned char c_num;
134
+ unsigned char c_alpha0, c_alpha;
135
+ unsigned char c_num0, c_num;
135
136
  unsigned char c_val;
136
137
  unsigned char state = 0U;
137
138
 
138
139
  while (hex_pos < hex_len) {
139
140
  c = (unsigned char) hex[hex_pos];
140
- if ((c_num = c ^ 48U) < 10U) {
141
- c_val = c_num;
142
- } else if ((c_num = (c & ~32U)) > 64 && c_num < 71U) {
143
- c_val = c_num - 55U;
144
- } else if (ignore != NULL && strchr(ignore, c) != NULL && state == 0U) {
145
- hex_pos++;
146
- continue;
147
- } else {
141
+ c_num = c ^ 48U;
142
+ c_num0 = (c_num - 10U) >> 8;
143
+ c_alpha = (c & ~32U) - 55U;
144
+ c_alpha0 = ((c_alpha - 10U) ^ (c_alpha - 16U)) >> 8;
145
+ if ((c_num0 | c_alpha0) == 0U) {
146
+ if (ignore != NULL && state == 0U && strchr(ignore, c) != NULL) {
147
+ hex_pos++;
148
+ continue;
149
+ }
148
150
  break;
149
151
  }
152
+ c_val = (c_num0 & c_num) | (c_alpha0 & c_alpha);
150
153
  if (bin_pos >= bin_maxlen) {
151
154
  ret = -1;
152
155
  errno = ERANGE;
@@ -413,7 +416,7 @@ sodium_allocarray(size_t count, size_t size)
413
416
  {
414
417
  size_t total_size;
415
418
 
416
- if (size >= (size_t) SIZE_MAX / count) {
419
+ if (count > (size_t) 0U && size >= (size_t) SIZE_MAX / count) {
417
420
  errno = ENOMEM;
418
421
  return NULL;
419
422
  }
@@ -2,4 +2,4 @@ SUBDIRS = \
2
2
  default
3
3
 
4
4
  EXTRA_DIST = \
5
- quirks/windows/windows-quirks.h
5
+ quirks/quirks.h
@@ -1,7 +1,7 @@
1
- # Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+ # Makefile.in generated by automake 1.15 from Makefile.am.
2
2
  # @configure_input@
3
3
 
4
- # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
+ # Copyright (C) 1994-2014 Free Software Foundation, Inc.
5
5
 
6
6
  # This Makefile.in is free software; the Free Software Foundation
7
7
  # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
14
14
 
15
15
  @SET_MAKE@
16
16
  VPATH = @srcdir@
17
- am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
17
+ am__is_gnu_make = { \
18
+ if test -z '$(MAKELEVEL)'; then \
19
+ false; \
20
+ elif test -n '$(MAKE_HOST)'; then \
21
+ true; \
22
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
23
+ true; \
24
+ else \
25
+ false; \
26
+ fi; \
27
+ }
18
28
  am__make_running_with_option = \
19
29
  case $${target_option-} in \
20
30
  ?) ;; \
@@ -78,7 +88,6 @@ POST_UNINSTALL = :
78
88
  build_triplet = @build@
79
89
  host_triplet = @host@
80
90
  subdir = test
81
- DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
82
91
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
83
92
  am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
84
93
  $(top_srcdir)/m4/ax_check_link_flag.m4 \
@@ -88,6 +97,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
88
97
  $(top_srcdir)/configure.ac
89
98
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
90
99
  $(ACLOCAL_M4)
100
+ DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
91
101
  mkinstalldirs = $(install_sh) -d
92
102
  CONFIG_CLEAN_FILES =
93
103
  CONFIG_CLEAN_VPATH_FILES =
@@ -146,6 +156,7 @@ am__define_uniq_tagged_files = \
146
156
  ETAGS = etags
147
157
  CTAGS = ctags
148
158
  DIST_SUBDIRS = $(SUBDIRS)
159
+ am__DIST_COMMON = $(srcdir)/Makefile.in
149
160
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
150
161
  am__relativize = \
151
162
  dir0=`pwd`; \
@@ -308,7 +319,7 @@ SUBDIRS = \
308
319
  default
309
320
 
310
321
  EXTRA_DIST = \
311
- quirks/windows/windows-quirks.h
322
+ quirks/quirks.h
312
323
 
313
324
  all: all-recursive
314
325
 
@@ -325,7 +336,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
325
336
  echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
326
337
  $(am__cd) $(top_srcdir) && \
327
338
  $(AUTOMAKE) --foreign test/Makefile
328
- .PRECIOUS: Makefile
329
339
  Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
330
340
  @case '$?' in \
331
341
  *config.status*) \
@@ -620,6 +630,8 @@ uninstall-am:
620
630
  mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
621
631
  ps ps-am tags tags-am uninstall uninstall-am
622
632
 
633
+ .PRECIOUS: Makefile
634
+
623
635
 
624
636
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
625
637
  # Otherwise a system limit (for SysV at least) may be exceeded.
@@ -16,6 +16,7 @@ EXTRA_DIST = \
16
16
  box8.exp \
17
17
  box_easy.exp \
18
18
  box_easy2.exp \
19
+ box_seal.exp \
19
20
  box_seed.exp \
20
21
  chacha20.exp \
21
22
  core1.exp \
@@ -75,6 +76,7 @@ DISTCLEANFILES = \
75
76
  box8.res \
76
77
  box_easy.res \
77
78
  box_easy2.res \
79
+ box_seal.res \
78
80
  box_seed.res \
79
81
  chacha20.res \
80
82
  core1.res \
@@ -144,6 +146,7 @@ TESTS_TARGETS = \
144
146
  box8 \
145
147
  box_easy \
146
148
  box_easy2 \
149
+ box_seal \
147
150
  box_seed \
148
151
  chacha20 \
149
152
  core1 \
@@ -211,13 +214,13 @@ auth2_LDADD = $(TESTS_LDADD)
211
214
  auth3_SOURCE = cmptest.h auth3.c
212
215
  auth3_LDADD = $(TESTS_LDADD)
213
216
 
214
- auth5_SOURCE = cmptest.h auth5.c windows/windows-quirks.h
217
+ auth5_SOURCE = cmptest.h auth5.c quirks.h
215
218
  auth5_LDADD = $(TESTS_LDADD)
216
219
 
217
- auth6_SOURCE = cmptest.h auth6.c windows/windows-quirks.h
220
+ auth6_SOURCE = cmptest.h auth6.c quirks.h
218
221
  auth6_LDADD = $(TESTS_LDADD)
219
222
 
220
- auth7_SOURCE = cmptest.h auth7.c windows/windows-quirks.h
223
+ auth7_SOURCE = cmptest.h auth7.c quirks.h
221
224
  auth7_LDADD = $(TESTS_LDADD)
222
225
 
223
226
  box_SOURCE = cmptest.h box.c
@@ -238,6 +241,9 @@ box_easy_LDADD = $(TESTS_LDADD)
238
241
  box_easy2_SOURCE = cmptest.h box_easy2.c
239
242
  box_easy2_LDADD = $(TESTS_LDADD)
240
243
 
244
+ box_seal_SOURCE = cmptest.h box_seal.c
245
+ box_seal_LDADD = $(TESTS_LDADD)
246
+
241
247
  box_seed_SOURCE = cmptest.h box_seed.c
242
248
  box_seed_LDADD = $(TESTS_LDADD)
243
249
 
@@ -1,7 +1,7 @@
1
- # Makefile.in generated by automake 1.14.1 from Makefile.am.
1
+ # Makefile.in generated by automake 1.15 from Makefile.am.
2
2
  # @configure_input@
3
3
 
4
- # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
+ # Copyright (C) 1994-2014 Free Software Foundation, Inc.
5
5
 
6
6
  # This Makefile.in is free software; the Free Software Foundation
7
7
  # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
14
14
 
15
15
  @SET_MAKE@
16
16
  VPATH = @srcdir@
17
- am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
17
+ am__is_gnu_make = { \
18
+ if test -z '$(MAKELEVEL)'; then \
19
+ false; \
20
+ elif test -n '$(MAKE_HOST)'; then \
21
+ true; \
22
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
23
+ true; \
24
+ else \
25
+ false; \
26
+ fi; \
27
+ }
18
28
  am__make_running_with_option = \
19
29
  case $${target_option-} in \
20
30
  ?) ;; \
@@ -84,9 +94,6 @@ host_triplet = @host@
84
94
  check_PROGRAMS = $(am__EXEEXT_2)
85
95
  TESTS = $(am__EXEEXT_2)
86
96
  subdir = test/default
87
- DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
88
- $(top_srcdir)/build-aux/depcomp \
89
- $(top_srcdir)/build-aux/test-driver
90
97
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
91
98
  am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
92
99
  $(top_srcdir)/m4/ax_check_link_flag.m4 \
@@ -96,6 +103,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
96
103
  $(top_srcdir)/configure.ac
97
104
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
98
105
  $(ACLOCAL_M4)
106
+ DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
99
107
  mkinstalldirs = $(install_sh) -d
100
108
  CONFIG_CLEAN_FILES =
101
109
  CONFIG_CLEAN_VPATH_FILES =
@@ -105,11 +113,12 @@ am__EXEEXT_2 = aead_chacha20poly1305$(EXEEXT) auth$(EXEEXT) \
105
113
  auth2$(EXEEXT) auth3$(EXEEXT) auth5$(EXEEXT) auth6$(EXEEXT) \
106
114
  auth7$(EXEEXT) box$(EXEEXT) box2$(EXEEXT) box7$(EXEEXT) \
107
115
  box8$(EXEEXT) box_easy$(EXEEXT) box_easy2$(EXEEXT) \
108
- box_seed$(EXEEXT) chacha20$(EXEEXT) core1$(EXEEXT) \
109
- core2$(EXEEXT) core3$(EXEEXT) core4$(EXEEXT) core5$(EXEEXT) \
110
- core6$(EXEEXT) ed25519_convert$(EXEEXT) generichash$(EXEEXT) \
111
- generichash2$(EXEEXT) generichash3$(EXEEXT) hash$(EXEEXT) \
112
- hash3$(EXEEXT) onetimeauth$(EXEEXT) onetimeauth2$(EXEEXT) \
116
+ box_seal$(EXEEXT) box_seed$(EXEEXT) chacha20$(EXEEXT) \
117
+ core1$(EXEEXT) core2$(EXEEXT) core3$(EXEEXT) core4$(EXEEXT) \
118
+ core5$(EXEEXT) core6$(EXEEXT) ed25519_convert$(EXEEXT) \
119
+ generichash$(EXEEXT) generichash2$(EXEEXT) \
120
+ generichash3$(EXEEXT) hash$(EXEEXT) hash3$(EXEEXT) \
121
+ onetimeauth$(EXEEXT) onetimeauth2$(EXEEXT) \
113
122
  onetimeauth7$(EXEEXT) pwhash$(EXEEXT) \
114
123
  pwhash_scrypt_ll$(EXEEXT) randombytes$(EXEEXT) \
115
124
  scalarmult$(EXEEXT) scalarmult2$(EXEEXT) scalarmult5$(EXEEXT) \
@@ -163,6 +172,9 @@ box_easy_DEPENDENCIES = $(TESTS_LDADD)
163
172
  box_easy2_SOURCES = box_easy2.c
164
173
  box_easy2_OBJECTS = box_easy2.$(OBJEXT)
165
174
  box_easy2_DEPENDENCIES = $(TESTS_LDADD)
175
+ box_seal_SOURCES = box_seal.c
176
+ box_seal_OBJECTS = box_seal.$(OBJEXT)
177
+ box_seal_DEPENDENCIES = $(TESTS_LDADD)
166
178
  box_seed_SOURCES = box_seed.c
167
179
  box_seed_OBJECTS = box_seed.$(OBJEXT)
168
180
  box_seed_DEPENDENCIES = $(TESTS_LDADD)
@@ -328,28 +340,30 @@ am__v_CCLD_0 = @echo " CCLD " $@;
328
340
  am__v_CCLD_1 =
329
341
  SOURCES = aead_chacha20poly1305.c auth.c auth2.c auth3.c auth5.c \
330
342
  auth6.c auth7.c box.c box2.c box7.c box8.c box_easy.c \
331
- box_easy2.c box_seed.c chacha20.c core1.c core2.c core3.c \
332
- core4.c core5.c core6.c ed25519_convert.c generichash.c \
333
- generichash2.c generichash3.c hash.c hash3.c onetimeauth.c \
334
- onetimeauth2.c onetimeauth7.c pwhash.c pwhash_scrypt_ll.c \
335
- randombytes.c scalarmult.c scalarmult2.c scalarmult5.c \
336
- scalarmult6.c scalarmult7.c secretbox.c secretbox2.c \
337
- secretbox7.c secretbox8.c secretbox_easy.c secretbox_easy2.c \
338
- shorthash.c sign.c sodium_core.c sodium_utils.c \
339
- sodium_utils2.c sodium_utils3.c sodium_version.c stream.c \
340
- stream2.c stream3.c stream4.c verify1.c
343
+ box_easy2.c box_seal.c box_seed.c chacha20.c core1.c core2.c \
344
+ core3.c core4.c core5.c core6.c ed25519_convert.c \
345
+ generichash.c generichash2.c generichash3.c hash.c hash3.c \
346
+ onetimeauth.c onetimeauth2.c onetimeauth7.c pwhash.c \
347
+ pwhash_scrypt_ll.c randombytes.c scalarmult.c scalarmult2.c \
348
+ scalarmult5.c scalarmult6.c scalarmult7.c secretbox.c \
349
+ secretbox2.c secretbox7.c secretbox8.c secretbox_easy.c \
350
+ secretbox_easy2.c shorthash.c sign.c sodium_core.c \
351
+ sodium_utils.c sodium_utils2.c sodium_utils3.c \
352
+ sodium_version.c stream.c stream2.c stream3.c stream4.c \
353
+ verify1.c
341
354
  DIST_SOURCES = aead_chacha20poly1305.c auth.c auth2.c auth3.c auth5.c \
342
355
  auth6.c auth7.c box.c box2.c box7.c box8.c box_easy.c \
343
- box_easy2.c box_seed.c chacha20.c core1.c core2.c core3.c \
344
- core4.c core5.c core6.c ed25519_convert.c generichash.c \
345
- generichash2.c generichash3.c hash.c hash3.c onetimeauth.c \
346
- onetimeauth2.c onetimeauth7.c pwhash.c pwhash_scrypt_ll.c \
347
- randombytes.c scalarmult.c scalarmult2.c scalarmult5.c \
348
- scalarmult6.c scalarmult7.c secretbox.c secretbox2.c \
349
- secretbox7.c secretbox8.c secretbox_easy.c secretbox_easy2.c \
350
- shorthash.c sign.c sodium_core.c sodium_utils.c \
351
- sodium_utils2.c sodium_utils3.c sodium_version.c stream.c \
352
- stream2.c stream3.c stream4.c verify1.c
356
+ box_easy2.c box_seal.c box_seed.c chacha20.c core1.c core2.c \
357
+ core3.c core4.c core5.c core6.c ed25519_convert.c \
358
+ generichash.c generichash2.c generichash3.c hash.c hash3.c \
359
+ onetimeauth.c onetimeauth2.c onetimeauth7.c pwhash.c \
360
+ pwhash_scrypt_ll.c randombytes.c scalarmult.c scalarmult2.c \
361
+ scalarmult5.c scalarmult6.c scalarmult7.c secretbox.c \
362
+ secretbox2.c secretbox7.c secretbox8.c secretbox_easy.c \
363
+ secretbox_easy2.c shorthash.c sign.c sodium_core.c \
364
+ sodium_utils.c sodium_utils2.c sodium_utils3.c \
365
+ sodium_version.c stream.c stream2.c stream3.c stream4.c \
366
+ verify1.c
353
367
  am__can_run_installinfo = \
354
368
  case $$AM_UPDATE_INFO_DIR in \
355
369
  n|no|NO) false;; \
@@ -578,6 +592,9 @@ TEST_LOGS = $(am__test_logs2:.test.log=.log)
578
592
  TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver
579
593
  TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
580
594
  $(TEST_LOG_FLAGS)
595
+ am__DIST_COMMON = $(srcdir)/Makefile.in \
596
+ $(top_srcdir)/build-aux/depcomp \
597
+ $(top_srcdir)/build-aux/test-driver
581
598
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
582
599
  ACLOCAL = @ACLOCAL@
583
600
  AMTAR = @AMTAR@
@@ -728,6 +745,7 @@ EXTRA_DIST = \
728
745
  box8.exp \
729
746
  box_easy.exp \
730
747
  box_easy2.exp \
748
+ box_seal.exp \
731
749
  box_seed.exp \
732
750
  chacha20.exp \
733
751
  core1.exp \
@@ -787,6 +805,7 @@ DISTCLEANFILES = \
787
805
  box8.res \
788
806
  box_easy.res \
789
807
  box_easy2.res \
808
+ box_seal.res \
790
809
  box_seed.res \
791
810
  chacha20.res \
792
811
  core1.res \
@@ -842,8 +861,8 @@ AM_CPPFLAGS = \
842
861
 
843
862
  AM_LDFLAGS = @TEST_LDFLAGS@
844
863
  TESTS_TARGETS = aead_chacha20poly1305 auth auth2 auth3 auth5 auth6 \
845
- auth7 box box2 box7 box8 box_easy box_easy2 box_seed chacha20 \
846
- core1 core2 core3 core4 core5 core6 ed25519_convert \
864
+ auth7 box box2 box7 box8 box_easy box_easy2 box_seal box_seed \
865
+ chacha20 core1 core2 core3 core4 core5 core6 ed25519_convert \
847
866
  generichash generichash2 generichash3 hash hash3 onetimeauth \
848
867
  onetimeauth2 onetimeauth7 pwhash pwhash_scrypt_ll randombytes \
849
868
  scalarmult scalarmult2 scalarmult5 scalarmult6 scalarmult7 \
@@ -862,11 +881,11 @@ auth2_SOURCE = cmptest.h auth2.c
862
881
  auth2_LDADD = $(TESTS_LDADD)
863
882
  auth3_SOURCE = cmptest.h auth3.c
864
883
  auth3_LDADD = $(TESTS_LDADD)
865
- auth5_SOURCE = cmptest.h auth5.c windows/windows-quirks.h
884
+ auth5_SOURCE = cmptest.h auth5.c quirks.h
866
885
  auth5_LDADD = $(TESTS_LDADD)
867
- auth6_SOURCE = cmptest.h auth6.c windows/windows-quirks.h
886
+ auth6_SOURCE = cmptest.h auth6.c quirks.h
868
887
  auth6_LDADD = $(TESTS_LDADD)
869
- auth7_SOURCE = cmptest.h auth7.c windows/windows-quirks.h
888
+ auth7_SOURCE = cmptest.h auth7.c quirks.h
870
889
  auth7_LDADD = $(TESTS_LDADD)
871
890
  box_SOURCE = cmptest.h box.c
872
891
  box_LDADD = $(TESTS_LDADD)
@@ -880,6 +899,8 @@ box_easy_SOURCE = cmptest.h box_easy.c
880
899
  box_easy_LDADD = $(TESTS_LDADD)
881
900
  box_easy2_SOURCE = cmptest.h box_easy2.c
882
901
  box_easy2_LDADD = $(TESTS_LDADD)
902
+ box_seal_SOURCE = cmptest.h box_seal.c
903
+ box_seal_LDADD = $(TESTS_LDADD)
883
904
  box_seed_SOURCE = cmptest.h box_seed.c
884
905
  box_seed_LDADD = $(TESTS_LDADD)
885
906
  chacha20_SOURCE = cmptest.h chacha20.c
@@ -982,7 +1003,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
982
1003
  echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/default/Makefile'; \
983
1004
  $(am__cd) $(top_srcdir) && \
984
1005
  $(AUTOMAKE) --foreign test/default/Makefile
985
- .PRECIOUS: Makefile
986
1006
  Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
987
1007
  @case '$?' in \
988
1008
  *config.status*) \
@@ -1062,6 +1082,10 @@ box_easy2$(EXEEXT): $(box_easy2_OBJECTS) $(box_easy2_DEPENDENCIES) $(EXTRA_box_e
1062
1082
  @rm -f box_easy2$(EXEEXT)
1063
1083
  $(AM_V_CCLD)$(LINK) $(box_easy2_OBJECTS) $(box_easy2_LDADD) $(LIBS)
1064
1084
 
1085
+ box_seal$(EXEEXT): $(box_seal_OBJECTS) $(box_seal_DEPENDENCIES) $(EXTRA_box_seal_DEPENDENCIES)
1086
+ @rm -f box_seal$(EXEEXT)
1087
+ $(AM_V_CCLD)$(LINK) $(box_seal_OBJECTS) $(box_seal_LDADD) $(LIBS)
1088
+
1065
1089
  box_seed$(EXEEXT): $(box_seed_OBJECTS) $(box_seed_DEPENDENCIES) $(EXTRA_box_seed_DEPENDENCIES)
1066
1090
  @rm -f box_seed$(EXEEXT)
1067
1091
  $(AM_V_CCLD)$(LINK) $(box_seed_OBJECTS) $(box_seed_LDADD) $(LIBS)
@@ -1253,6 +1277,7 @@ distclean-compile:
1253
1277
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/box8.Po@am__quote@
1254
1278
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/box_easy.Po@am__quote@
1255
1279
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/box_easy2.Po@am__quote@
1280
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/box_seal.Po@am__quote@
1256
1281
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/box_seed.Po@am__quote@
1257
1282
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chacha20.Po@am__quote@
1258
1283
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/core1.Po@am__quote@
@@ -1409,7 +1434,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
1409
1434
  if test -n "$$am__remaking_logs"; then \
1410
1435
  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
1411
1436
  "recursion detected" >&2; \
1412
- else \
1437
+ elif test -n "$$redo_logs"; then \
1413
1438
  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
1414
1439
  fi; \
1415
1440
  if $(am__make_dryrun); then :; else \
@@ -1611,6 +1636,13 @@ box_easy2.log: box_easy2$(EXEEXT)
1611
1636
  --log-file $$b.log --trs-file $$b.trs \
1612
1637
  $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1613
1638
  "$$tst" $(AM_TESTS_FD_REDIRECT)
1639
+ box_seal.log: box_seal$(EXEEXT)
1640
+ @p='box_seal$(EXEEXT)'; \
1641
+ b='box_seal'; \
1642
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
1643
+ --log-file $$b.log --trs-file $$b.trs \
1644
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
1645
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
1614
1646
  box_seed.log: box_seed$(EXEEXT)
1615
1647
  @p='box_seed$(EXEEXT)'; \
1616
1648
  b='box_seed'; \
@@ -2084,6 +2116,8 @@ uninstall-am:
2084
2116
  mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
2085
2117
  recheck tags tags-am uninstall uninstall-am
2086
2118
 
2119
+ .PRECIOUS: Makefile
2120
+
2087
2121
 
2088
2122
  verify: check
2089
2123