rbnacl-libsodium 1.0.11 → 1.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (465) 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/AUTHORS +45 -33
  5. data/vendor/libsodium/ChangeLog +63 -2
  6. data/vendor/libsodium/LICENSE +1 -1
  7. data/vendor/libsodium/Makefile.am +1 -0
  8. data/vendor/libsodium/Makefile.in +17 -14
  9. data/vendor/libsodium/README.markdown +1 -0
  10. data/vendor/libsodium/THANKS +38 -4
  11. data/vendor/libsodium/aclocal.m4 +25 -24
  12. data/vendor/libsodium/autogen.sh +12 -7
  13. data/vendor/libsodium/autom4te.cache/output.0 +5066 -2281
  14. data/vendor/libsodium/autom4te.cache/output.1 +1013 -600
  15. data/vendor/libsodium/autom4te.cache/output.2 +5066 -2281
  16. data/vendor/libsodium/autom4te.cache/requests +426 -1584
  17. data/vendor/libsodium/autom4te.cache/traces.0 +2044 -876
  18. data/vendor/libsodium/autom4te.cache/traces.1 +996 -523
  19. data/vendor/libsodium/autom4te.cache/traces.2 +1996 -828
  20. data/vendor/libsodium/build-aux/compile +5 -4
  21. data/vendor/libsodium/build-aux/config.guess +120 -68
  22. data/vendor/libsodium/build-aux/config.sub +51 -22
  23. data/vendor/libsodium/build-aux/depcomp +3 -3
  24. data/vendor/libsodium/build-aux/install-sh +2 -2
  25. data/vendor/libsodium/build-aux/missing +3 -3
  26. data/vendor/libsodium/build-aux/test-driver +3 -3
  27. data/vendor/libsodium/builds/msvc/properties/Win32.props +4 -1
  28. data/vendor/libsodium/builds/msvc/properties/x64.props +4 -1
  29. data/vendor/libsodium/builds/msvc/resource.h +14 -0
  30. data/vendor/libsodium/builds/msvc/resource.rc +63 -0
  31. data/vendor/libsodium/builds/msvc/version.h +7 -4
  32. data/vendor/libsodium/builds/msvc/vs2010/libsodium.import.props +1 -1
  33. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.props +10 -5
  34. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +182 -139
  35. data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +632 -470
  36. data/vendor/libsodium/builds/msvc/vs2012/libsodium.import.props +1 -1
  37. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.props +10 -5
  38. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj +182 -129
  39. data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +632 -470
  40. data/vendor/libsodium/builds/msvc/vs2013/libsodium.import.props +1 -1
  41. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.props +10 -5
  42. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +182 -129
  43. data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +632 -470
  44. data/vendor/libsodium/builds/msvc/vs2015/libsodium.import.props +1 -1
  45. data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.props +10 -5
  46. data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj +181 -118
  47. data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +632 -470
  48. data/vendor/libsodium/builds/msvc/vs2017/libsodium.import.props +52 -0
  49. data/vendor/libsodium/builds/msvc/vs2017/libsodium.import.xml +17 -0
  50. data/vendor/libsodium/builds/msvc/vs2017/libsodium.sln +52 -0
  51. data/vendor/libsodium/builds/msvc/vs2017/libsodium/libsodium.props +48 -0
  52. data/vendor/libsodium/builds/msvc/vs2017/libsodium/libsodium.vcxproj +320 -0
  53. data/vendor/libsodium/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters +962 -0
  54. data/vendor/libsodium/builds/msvc/vs2017/libsodium/libsodium.xml +15 -0
  55. data/vendor/libsodium/configure +1002 -589
  56. data/vendor/libsodium/configure.ac +48 -21
  57. data/vendor/libsodium/contrib/Findsodium.cmake +267 -0
  58. data/vendor/libsodium/contrib/Makefile.am +3 -0
  59. data/vendor/libsodium/contrib/Makefile.in +483 -0
  60. data/vendor/libsodium/dist-build/Makefile.in +11 -7
  61. data/vendor/libsodium/dist-build/android-armv8-a.sh +1 -1
  62. data/vendor/libsodium/dist-build/android-build.sh +25 -17
  63. data/vendor/libsodium/dist-build/android-mips32.sh +1 -1
  64. data/vendor/libsodium/dist-build/android-mips64.sh +1 -1
  65. data/vendor/libsodium/dist-build/android-x86_64.sh +1 -1
  66. data/vendor/libsodium/dist-build/emscripten-symbols.def +150 -2
  67. data/vendor/libsodium/dist-build/emscripten-wasm.sh +132 -0
  68. data/vendor/libsodium/dist-build/emscripten.sh +8 -6
  69. data/vendor/libsodium/dist-build/ios.sh +29 -5
  70. data/vendor/libsodium/libsodium.vcxproj +139 -77
  71. data/vendor/libsodium/libsodium.vcxproj.filters +315 -144
  72. data/vendor/libsodium/m4/ax_check_catchable_segv.m4 +42 -0
  73. data/vendor/libsodium/m4/ax_check_compile_flag.m4 +6 -4
  74. data/vendor/libsodium/m4/ax_check_define.m4 +3 -3
  75. data/vendor/libsodium/m4/ax_check_gnu_make.m4 +31 -25
  76. data/vendor/libsodium/m4/ax_check_link_flag.m4 +8 -6
  77. data/vendor/libsodium/m4/ax_pthread.m4 +275 -275
  78. data/vendor/libsodium/m4/ax_valgrind_check.m4 +92 -41
  79. data/vendor/libsodium/m4/pkg.m4 +1 -1
  80. data/vendor/libsodium/msvc-scripts/Makefile.in +11 -7
  81. data/vendor/libsodium/msvc-scripts/process.bat +4 -3
  82. data/vendor/libsodium/packaging/dotnet-core/README.md +59 -0
  83. data/vendor/libsodium/packaging/dotnet-core/desktop.targets +16 -0
  84. data/vendor/libsodium/packaging/dotnet-core/libsodium.props +33 -0
  85. data/vendor/libsodium/packaging/dotnet-core/prepare.py +262 -0
  86. data/vendor/libsodium/packaging/dotnet-core/recipes/alpine-x64 +3 -0
  87. data/vendor/libsodium/packaging/dotnet-core/recipes/build +9 -0
  88. data/vendor/libsodium/packaging/dotnet-core/recipes/centos-x64 +3 -0
  89. data/vendor/libsodium/packaging/dotnet-core/recipes/debian-x64 +4 -0
  90. data/vendor/libsodium/packaging/dotnet-core/recipes/fedora-x64 +3 -0
  91. data/vendor/libsodium/packaging/dotnet-core/recipes/opensuse-x64 +3 -0
  92. data/vendor/libsodium/packaging/dotnet-core/recipes/pack +5 -0
  93. data/vendor/libsodium/packaging/dotnet-core/recipes/test +27 -0
  94. data/vendor/libsodium/packaging/dotnet-core/recipes/ubuntu-x64 +4 -0
  95. data/vendor/libsodium/packaging/nuget/package.config +1 -1
  96. data/vendor/libsodium/packaging/nuget/package.gsl +3 -3
  97. data/vendor/libsodium/src/Makefile.in +11 -7
  98. data/vendor/libsodium/src/libsodium/Makefile.am +113 -98
  99. data/vendor/libsodium/src/libsodium/Makefile.in +1034 -1236
  100. data/vendor/libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +31 -12
  101. data/vendor/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c +31 -10
  102. data/vendor/libsodium/src/libsodium/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c +153 -0
  103. data/vendor/libsodium/src/libsodium/crypto_auth/crypto_auth.c +7 -0
  104. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/{cp/hmac_hmacsha256.c → auth_hmacsha256.c} +43 -35
  105. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/{cp/hmac_hmacsha512.c → auth_hmacsha512.c} +43 -35
  106. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/{cp/hmac_hmacsha512256.c → auth_hmacsha512256.c} +48 -9
  107. data/vendor/libsodium/src/libsodium/crypto_box/crypto_box_easy.c +4 -3
  108. data/vendor/libsodium/src/libsodium/crypto_box/crypto_box_seal.c +2 -1
  109. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c +197 -0
  110. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c +79 -0
  111. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c +150 -0
  112. data/vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c +1156 -662
  113. data/vendor/libsodium/src/libsodium/crypto_core/hchacha20/core_hchacha20.c +12 -5
  114. data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/{core_hsalsa20_api.c → core_hsalsa20.c} +0 -0
  115. data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c +95 -0
  116. data/vendor/libsodium/src/libsodium/crypto_core/salsa/ref/core_salsa_ref.c +195 -0
  117. data/vendor/libsodium/src/libsodium/crypto_generichash/{blake2/generichash_blake2_api.c → blake2b/generichash_blake2.c} +7 -0
  118. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2.h +109 -0
  119. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.c +49 -0
  120. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.h +140 -0
  121. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ref.c +92 -0
  122. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.c +87 -0
  123. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.h +103 -0
  124. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.c +90 -0
  125. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h +103 -0
  126. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-avx2.h +340 -0
  127. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-sse2.h +164 -0
  128. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-sse41.h +307 -0
  129. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.c +494 -0
  130. data/vendor/libsodium/src/libsodium/crypto_generichash/{blake2 → blake2b}/ref/generichash_blake2b.c +22 -26
  131. data/vendor/libsodium/src/libsodium/crypto_generichash/crypto_generichash.c +7 -0
  132. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c +254 -0
  133. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/{hash_sha256_api.c → hash_sha256.c} +4 -2
  134. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c +280 -0
  135. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/{hash_sha512_api.c → hash_sha512.c} +4 -2
  136. data/vendor/libsodium/src/libsodium/crypto_kdf/blake2b/kdf_blake2b.c +52 -0
  137. data/vendor/libsodium/src/libsodium/crypto_kdf/crypto_kdf.c +49 -0
  138. data/vendor/libsodium/src/libsodium/crypto_kx/crypto_kx.c +136 -0
  139. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c +6 -0
  140. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c +34 -27
  141. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h +1 -1
  142. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +203 -156
  143. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +178 -134
  144. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c +22 -4
  145. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.h +10 -12
  146. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +564 -315
  147. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.h +1 -1
  148. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.c +131 -84
  149. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.h +23 -18
  150. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c +163 -145
  151. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.h +2 -1
  152. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx2.c +247 -0
  153. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c +42 -29
  154. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c +71 -47
  155. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.c +100 -65
  156. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.h +77 -23
  157. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blake2b-long.c +30 -31
  158. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blamka-round-avx2.h +150 -0
  159. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blamka-round-ref.h +28 -26
  160. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blamka-round-ssse3.h +102 -99
  161. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c +90 -41
  162. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/pwhash_argon2id.c +213 -0
  163. data/vendor/libsodium/src/libsodium/crypto_pwhash/crypto_pwhash.c +72 -4
  164. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c +34 -37
  165. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h +27 -32
  166. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c +120 -86
  167. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c +16 -13
  168. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.h +4 -4
  169. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c +98 -50
  170. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c +23 -18
  171. data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c +105 -105
  172. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.c +395 -330
  173. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c +225 -198
  174. data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox.c +7 -0
  175. data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c +6 -5
  176. data/vendor/libsodium/src/libsodium/crypto_secretbox/xchacha20poly1305/secretbox_xchacha20poly1305.c +170 -0
  177. data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c +83 -0
  178. data/vendor/libsodium/src/libsodium/crypto_shorthash/crypto_shorthash.c +7 -0
  179. data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.c +65 -0
  180. data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash_ref.h +24 -0
  181. data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.c +71 -0
  182. data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/{shorthash_siphash24_api.c → shorthash_siphash24.c} +0 -0
  183. data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/shorthash_siphashx24.c +11 -0
  184. data/vendor/libsodium/src/libsodium/crypto_sign/crypto_sign.c +33 -0
  185. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ed25519_ref10.h +18 -0
  186. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +18 -13
  187. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c +29 -26
  188. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +75 -36
  189. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c +39 -15
  190. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519.c +91 -0
  191. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/afternm_aes128ctr.c +174 -0
  192. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/beforenm_aes128ctr.c +66 -0
  193. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/common.h +766 -0
  194. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/consts.h +28 -0
  195. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/consts_aes128ctr.c +28 -0
  196. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/int128.h +50 -0
  197. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/int128_aes128ctr.c +149 -0
  198. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/stream_aes128ctr_nacl.c +31 -0
  199. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/xor_afternm_aes128ctr.c +195 -0
  200. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/{stream_aes128ctr_api.c → stream_aes128ctr.c} +6 -3
  201. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.c +179 -0
  202. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.h +8 -0
  203. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c +173 -0
  204. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.h +8 -0
  205. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u0.h +86 -0
  206. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u1.h +98 -0
  207. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u4.h +175 -0
  208. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u8.h +357 -0
  209. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/{stream_chacha20_ref.c → chacha20_ref.c} +93 -94
  210. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.h +8 -0
  211. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.c +39 -7
  212. data/vendor/libsodium/src/libsodium/crypto_stream/crypto_stream.c +7 -0
  213. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.c +120 -0
  214. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.h +8 -0
  215. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20.c +93 -0
  216. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20.h +16 -0
  217. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/{amd64_xmm6/stream_salsa20_amd64_xmm6.S → xmm6/salsa20_xmm6-asm.S} +20 -12
  218. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.c +31 -0
  219. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.h +8 -0
  220. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c +131 -0
  221. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.h +8 -0
  222. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.c +122 -0
  223. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.h +8 -0
  224. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h +195 -0
  225. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u1.h +207 -0
  226. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u4.h +547 -0
  227. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u8.h +476 -0
  228. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012_ref.c +106 -0
  229. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/stream_salsa2012.c +20 -0
  230. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208_ref.c +106 -0
  231. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208.c +20 -0
  232. data/vendor/libsodium/src/libsodium/crypto_stream/xchacha20/stream_xchacha20.c +63 -0
  233. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20.c +60 -0
  234. data/vendor/libsodium/src/libsodium/crypto_verify/sodium/verify.c +61 -0
  235. data/vendor/libsodium/src/libsodium/include/Makefile.am +8 -6
  236. data/vendor/libsodium/src/libsodium/include/Makefile.in +29 -21
  237. data/vendor/libsodium/src/libsodium/include/sodium.h +15 -4
  238. data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_aes256gcm.h +4 -0
  239. data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h +6 -0
  240. data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_xchacha20poly1305.h +91 -0
  241. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth.h +3 -0
  242. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha256.h +5 -0
  243. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512.h +4 -0
  244. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h +4 -0
  245. data/vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xchacha20poly1305.h +153 -0
  246. data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash.h +4 -0
  247. data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash_blake2b.h +3 -4
  248. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha256.h +4 -3
  249. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha512.h +4 -3
  250. data/vendor/libsodium/src/libsodium/include/sodium/crypto_kdf.h +51 -0
  251. data/vendor/libsodium/src/libsodium/include/sodium/crypto_kdf_blake2b.h +42 -0
  252. data/vendor/libsodium/src/libsodium/include/sodium/crypto_kx.h +64 -0
  253. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth.h +4 -0
  254. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +11 -9
  255. data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash.h +37 -1
  256. data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_argon2i.h +40 -10
  257. data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_argon2id.h +116 -0
  258. data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h +37 -4
  259. data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h +0 -4
  260. data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox.h +3 -0
  261. data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xchacha20poly1305.h +62 -0
  262. data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h +5 -1
  263. data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash.h +3 -0
  264. data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash_siphash24.h +18 -0
  265. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign.h +22 -0
  266. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_ed25519.h +28 -0
  267. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream.h +3 -0
  268. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes128ctr.h +10 -5
  269. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_chacha20.h +14 -3
  270. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa20.h +4 -0
  271. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa2012.h +3 -0
  272. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa208.h +3 -0
  273. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_xchacha20.h +53 -0
  274. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_xsalsa20.h +4 -0
  275. data/vendor/libsodium/src/libsodium/include/sodium/private/common.h +84 -17
  276. data/vendor/libsodium/src/libsodium/include/sodium/private/implementations.h +11 -0
  277. data/vendor/libsodium/src/libsodium/include/sodium/private/sse2_64_32.h +50 -0
  278. data/vendor/libsodium/src/libsodium/include/sodium/randombytes.h +10 -2
  279. data/vendor/libsodium/src/libsodium/include/sodium/utils.h +4 -5
  280. data/vendor/libsodium/src/libsodium/include/sodium/version.h.in +4 -0
  281. data/vendor/libsodium/src/libsodium/randombytes/randombytes.c +47 -19
  282. data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +30 -50
  283. data/vendor/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +25 -15
  284. data/vendor/libsodium/src/libsodium/sodium/core.c +25 -23
  285. data/vendor/libsodium/src/libsodium/sodium/runtime.c +66 -57
  286. data/vendor/libsodium/src/libsodium/sodium/utils.c +120 -106
  287. data/vendor/libsodium/src/libsodium/sodium/version.c +10 -0
  288. data/vendor/libsodium/test/Makefile.in +11 -7
  289. data/vendor/libsodium/test/default/Makefile.am +65 -5
  290. data/vendor/libsodium/test/default/Makefile.in +243 -78
  291. data/vendor/libsodium/test/default/aead_aes256gcm.c +2 -2
  292. data/vendor/libsodium/test/default/aead_xchacha20poly1305.c +188 -0
  293. data/vendor/libsodium/test/default/aead_xchacha20poly1305.exp +51 -0
  294. data/vendor/libsodium/test/default/auth.c +11 -7
  295. data/vendor/libsodium/test/default/auth2.c +15 -12
  296. data/vendor/libsodium/test/default/auth3.c +18 -15
  297. data/vendor/libsodium/test/default/auth5.c +3 -2
  298. data/vendor/libsodium/test/default/auth6.c +4 -3
  299. data/vendor/libsodium/test/default/auth7.c +3 -2
  300. data/vendor/libsodium/test/default/box.c +57 -52
  301. data/vendor/libsodium/test/default/box2.c +41 -36
  302. data/vendor/libsodium/test/default/box7.c +4 -3
  303. data/vendor/libsodium/test/default/box8.c +4 -3
  304. data/vendor/libsodium/test/default/box_easy.c +36 -32
  305. data/vendor/libsodium/test/default/box_easy2.c +41 -34
  306. data/vendor/libsodium/test/default/box_seal.c +7 -6
  307. data/vendor/libsodium/test/default/box_seed.c +10 -8
  308. data/vendor/libsodium/test/default/chacha20.c +18 -3
  309. data/vendor/libsodium/test/default/chacha20.exp +45 -0
  310. data/vendor/libsodium/test/default/cmptest.h +1 -0
  311. data/vendor/libsodium/test/default/core1.c +10 -9
  312. data/vendor/libsodium/test/default/core2.c +13 -12
  313. data/vendor/libsodium/test/default/core3.c +13 -12
  314. data/vendor/libsodium/test/default/core4.c +11 -12
  315. data/vendor/libsodium/test/default/core5.c +13 -12
  316. data/vendor/libsodium/test/default/core6.c +15 -13
  317. data/vendor/libsodium/test/default/ed25519_convert.c +12 -9
  318. data/vendor/libsodium/test/default/hash.c +10 -6
  319. data/vendor/libsodium/test/default/hash3.c +3 -2
  320. data/vendor/libsodium/test/default/index-wasm.html.tpl +118 -0
  321. data/vendor/libsodium/test/default/kdf.c +61 -0
  322. data/vendor/libsodium/test/default/kdf.exp +77 -0
  323. data/vendor/libsodium/test/default/keygen.c +64 -0
  324. data/vendor/libsodium/test/default/keygen.exp +1 -0
  325. data/vendor/libsodium/test/default/kx.c +119 -0
  326. data/vendor/libsodium/test/default/kx.exp +7 -0
  327. data/vendor/libsodium/test/default/nacl-test-wrapper.sh +9 -2
  328. data/vendor/libsodium/test/default/onetimeauth.c +26 -23
  329. data/vendor/libsodium/test/default/onetimeauth2.c +22 -20
  330. data/vendor/libsodium/test/default/onetimeauth7.c +3 -2
  331. data/vendor/libsodium/test/default/pwhash.c +209 -157
  332. data/vendor/libsodium/test/default/pwhash_argon2id.c +388 -0
  333. data/vendor/libsodium/test/default/pwhash_argon2id.exp +15 -0
  334. data/vendor/libsodium/test/default/pwhash_scrypt.c +232 -224
  335. data/vendor/libsodium/test/default/pwhash_scrypt.exp +2 -1
  336. data/vendor/libsodium/test/default/pwhash_scrypt_ll.c +39 -41
  337. data/vendor/libsodium/test/default/randombytes.c +34 -13
  338. data/vendor/libsodium/test/default/randombytes.exp +1 -0
  339. data/vendor/libsodium/test/default/scalarmult.c +21 -18
  340. data/vendor/libsodium/test/default/scalarmult2.c +8 -6
  341. data/vendor/libsodium/test/default/scalarmult5.c +13 -10
  342. data/vendor/libsodium/test/default/scalarmult6.c +17 -14
  343. data/vendor/libsodium/test/default/scalarmult7.c +9 -10
  344. data/vendor/libsodium/test/default/secretbox.c +39 -36
  345. data/vendor/libsodium/test/default/secretbox2.c +28 -25
  346. data/vendor/libsodium/test/default/secretbox7.c +3 -2
  347. data/vendor/libsodium/test/default/secretbox8.c +4 -3
  348. data/vendor/libsodium/test/default/secretbox_easy.c +40 -37
  349. data/vendor/libsodium/test/default/secretbox_easy2.c +19 -18
  350. data/vendor/libsodium/test/default/shorthash.c +4 -4
  351. data/vendor/libsodium/test/default/sign.c +70 -13
  352. data/vendor/libsodium/test/default/sign.exp +2 -0
  353. data/vendor/libsodium/test/default/siphashx24.c +33 -0
  354. data/vendor/libsodium/test/default/siphashx24.exp +64 -0
  355. data/vendor/libsodium/test/default/sodium_core.c +9 -8
  356. data/vendor/libsodium/test/default/sodium_utils.c +52 -46
  357. data/vendor/libsodium/test/default/sodium_utils2.c +17 -8
  358. data/vendor/libsodium/test/default/sodium_utils3.c +15 -6
  359. data/vendor/libsodium/test/default/sodium_version.c +7 -1
  360. data/vendor/libsodium/test/default/stream.c +31 -18
  361. data/vendor/libsodium/test/default/stream.exp +65 -0
  362. data/vendor/libsodium/test/default/stream2.c +13 -9
  363. data/vendor/libsodium/test/default/stream3.c +12 -10
  364. data/vendor/libsodium/test/default/stream4.c +30 -27
  365. data/vendor/libsodium/test/default/verify1.c +5 -4
  366. data/vendor/libsodium/test/default/xchacha20.c +376 -0
  367. data/vendor/libsodium/test/default/xchacha20.exp +5 -0
  368. data/vendor/libsodium/test/quirks/quirks.h +4 -3
  369. metadata +140 -111
  370. data/vendor/libsodium/autom4te.cache/output.3 +0 -17240
  371. data/vendor/libsodium/autom4te.cache/output.4 +0 -17517
  372. data/vendor/libsodium/autom4te.cache/output.5 +0 -18535
  373. data/vendor/libsodium/autom4te.cache/output.6 +0 -19077
  374. data/vendor/libsodium/autom4te.cache/output.7 +0 -19837
  375. data/vendor/libsodium/autom4te.cache/traces.3 +0 -2833
  376. data/vendor/libsodium/autom4te.cache/traces.4 +0 -2951
  377. data/vendor/libsodium/autom4te.cache/traces.5 +0 -3042
  378. data/vendor/libsodium/autom4te.cache/traces.6 +0 -3194
  379. data/vendor/libsodium/autom4te.cache/traces.7 +0 -3614
  380. data/vendor/libsodium/builds/msvc/properties/ARM.props +0 -20
  381. data/vendor/libsodium/compile +0 -347
  382. data/vendor/libsodium/config.guess +0 -1568
  383. data/vendor/libsodium/config.sub +0 -1793
  384. data/vendor/libsodium/depcomp +0 -791
  385. data/vendor/libsodium/install-sh +0 -527
  386. data/vendor/libsodium/ltmain.sh +0 -9655
  387. data/vendor/libsodium/missing +0 -215
  388. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256_api.c +0 -16
  389. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/cp/verify_hmacsha256.c +0 -11
  390. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/auth_hmacsha512_api.c +0 -16
  391. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c +0 -12
  392. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256_api.c +0 -16
  393. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/verify_hmacsha512256.c +0 -14
  394. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c +0 -41
  395. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/after_curve25519xsalsa20poly1305.c +0 -22
  396. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.c +0 -18
  397. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/box_curve25519xsalsa20poly1305.c +0 -42
  398. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c +0 -29
  399. data/vendor/libsodium/src/libsodium/crypto_core/hchacha20/core_hchacha20.h +0 -28
  400. data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20.c +0 -100
  401. data/vendor/libsodium/src/libsodium/crypto_core/salsa20/core_salsa20_api.c +0 -21
  402. data/vendor/libsodium/src/libsodium/crypto_core/salsa20/ref/core_salsa20.c +0 -126
  403. data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/core_salsa2012_api.c +0 -21
  404. data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/ref/core_salsa2012.c +0 -126
  405. data/vendor/libsodium/src/libsodium/crypto_core/salsa208/core_salsa208_api.c +0 -21
  406. data/vendor/libsodium/src/libsodium/crypto_core/salsa208/ref/core_salsa208.c +0 -126
  407. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2-impl.h +0 -48
  408. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h +0 -97
  409. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-avx2.c +0 -45
  410. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-avx2.h +0 -123
  411. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ref.c +0 -94
  412. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-sse41.c +0 -80
  413. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-sse41.h +0 -97
  414. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ssse3.c +0 -87
  415. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ssse3.h +0 -97
  416. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-avx2.h +0 -339
  417. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-sse2.h +0 -66
  418. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-sse41.h +0 -400
  419. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +0 -456
  420. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256.c +0 -269
  421. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512.c +0 -298
  422. data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-impl.h +0 -40
  423. data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/box_xsalsa20poly1305.c +0 -35
  424. data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c +0 -26
  425. data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24.c +0 -72
  426. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/description +0 -1
  427. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519_api.c +0 -39
  428. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/afternm_aes128ctr.c +0 -159
  429. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/beforenm_aes128ctr.c +0 -59
  430. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/common.h +0 -771
  431. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/consts.h +0 -28
  432. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/consts_aes128ctr.c +0 -14
  433. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/int128.h +0 -56
  434. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/int128_aes128ctr.c +0 -131
  435. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/stream_aes128ctr.c +0 -29
  436. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/types.h +0 -10
  437. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/xor_afternm_aes128ctr.c +0 -180
  438. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.h +0 -28
  439. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/vec/stream_chacha20_vec.c +0 -336
  440. data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/vec/stream_chacha20_vec.h +0 -28
  441. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/stream_salsa20_ref.c +0 -55
  442. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/xor_salsa20_ref.c +0 -63
  443. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20_api.c +0 -19
  444. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012.c +0 -51
  445. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/xor_salsa2012.c +0 -54
  446. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/stream_salsa2012_api.c +0 -11
  447. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208.c +0 -51
  448. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/xor_salsa208.c +0 -54
  449. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208_api.c +0 -11
  450. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/stream_xsalsa20.c +0 -24
  451. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/xor_xsalsa20.c +0 -35
  452. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20_api.c +0 -11
  453. data/vendor/libsodium/src/libsodium/crypto_verify/16/ref/verify_16.c +0 -17
  454. data/vendor/libsodium/src/libsodium/crypto_verify/16/verify_16_api.c +0 -6
  455. data/vendor/libsodium/src/libsodium/crypto_verify/32/ref/verify_32.c +0 -17
  456. data/vendor/libsodium/src/libsodium/crypto_verify/32/verify_32_api.c +0 -6
  457. data/vendor/libsodium/src/libsodium/crypto_verify/64/ref/verify_64.c +0 -17
  458. data/vendor/libsodium/src/libsodium/crypto_verify/64/verify_64_api.c +0 -6
  459. data/vendor/libsodium/src/libsodium/include/sodium/crypto_int32.h +0 -8
  460. data/vendor/libsodium/src/libsodium/include/sodium/crypto_int64.h +0 -8
  461. data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint16.h +0 -8
  462. data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint32.h +0 -8
  463. data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint64.h +0 -8
  464. data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint8.h +0 -8
  465. data/vendor/libsodium/test-driver +0 -139
@@ -1,22 +1,27 @@
1
1
  # ===========================================================================
2
- # http://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html
2
+ # https://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html
3
3
  # ===========================================================================
4
4
  #
5
5
  # SYNOPSIS
6
6
  #
7
+ # AX_VALGRIND_DFLT(memcheck|helgrind|drd|sgcheck, on|off)
7
8
  # AX_VALGRIND_CHECK()
8
9
  #
9
10
  # DESCRIPTION
10
11
  #
11
- # Checks whether Valgrind is present and, if so, allows running `make
12
- # check` under a variety of Valgrind tools to check for memory and
13
- # threading errors.
12
+ # AX_VALGRIND_CHECK checks whether Valgrind is present and, if so, allows
13
+ # running `make check` under a variety of Valgrind tools to check for
14
+ # memory and threading errors.
14
15
  #
15
16
  # Defines VALGRIND_CHECK_RULES which should be substituted in your
16
17
  # Makefile; and $enable_valgrind which can be used in subsequent configure
17
18
  # output. VALGRIND_ENABLED is defined and substituted, and corresponds to
18
19
  # the value of the --enable-valgrind option, which defaults to being
19
- # enabled if Valgrind is installed and disabled otherwise.
20
+ # enabled if Valgrind is installed and disabled otherwise. Individual
21
+ # Valgrind tools can be disabled via --disable-valgrind-<tool>, the
22
+ # default is configurable via the AX_VALGRIND_DFLT command or is to use
23
+ # all commands not disabled via AX_VALGRIND_DFLT. All AX_VALGRIND_DFLT
24
+ # calls must be made before the call to AX_VALGRIND_CHECK.
20
25
  #
21
26
  # If unit tests are written using a shell script and automake's
22
27
  # LOG_COMPILER system, the $(VALGRIND) variable can be used within the
@@ -28,6 +33,7 @@
28
33
  #
29
34
  # configure.ac:
30
35
  #
36
+ # AX_VALGRIND_DFLT([sgcheck], [off])
31
37
  # AX_VALGRIND_CHECK
32
38
  #
33
39
  # Makefile.am:
@@ -40,9 +46,15 @@
40
46
  # which includes "@VALGRIND_CHECK_RULES@" (assuming the module has been
41
47
  # configured with --enable-valgrind). Running `make check-valgrind` in
42
48
  # that directory will run the module's test suite (`make check`) once for
43
- # each of the available Valgrind tools (out of memcheck, helgrind, drd and
44
- # sgcheck), and will output results to test-suite-$toolname.log for each.
45
- # The target will succeed if there are zero errors and fail otherwise.
49
+ # each of the available Valgrind tools (out of memcheck, helgrind and drd)
50
+ # while the sgcheck will be skipped unless enabled again on the
51
+ # commandline with --enable-valgrind-sgcheck. The results for each check
52
+ # will be output to test-suite-$toolname.log. The target will succeed if
53
+ # there are zero errors and fail otherwise.
54
+ #
55
+ # Alternatively, a "check-valgrind-$TOOL" rule will be added, for $TOOL in
56
+ # memcheck, helgrind, drd and sgcheck. These are useful because often only
57
+ # some of those tools can be ran cleanly on a codebase.
46
58
  #
47
59
  # The macro supports running with and without libtool.
48
60
  #
@@ -55,13 +67,23 @@
55
67
  # and this notice are preserved. This file is offered as-is, without any
56
68
  # warranty.
57
69
 
58
- #serial 8
70
+ #serial 15
71
+
72
+ dnl Configured tools
73
+ m4_define([valgrind_tool_list], [[memcheck], [helgrind], [drd], [sgcheck]])
74
+ m4_set_add_all([valgrind_exp_tool_set], [sgcheck])
75
+ m4_foreach([vgtool], [valgrind_tool_list],
76
+ [m4_define([en_dflt_valgrind_]vgtool, [on])])
77
+
78
+ AC_DEFUN([AX_VALGRIND_DFLT],[
79
+ m4_define([en_dflt_valgrind_$1], [$2])
80
+ ])dnl
59
81
 
60
82
  AC_DEFUN([AX_VALGRIND_CHECK],[
61
83
  dnl Check for --enable-valgrind
62
84
  AC_ARG_ENABLE([valgrind],
63
- [AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests (requires GNU make)])],
64
- [enable_valgrind=$enableval],[enable_valgrind=no])
85
+ [AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests (requires GNU make)])],
86
+ [enable_valgrind=$enableval],[enable_valgrind=no])
65
87
 
66
88
  AS_IF([test "$enable_valgrind" != "no"],[
67
89
  # Check for Valgrind.
@@ -81,22 +103,45 @@ AC_DEFUN([AX_VALGRIND_CHECK],[
81
103
  AC_SUBST([VALGRIND_ENABLED],[$enable_valgrind])
82
104
 
83
105
  # Check for Valgrind tools we care about.
84
- m4_define([valgrind_tool_list],[[memcheck], [helgrind], [drd], [exp-sgcheck]])
85
-
86
- AS_IF([test "$VALGRIND" != ""],[
87
- m4_foreach([vgtool],[valgrind_tool_list],[
88
- m4_define([vgtooln],AS_TR_SH(vgtool))
89
- m4_define([ax_cv_var],[ax_cv_valgrind_tool_]vgtooln)
90
- AC_CACHE_CHECK([for Valgrind tool ]vgtool,ax_cv_var,[
91
- ax_cv_var=
92
- AS_IF([`$VALGRIND --tool=vgtool --help >/dev/null 2>&1`],[
93
- ax_cv_var="vgtool"
106
+ [valgrind_enabled_tools=]
107
+ m4_foreach([vgtool],[valgrind_tool_list],[
108
+ AC_ARG_ENABLE([valgrind-]vgtool,
109
+ m4_if(m4_defn([en_dflt_valgrind_]vgtool),[off],dnl
110
+ [AS_HELP_STRING([--enable-valgrind-]vgtool, [Whether to use ]vgtool[ during the Valgrind tests])],dnl
111
+ [AS_HELP_STRING([--disable-valgrind-]vgtool, [Whether to skip ]vgtool[ during the Valgrind tests])]),
112
+ [enable_valgrind_]vgtool[=$enableval],
113
+ [enable_valgrind_]vgtool[=])
114
+ AS_IF([test "$enable_valgrind" = "no"],[
115
+ enable_valgrind_]vgtool[=no],
116
+ [test "$enable_valgrind_]vgtool[" ]dnl
117
+ m4_if(m4_defn([en_dflt_valgrind_]vgtool), [off], [= "yes"], [!= "no"]),[
118
+ AC_CACHE_CHECK([for Valgrind tool ]vgtool,
119
+ [ax_cv_valgrind_tool_]vgtool,[
120
+ ax_cv_valgrind_tool_]vgtool[=no
121
+ m4_set_contains([valgrind_exp_tool_set],vgtool,
122
+ [m4_define([vgtoolx],[exp-]vgtool)],
123
+ [m4_define([vgtoolx],vgtool)])
124
+ AS_IF([`$VALGRIND --tool=]vgtoolx[ --help >/dev/null 2>&1`],[
125
+ ax_cv_valgrind_tool_]vgtool[=yes
94
126
  ])
95
127
  ])
96
-
97
- AC_SUBST([VALGRIND_HAVE_TOOL_]vgtooln,[$ax_cv_var])
128
+ AS_IF([test "$ax_cv_valgrind_tool_]vgtool[" = "no"],[
129
+ AS_IF([test "$enable_valgrind_]vgtool[" = "yes"],[
130
+ AC_MSG_ERROR([Valgrind does not support ]vgtool[; reconfigure with --disable-valgrind-]vgtool)
131
+ ],[
132
+ enable_valgrind_]vgtool[=no
133
+ ])
134
+ ],[
135
+ enable_valgrind_]vgtool[=yes
136
+ ])
98
137
  ])
138
+ AS_IF([test "$enable_valgrind_]vgtool[" = "yes"],[
139
+ valgrind_enabled_tools="$valgrind_enabled_tools ]m4_bpatsubst(vgtool,[^exp-])["
140
+ ])
141
+ AC_SUBST([ENABLE_VALGRIND_]vgtool,[$enable_valgrind_]vgtool)
99
142
  ])
143
+ AC_SUBST([valgrind_tools],["]m4_join([ ], valgrind_tool_list)["])
144
+ AC_SUBST([valgrind_enabled_tools],[$valgrind_enabled_tools])
100
145
 
101
146
  [VALGRIND_CHECK_RULES='
102
147
  # Valgrind check
@@ -118,7 +163,6 @@ VALGRIND_drd_FLAGS ?=
118
163
  VALGRIND_sgcheck_FLAGS ?=
119
164
 
120
165
  # Internal use
121
- valgrind_tools = memcheck helgrind drd sgcheck
122
166
  valgrind_log_files = $(addprefix test-suite-,$(addsuffix .log,$(valgrind_tools)))
123
167
 
124
168
  valgrind_memcheck_flags = --tool=memcheck $(VALGRIND_memcheck_FLAGS)
@@ -129,6 +173,9 @@ valgrind_sgcheck_flags = --tool=exp-sgcheck $(VALGRIND_sgcheck_FLAGS)
129
173
  valgrind_quiet = $(valgrind_quiet_$(V))
130
174
  valgrind_quiet_ = $(valgrind_quiet_$(AM_DEFAULT_VERBOSITY))
131
175
  valgrind_quiet_0 = --quiet
176
+ valgrind_v_use = $(valgrind_v_use_$(V))
177
+ valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY))
178
+ valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$''@):;
132
179
 
133
180
  # Support running with and without libtool.
134
181
  ifneq ($(LIBTOOL),)
@@ -140,13 +187,10 @@ endif
140
187
  # Use recursive makes in order to ignore errors during check
141
188
  check-valgrind:
142
189
  ifeq ($(VALGRIND_ENABLED),yes)
143
- -$(foreach tool,$(valgrind_tools), \
144
- $(if $(VALGRIND_HAVE_TOOL_$(tool))$(VALGRIND_HAVE_TOOL_exp_$(tool)), \
145
- $(MAKE) $(AM_MAKEFLAGS) -k check-valgrind-tool VALGRIND_TOOL=$(tool); \
146
- ) \
147
- )
190
+ $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k \
191
+ $(foreach tool, $(valgrind_enabled_tools), check-valgrind-$(tool))
148
192
  else
149
- @echo "Need to reconfigure with --enable-valgrind"
193
+ @echo "Need to use GNU make and reconfigure with --enable-valgrind"
150
194
  endif
151
195
 
152
196
  # Valgrind running
@@ -160,16 +204,22 @@ VALGRIND_LOG_COMPILER = \
160
204
  $(valgrind_lt) \
161
205
  $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS)
162
206
 
163
- check-valgrind-tool:
164
- ifeq ($(VALGRIND_ENABLED),yes)
165
- $(MAKE) check-TESTS \
166
- TESTS_ENVIRONMENT="$(VALGRIND_TESTS_ENVIRONMENT)" \
167
- LOG_COMPILER="$(VALGRIND_LOG_COMPILER)" \
168
- LOG_FLAGS="$(valgrind_$(VALGRIND_TOOL)_flags)" \
169
- TEST_SUITE_LOG=test-suite-$(VALGRIND_TOOL).log
207
+ define valgrind_tool_rule =
208
+ check-valgrind-$(1):
209
+ ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes)
210
+ $$(valgrind_v_use)$$(MAKE) check-TESTS \
211
+ TESTS_ENVIRONMENT="$$(VALGRIND_TESTS_ENVIRONMENT)" \
212
+ LOG_COMPILER="$$(VALGRIND_LOG_COMPILER)" \
213
+ LOG_FLAGS="$$(valgrind_$(1)_flags)" \
214
+ TEST_SUITE_LOG=test-suite-$(1).log
215
+ else ifeq ($$(VALGRIND_ENABLED),yes)
216
+ @echo "Need to reconfigure with --enable-valgrind-$(1)"
170
217
  else
171
218
  @echo "Need to reconfigure with --enable-valgrind"
172
219
  endif
220
+ endef
221
+
222
+ $(foreach tool,$(valgrind_tools),$(eval $(call valgrind_tool_rule,$(tool))))
173
223
 
174
224
  A''M_DISTCHECK_CONFIGURE_FLAGS ?=
175
225
  A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind
@@ -177,14 +227,15 @@ A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind
177
227
  MOSTLYCLEANFILES ?=
178
228
  MOSTLYCLEANFILES += $(valgrind_log_files)
179
229
 
180
- .PHONY: check-valgrind check-valgrind-tool
230
+ .PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools))
181
231
  ']
182
232
 
183
- AS_IF([test "$enable_valgrind" != "yes"],[
184
- VALGRIND_CHECK_RULES='
233
+ AS_IF([test "$enable_valgrind" != "yes"], [
234
+ VALGRIND_CHECK_RULES='
185
235
  check-valgrind:
186
236
  @echo "Need to use GNU make and reconfigure with --enable-valgrind"'
187
- ])
237
+ ])
238
+
188
239
  AC_SUBST([VALGRIND_CHECK_RULES])
189
240
  m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([VALGRIND_CHECK_RULES])])
190
241
  ])
@@ -53,7 +53,7 @@ fi[]dnl
53
53
  # to PKG_CHECK_MODULES(), but does not set variables or print errors.
54
54
  #
55
55
  # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
56
- # only at the first occurence in configure.ac, so if the first place
56
+ # only at the first occurrence in configure.ac, so if the first place
57
57
  # it's called might be skipped (such as if it is within an "if", you
58
58
  # have to call PKG_CHECK_EXISTS manually
59
59
  # --------------------------------------------------------------
@@ -1,7 +1,7 @@
1
- # Makefile.in generated by automake 1.15 from Makefile.am.
1
+ # Makefile.in generated by automake 1.15.1 from Makefile.am.
2
2
  # @configure_input@
3
3
 
4
- # Copyright (C) 1994-2014 Free Software Foundation, Inc.
4
+ # Copyright (C) 1994-2017 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,
@@ -89,7 +89,8 @@ build_triplet = @build@
89
89
  host_triplet = @host@
90
90
  subdir = msvc-scripts
91
91
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
92
- am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
92
+ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_catchable_segv.m4 \
93
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
93
94
  $(top_srcdir)/m4/ax_check_define.m4 \
94
95
  $(top_srcdir)/m4/ax_check_link_flag.m4 \
95
96
  $(top_srcdir)/m4/ax_pthread.m4 \
@@ -164,6 +165,10 @@ ECHO_C = @ECHO_C@
164
165
  ECHO_N = @ECHO_N@
165
166
  ECHO_T = @ECHO_T@
166
167
  EGREP = @EGREP@
168
+ ENABLE_VALGRIND_drd = @ENABLE_VALGRIND_drd@
169
+ ENABLE_VALGRIND_helgrind = @ENABLE_VALGRIND_helgrind@
170
+ ENABLE_VALGRIND_memcheck = @ENABLE_VALGRIND_memcheck@
171
+ ENABLE_VALGRIND_sgcheck = @ENABLE_VALGRIND_sgcheck@
167
172
  EXEEXT = @EXEEXT@
168
173
  FGREP = @FGREP@
169
174
  GREP = @GREP@
@@ -214,6 +219,7 @@ SAFECODE_HOME = @SAFECODE_HOME@
214
219
  SED = @SED@
215
220
  SET_MAKE = @SET_MAKE@
216
221
  SHELL = @SHELL@
222
+ SODIUM_LIBRARY_MINIMAL_DEF = @SODIUM_LIBRARY_MINIMAL_DEF@
217
223
  SODIUM_LIBRARY_VERSION = @SODIUM_LIBRARY_VERSION@
218
224
  SODIUM_LIBRARY_VERSION_MAJOR = @SODIUM_LIBRARY_VERSION_MAJOR@
219
225
  SODIUM_LIBRARY_VERSION_MINOR = @SODIUM_LIBRARY_VERSION_MINOR@
@@ -221,10 +227,6 @@ STRIP = @STRIP@
221
227
  TEST_LDFLAGS = @TEST_LDFLAGS@
222
228
  VALGRIND = @VALGRIND@
223
229
  VALGRIND_ENABLED = @VALGRIND_ENABLED@
224
- VALGRIND_HAVE_TOOL_drd = @VALGRIND_HAVE_TOOL_drd@
225
- VALGRIND_HAVE_TOOL_exp_sgcheck = @VALGRIND_HAVE_TOOL_exp_sgcheck@
226
- VALGRIND_HAVE_TOOL_helgrind = @VALGRIND_HAVE_TOOL_helgrind@
227
- VALGRIND_HAVE_TOOL_memcheck = @VALGRIND_HAVE_TOOL_memcheck@
228
230
  VERSION = @VERSION@
229
231
  abs_builddir = @abs_builddir@
230
232
  abs_srcdir = @abs_srcdir@
@@ -279,6 +281,8 @@ target_alias = @target_alias@
279
281
  top_build_prefix = @top_build_prefix@
280
282
  top_builddir = @top_builddir@
281
283
  top_srcdir = @top_srcdir@
284
+ valgrind_enabled_tools = @valgrind_enabled_tools@
285
+ valgrind_tools = @valgrind_tools@
282
286
  EXTRA_DIST = \
283
287
  process.bat \
284
288
  rep.vbs \
@@ -1,4 +1,5 @@
1
- cscript msvc-scripts/rep.vbs //Nologo s/@VERSION@/1.0.11/ < src\libsodium\include\sodium\version.h.in > tmp
1
+ cscript msvc-scripts/rep.vbs //Nologo s/@VERSION@/1.0.13/ < src\libsodium\include\sodium\version.h.in > tmp
2
2
  cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MAJOR@/9/ < tmp > tmp2
3
- cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MINOR@/3/ < tmp2 > src\libsodium\include\sodium\version.h
4
- del tmp tmp2
3
+ cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_VERSION_MINOR@/5/ < tmp2 > tmp3
4
+ cscript msvc-scripts/rep.vbs //Nologo s/@SODIUM_LIBRARY_MINIMAL_DEF@// < tmp3 > src\libsodium\include\sodium\version.h
5
+ del tmp tmp2 tmp3
@@ -0,0 +1,59 @@
1
+ This directory contains scripts and files to package libsodium for .NET Core.
2
+
3
+ *Note:* The NuGet package is intended for the implementation of language
4
+ bindings such as [NSec](https://github.com/ektrah/nsec). It does not provide a
5
+ .NET API itself.
6
+
7
+ In .NET Core, it is customary to provide pre-compiled binaries for all platforms
8
+ as NuGet packages. The purpose of the `prepare.py` script in this directory is
9
+ to generate a `Makefile` that downloads and builds libsodium binaries for a
10
+ number of platforms and assembles them in a NuGet package that can be uploaded
11
+ to [nuget.org](https://nuget.org/).
12
+
13
+ * For Windows, binaries are obtained from
14
+ [download.libsodium.org](https://download.libsodium.org/libsodium/releases/).
15
+ * For macOS, binaries are extracted from the
16
+ [Homebrew libsodium bottle](https://bintray.com/homebrew/bottles/libsodium).
17
+ * For Linux, libsodium is compiled in Docker containers.
18
+
19
+ See `prepare.py` for the complete list of supported platforms.
20
+
21
+ The metadata for the NuGet package is located in `libsodium.props`.
22
+
23
+
24
+ **Versioning**
25
+
26
+ Version numbers for the packages for .NET Core consist of three components:
27
+
28
+ * *libsodium version*
29
+ The libsodium version is in the format `X.Y.Z`.
30
+ * *package revision*
31
+ It may be necessary to release more than one package for a libsodium version,
32
+ e.g., when adding support for a new platform or if a release contains a broken
33
+ binary. In this case, a package revision number is added as a fourth part to
34
+ the libsodium version, starting at `1`. For example, `1.0.13` is the initial
35
+ release of the package for libsodium 1.0.13 and `1.0.13.5` is the fifth
36
+ revision (sixth release) of that package.
37
+ * *pre-release label*
38
+ If a package is a pre-release, a label is appended to the version number in
39
+ `-preview-##` format where `##` is the number of the pre-release, starting at
40
+ `01`. For example, `1.0.13-preview-01` is the first pre-release of the package
41
+ for libsodium 1.0.13 and `1.0.13.5-preview-02` the second pre-release of the
42
+ fifth revision of the package for libsodium 1.0.13.
43
+
44
+
45
+ **Making a release**
46
+
47
+ 1. Update any existing Docker images.
48
+ 2. Run `python3 prepare.py <version>` to generate the `Makefile`, where
49
+ `<version>` is the package version number in the format described above.
50
+ 3. Take a look at the generated `Makefile`. It uses `sudo` a few times.
51
+ 4. Run `make` to download and build the binaries and create the NuGet package.
52
+ You may need to install `docker`, `make`, `curl`, `tar` and `unzip` first.
53
+ 5. Grab a cup of coffee. Downloading the Docker images and compiling the Linux
54
+ binaries takes a while. When done, the NuGet package is output as a `.nupkg`
55
+ file in the `build` directory.
56
+ 6. Run `make test` to perform a quick test of the NuGet package. Verify that
57
+ everything else in the `.nupkg` file is in place.
58
+ 7. Publish the release by uploading the `.nupkg` file to
59
+ [nuget.org](https://nuget.org/).
@@ -0,0 +1,16 @@
1
+ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2
+ <ItemGroup>
3
+ <None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win7-x86\native\libsodium.dll">
4
+ <Link>x86\libsodium.dll</Link>
5
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
6
+ <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
7
+ <Visible>false</Visible>
8
+ </None>
9
+ <None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win7-x64\native\libsodium.dll">
10
+ <Link>x64\libsodium.dll</Link>
11
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
12
+ <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
13
+ <Visible>false</Visible>
14
+ </None>
15
+ </ItemGroup>
16
+ </Project>
@@ -0,0 +1,33 @@
1
+ <?xml version="1.0"?>
2
+ <Project>
3
+
4
+ <PropertyGroup>
5
+ <TargetFrameworks>netstandard1.1;net46</TargetFrameworks>
6
+ <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
7
+ <NoBuild>true</NoBuild>
8
+ <IncludeBuildOutput>false</IncludeBuildOutput>
9
+ <PackageOutputPath>$(MSBuildProjectDirectory)</PackageOutputPath>
10
+ <ProjectFileToPack>$(MSBuildProjectFullPath)</ProjectFileToPack>
11
+ </PropertyGroup>
12
+
13
+ <PropertyGroup>
14
+ <PackageId>libsodium</PackageId>
15
+ <Version><!-- set by prepare.py --></Version>
16
+ <Authors>Frank Denis</Authors>
17
+ <Description>Internal implementation package not meant for direct consumption. Please do not reference directly.</Description>
18
+ <Copyright>&#169; 2013-2017 Frank Denis</Copyright>
19
+ <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
20
+ <PackageLicenseUrl>https://raw.githubusercontent.com/jedisct1/libsodium/master/LICENSE</PackageLicenseUrl>
21
+ <PackageProjectUrl>https://libsodium.org/</PackageProjectUrl>
22
+ <MinClientVersion>4.0</MinClientVersion>
23
+ </PropertyGroup>
24
+
25
+ <ItemGroup>
26
+ <Content Include="LICENSE" PackagePath="" />
27
+ <Content Include="AUTHORS" PackagePath="" />
28
+ <Content Include="ChangeLog" PackagePath="" />
29
+ <Content Include="runtimes\**\*.*" PackagePath="runtimes\" />
30
+ <Content Include="build\**\*.*" PackagePath="build\" />
31
+ </ItemGroup>
32
+
33
+ </Project>
@@ -0,0 +1,262 @@
1
+ #!/usr/bin/env python3
2
+
3
+ import os.path
4
+ import re
5
+ import sys
6
+
7
+ WINDOWS = [
8
+ # --------------------- ----------------- #
9
+ # Runtime ID Platform #
10
+ # --------------------- ----------------- #
11
+ ( 'win7-x64', 'x64' ),
12
+ ( 'win7-x86', 'Win32' ),
13
+ # --------------------- ----------------- #
14
+ ]
15
+
16
+ MACOS = [
17
+ # --------------------- ----------------- #
18
+ # Runtime ID Codename #
19
+ # --------------------- ----------------- #
20
+ ( 'osx.10.10-x64', 'yosemite' ),
21
+ ( 'osx.10.11-x64', 'el_capitan' ),
22
+ ( 'osx.10.12-x64', 'sierra' ),
23
+ # --------------------- ----------------- #
24
+ ]
25
+
26
+ LINUX = [
27
+ # --------------------- ----------------- #
28
+ # Runtime ID Docker Image #
29
+ # --------------------- ----------------- #
30
+ ( 'centos.7-x64', 'centos:7.1.1503' ),
31
+ ( 'debian.8-x64', 'debian:8.2' ),
32
+ ( 'fedora.24-x64', 'fedora:24' ),
33
+ ( 'fedora.25-x64', 'fedora:25' ),
34
+ ( 'fedora.26-x64', 'fedora:26' ),
35
+ ( 'opensuse.42.1-x64', 'opensuse:42.1' ),
36
+ ( 'ubuntu.14.04-x64', 'ubuntu:trusty' ),
37
+ ( 'ubuntu.16.04-x64', 'ubuntu:xenial' ),
38
+ ( 'ubuntu.16.10-x64', 'ubuntu:yakkety' ),
39
+ # --------------------- ----------------- #
40
+ ]
41
+
42
+ EXTRAS = [ 'LICENSE', 'AUTHORS', 'ChangeLog' ]
43
+
44
+ PROPSFILE = 'libsodium.props'
45
+ DESKTOPTARGETSFILE = 'desktop.targets'
46
+ MAKEFILE = 'Makefile'
47
+ BUILDDIR = 'build'
48
+ CACHEDIR = 'cache'
49
+ TEMPDIR = 'temp'
50
+
51
+ PACKAGE = 'libsodium'
52
+ LIBRARY = 'libsodium'
53
+
54
+ DOCKER = 'sudo docker'
55
+
56
+ class Version:
57
+
58
+ def __init__(self, libsodium_version, package_version):
59
+ self.libsodium_version = libsodium_version
60
+ self.package_version = package_version
61
+
62
+ self.builddir = os.path.join(BUILDDIR, libsodium_version)
63
+ self.tempdir = os.path.join(TEMPDIR, libsodium_version)
64
+ self.projfile = os.path.join(self.builddir, '{0}.{1}.pkgproj'.format(PACKAGE, package_version))
65
+ self.propsfile = os.path.join(self.builddir, '{0}.props'.format(PACKAGE))
66
+ self.pkgfile = os.path.join(BUILDDIR, '{0}.{1}.nupkg'.format(PACKAGE, package_version))
67
+ self.desktoptargetsfile = os.path.join(self.builddir, 'build', 'net46', '{0}.targets'.format(PACKAGE))
68
+
69
+ class WindowsItem:
70
+
71
+ def __init__(self, version, rid, platform):
72
+ self.url = 'https://download.libsodium.org/libsodium/releases/libsodium-{0}-msvc.zip'.format(version.libsodium_version)
73
+ self.cachefile = os.path.join(CACHEDIR, re.sub(r'[^A-Za-z0-9.]', '-', self.url))
74
+ self.packfile = os.path.join(version.builddir, 'runtimes', rid, 'native', LIBRARY + '.dll')
75
+ self.itemfile = '{0}/Release/v140/dynamic/libsodium.dll'.format(platform)
76
+ self.tempdir = os.path.join(version.tempdir, rid)
77
+ self.tempfile = os.path.join(self.tempdir, os.path.normpath(self.itemfile))
78
+
79
+ def make(self, f):
80
+ f.write('\n')
81
+ f.write('{0}: {1}\n'.format(self.packfile, self.tempfile))
82
+ f.write('\t@mkdir -p $(dir $@)\n')
83
+ f.write('\tcp -f $< $@\n')
84
+ f.write('\n')
85
+ f.write('{0}: {1}\n'.format(self.tempfile, self.cachefile))
86
+ f.write('\t@mkdir -p $(dir $@)\n')
87
+ f.write('\tcd {0} && unzip -q -DD -o {1} \'{2}\'\n'.format(
88
+ self.tempdir,
89
+ os.path.relpath(self.cachefile, self.tempdir),
90
+ self.itemfile
91
+ ))
92
+
93
+ class MacOSItem:
94
+
95
+ def __init__(self, version, rid, codename):
96
+ self.url = 'https://bintray.com/homebrew/bottles/download_file?file_path=libsodium-{0}.{1}.bottle.tar.gz'.format(version.libsodium_version, codename)
97
+ self.cachefile = os.path.join(CACHEDIR, re.sub(r'[^A-Za-z0-9.]', '-', self.url))
98
+ self.packfile = os.path.join(version.builddir, 'runtimes', rid, 'native', LIBRARY + '.dylib')
99
+ self.itemfile = 'libsodium/{0}/lib/libsodium.dylib'.format(version.libsodium_version)
100
+ self.tempdir = os.path.join(version.tempdir, rid)
101
+ self.tempfile = os.path.join(self.tempdir, os.path.normpath(self.itemfile))
102
+
103
+ def make(self, f):
104
+ f.write('\n')
105
+ f.write('{0}: {1}\n'.format(self.packfile, self.tempfile))
106
+ f.write('\t@mkdir -p $(dir $@)\n')
107
+ f.write('\tcp -f $< $@\n')
108
+ f.write('\n')
109
+ f.write('{0}: {1}\n'.format(self.tempfile, self.cachefile))
110
+ f.write('\t@mkdir -p $(dir $@)\n')
111
+ f.write('\tcd {0} && tar xzmf {1} \'{2}\'\n'.format(
112
+ self.tempdir,
113
+ os.path.relpath(self.cachefile, self.tempdir),
114
+ os.path.dirname(self.itemfile)
115
+ ))
116
+
117
+ class LinuxItem:
118
+
119
+ def __init__(self, version, rid, docker_image):
120
+ self.url = 'https://download.libsodium.org/libsodium/releases/libsodium-{0}.tar.gz'.format(version.libsodium_version)
121
+ self.cachefile = os.path.join(CACHEDIR, re.sub(r'[^A-Za-z0-9.]', '-', self.url))
122
+ self.packfile = os.path.join(version.builddir, 'runtimes', rid, 'native', LIBRARY + '.so')
123
+ self.tempdir = os.path.join(version.tempdir, rid)
124
+ self.tempfile = os.path.join(self.tempdir, 'libsodium.so')
125
+ self.docker_image = docker_image
126
+ self.recipe = rid
127
+
128
+ def make(self, f):
129
+ recipe = self.recipe
130
+ while not os.path.exists(os.path.join('recipes', recipe)):
131
+ m = re.fullmatch(r'([^.-]+)((([.][^.-]+)*)[.][^.-]+)?([-].*)?', recipe)
132
+ if m.group(5) is None:
133
+ recipe = 'build'
134
+ break
135
+ elif m.group(2) is None:
136
+ recipe = m.group(1)
137
+ else:
138
+ recipe = m.group(1) + m.group(3) + m.group(5)
139
+
140
+ f.write('\n')
141
+ f.write('{0}: {1}\n'.format(self.packfile, self.tempfile))
142
+ f.write('\t@mkdir -p $(dir $@)\n')
143
+ f.write('\tcp -f $< $@\n')
144
+ f.write('\n')
145
+ f.write('{0}: {1}\n'.format(self.tempfile, self.cachefile))
146
+ f.write('\t@mkdir -p $(dir $@)\n')
147
+ f.write('\t{0} run --rm '.format(DOCKER) +
148
+ '-v $(abspath recipes):/io/recipes ' +
149
+ '-v $(abspath $<):/io/libsodium.tar.gz ' +
150
+ '-v $(abspath $(dir $@)):/io/output ' +
151
+ '{0} sh -x -e /io/recipes/{1}\n'.format(self.docker_image, recipe))
152
+
153
+ class ExtraItem:
154
+
155
+ def __init__(self, version, filename):
156
+ self.url = 'https://download.libsodium.org/libsodium/releases/libsodium-{0}.tar.gz'.format(version.libsodium_version)
157
+ self.cachefile = os.path.join(CACHEDIR, re.sub(r'[^A-Za-z0-9.]', '-', self.url))
158
+ self.packfile = os.path.join(version.builddir, filename)
159
+ self.itemfile = 'libsodium-{0}/{1}'.format(version.libsodium_version, filename)
160
+ self.tempdir = os.path.join(version.tempdir, 'extras')
161
+ self.tempfile = os.path.join(self.tempdir, os.path.normpath(self.itemfile))
162
+
163
+ def make(self, f):
164
+ f.write('\n')
165
+ f.write('{0}: {1}\n'.format(self.packfile, self.tempfile))
166
+ f.write('\t@mkdir -p $(dir $@)\n')
167
+ f.write('\tcp -f $< $@\n')
168
+ f.write('\n')
169
+ f.write('{0}: {1}\n'.format(self.tempfile, self.cachefile))
170
+ f.write('\t@mkdir -p $(dir $@)\n')
171
+ f.write('\tcd {0} && tar xzmf {1} \'{2}\'\n'.format(
172
+ self.tempdir,
173
+ os.path.relpath(self.cachefile, self.tempdir),
174
+ self.itemfile
175
+ ))
176
+
177
+ def main(args):
178
+ m = re.fullmatch(r'((\d+\.\d+\.\d+)(\.\d+)?)(?:-(\w+(?:[_.-]\w+)*))?', args[1]) if len(args) == 2 else None
179
+
180
+ if m is None:
181
+ print('Usage:')
182
+ print(' python3 prepare.py <version>')
183
+ print()
184
+ print('Examples:')
185
+ print(' python3 prepare.py 1.0.13-preview-01')
186
+ print(' python3 prepare.py 1.0.13-preview-02')
187
+ print(' python3 prepare.py 1.0.13-preview-03')
188
+ print(' python3 prepare.py 1.0.13')
189
+ print(' python3 prepare.py 1.0.13.1-preview-01')
190
+ print(' python3 prepare.py 1.0.13.1')
191
+ print(' python3 prepare.py 1.0.13.2')
192
+ return 1
193
+
194
+ version = Version(m.group(2), m.group(0))
195
+
196
+ items = [ WindowsItem(version, rid, platform) for (rid, platform) in WINDOWS ] + \
197
+ [ MacOSItem(version, rid, codename) for (rid, codename) in MACOS ] + \
198
+ [ LinuxItem(version, rid, docker_image) for (rid, docker_image) in LINUX ] + \
199
+ [ ExtraItem(version, filename) for filename in EXTRAS ]
200
+
201
+ downloads = {item.cachefile: item.url for item in items}
202
+
203
+ with open(MAKEFILE, 'w') as f:
204
+ f.write('all: {0}\n'.format(version.pkgfile))
205
+
206
+ for download in sorted(downloads):
207
+ f.write('\n')
208
+ f.write('{0}:\n'.format(download))
209
+ f.write('\t@mkdir -p $(dir $@)\n')
210
+ f.write('\tcurl -f#Lo $@ \'{0}\'\n'.format(downloads[download]))
211
+
212
+ for item in items:
213
+ item.make(f)
214
+
215
+ f.write('\n')
216
+ f.write('{0}: {1}\n'.format(version.desktoptargetsfile, DESKTOPTARGETSFILE))
217
+ f.write('\t@mkdir -p $(dir $@)\n')
218
+ f.write('\tcp -f $< $@\n')
219
+
220
+ f.write('\n')
221
+ f.write('{0}: {1}\n'.format(version.propsfile, PROPSFILE))
222
+ f.write('\t@mkdir -p $(dir $@)\n')
223
+ f.write('\tcp -f $< $@\n')
224
+
225
+ f.write('\n')
226
+ f.write('{0}: {1}\n'.format(version.projfile, version.propsfile))
227
+ f.write('\t@mkdir -p $(dir $@)\n')
228
+ f.write('\techo \'' +
229
+ '<Project Sdk="Microsoft.NET.Sdk">' +
230
+ '<Import Project="{0}" />'.format(os.path.relpath(version.propsfile, os.path.dirname(version.projfile))) +
231
+ '<PropertyGroup>' +
232
+ '<Version>{0}</Version>'.format(version.package_version) +
233
+ '</PropertyGroup>' +
234
+ '</Project>\' > $@\n')
235
+
236
+ f.write('\n')
237
+ f.write('{0}:'.format(version.pkgfile))
238
+ f.write(' \\\n\t\t{0}'.format(version.projfile))
239
+ f.write(' \\\n\t\t{0}'.format(version.propsfile))
240
+ f.write(' \\\n\t\t{0}'.format(version.desktoptargetsfile))
241
+ for item in items:
242
+ f.write(' \\\n\t\t{0}'.format(item.packfile))
243
+ f.write('\n')
244
+ f.write('\t@mkdir -p $(dir $@)\n')
245
+ f.write('\t{0} run --rm '.format(DOCKER) +
246
+ '-v $(abspath recipes):/io/recipes ' +
247
+ '-v $(abspath $(dir $<)):/io/input ' +
248
+ '-v $(abspath $(dir $@)):/io/output ' +
249
+ '{0} sh -x -e /io/recipes/{1} {2}\n'.format('microsoft/dotnet:1.1-sdk', 'pack', os.path.relpath(version.projfile, version.builddir)))
250
+
251
+ f.write('\n')
252
+ f.write('test: {0}\n'.format(version.pkgfile))
253
+ f.write('\t{0} run --rm '.format(DOCKER) +
254
+ '-v $(abspath recipes):/io/recipes ' +
255
+ '-v $(abspath $(dir $<)):/io/packages ' +
256
+ '{0} sh -x -e /io/recipes/{1} "{2}"\n'.format('microsoft/dotnet:1.1-sdk', 'test', version.package_version))
257
+
258
+ print('prepared', MAKEFILE, 'to make', version.pkgfile, 'for libsodium', version.libsodium_version)
259
+ return 0
260
+
261
+ if __name__ == '__main__':
262
+ sys.exit(main(sys.argv))