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.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/lib/rbnacl/libsodium/version.rb +1 -1
- data/vendor/libsodium/AUTHORS +45 -33
- data/vendor/libsodium/ChangeLog +63 -2
- data/vendor/libsodium/LICENSE +1 -1
- data/vendor/libsodium/Makefile.am +1 -0
- data/vendor/libsodium/Makefile.in +17 -14
- data/vendor/libsodium/README.markdown +1 -0
- data/vendor/libsodium/THANKS +38 -4
- data/vendor/libsodium/aclocal.m4 +25 -24
- data/vendor/libsodium/autogen.sh +12 -7
- data/vendor/libsodium/autom4te.cache/output.0 +5066 -2281
- data/vendor/libsodium/autom4te.cache/output.1 +1013 -600
- data/vendor/libsodium/autom4te.cache/output.2 +5066 -2281
- data/vendor/libsodium/autom4te.cache/requests +426 -1584
- data/vendor/libsodium/autom4te.cache/traces.0 +2044 -876
- data/vendor/libsodium/autom4te.cache/traces.1 +996 -523
- data/vendor/libsodium/autom4te.cache/traces.2 +1996 -828
- data/vendor/libsodium/build-aux/compile +5 -4
- data/vendor/libsodium/build-aux/config.guess +120 -68
- data/vendor/libsodium/build-aux/config.sub +51 -22
- data/vendor/libsodium/build-aux/depcomp +3 -3
- data/vendor/libsodium/build-aux/install-sh +2 -2
- data/vendor/libsodium/build-aux/missing +3 -3
- data/vendor/libsodium/build-aux/test-driver +3 -3
- data/vendor/libsodium/builds/msvc/properties/Win32.props +4 -1
- data/vendor/libsodium/builds/msvc/properties/x64.props +4 -1
- data/vendor/libsodium/builds/msvc/resource.h +14 -0
- data/vendor/libsodium/builds/msvc/resource.rc +63 -0
- data/vendor/libsodium/builds/msvc/version.h +7 -4
- data/vendor/libsodium/builds/msvc/vs2010/libsodium.import.props +1 -1
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.props +10 -5
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj +182 -139
- data/vendor/libsodium/builds/msvc/vs2010/libsodium/libsodium.vcxproj.filters +632 -470
- data/vendor/libsodium/builds/msvc/vs2012/libsodium.import.props +1 -1
- data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.props +10 -5
- data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj +182 -129
- data/vendor/libsodium/builds/msvc/vs2012/libsodium/libsodium.vcxproj.filters +632 -470
- data/vendor/libsodium/builds/msvc/vs2013/libsodium.import.props +1 -1
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.props +10 -5
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj +182 -129
- data/vendor/libsodium/builds/msvc/vs2013/libsodium/libsodium.vcxproj.filters +632 -470
- data/vendor/libsodium/builds/msvc/vs2015/libsodium.import.props +1 -1
- data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.props +10 -5
- data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj +181 -118
- data/vendor/libsodium/builds/msvc/vs2015/libsodium/libsodium.vcxproj.filters +632 -470
- data/vendor/libsodium/builds/msvc/vs2017/libsodium.import.props +52 -0
- data/vendor/libsodium/builds/msvc/vs2017/libsodium.import.xml +17 -0
- data/vendor/libsodium/builds/msvc/vs2017/libsodium.sln +52 -0
- data/vendor/libsodium/builds/msvc/vs2017/libsodium/libsodium.props +48 -0
- data/vendor/libsodium/builds/msvc/vs2017/libsodium/libsodium.vcxproj +320 -0
- data/vendor/libsodium/builds/msvc/vs2017/libsodium/libsodium.vcxproj.filters +962 -0
- data/vendor/libsodium/builds/msvc/vs2017/libsodium/libsodium.xml +15 -0
- data/vendor/libsodium/configure +1002 -589
- data/vendor/libsodium/configure.ac +48 -21
- data/vendor/libsodium/contrib/Findsodium.cmake +267 -0
- data/vendor/libsodium/contrib/Makefile.am +3 -0
- data/vendor/libsodium/contrib/Makefile.in +483 -0
- data/vendor/libsodium/dist-build/Makefile.in +11 -7
- data/vendor/libsodium/dist-build/android-armv8-a.sh +1 -1
- data/vendor/libsodium/dist-build/android-build.sh +25 -17
- data/vendor/libsodium/dist-build/android-mips32.sh +1 -1
- data/vendor/libsodium/dist-build/android-mips64.sh +1 -1
- data/vendor/libsodium/dist-build/android-x86_64.sh +1 -1
- data/vendor/libsodium/dist-build/emscripten-symbols.def +150 -2
- data/vendor/libsodium/dist-build/emscripten-wasm.sh +132 -0
- data/vendor/libsodium/dist-build/emscripten.sh +8 -6
- data/vendor/libsodium/dist-build/ios.sh +29 -5
- data/vendor/libsodium/libsodium.vcxproj +139 -77
- data/vendor/libsodium/libsodium.vcxproj.filters +315 -144
- data/vendor/libsodium/m4/ax_check_catchable_segv.m4 +42 -0
- data/vendor/libsodium/m4/ax_check_compile_flag.m4 +6 -4
- data/vendor/libsodium/m4/ax_check_define.m4 +3 -3
- data/vendor/libsodium/m4/ax_check_gnu_make.m4 +31 -25
- data/vendor/libsodium/m4/ax_check_link_flag.m4 +8 -6
- data/vendor/libsodium/m4/ax_pthread.m4 +275 -275
- data/vendor/libsodium/m4/ax_valgrind_check.m4 +92 -41
- data/vendor/libsodium/m4/pkg.m4 +1 -1
- data/vendor/libsodium/msvc-scripts/Makefile.in +11 -7
- data/vendor/libsodium/msvc-scripts/process.bat +4 -3
- data/vendor/libsodium/packaging/dotnet-core/README.md +59 -0
- data/vendor/libsodium/packaging/dotnet-core/desktop.targets +16 -0
- data/vendor/libsodium/packaging/dotnet-core/libsodium.props +33 -0
- data/vendor/libsodium/packaging/dotnet-core/prepare.py +262 -0
- data/vendor/libsodium/packaging/dotnet-core/recipes/alpine-x64 +3 -0
- data/vendor/libsodium/packaging/dotnet-core/recipes/build +9 -0
- data/vendor/libsodium/packaging/dotnet-core/recipes/centos-x64 +3 -0
- data/vendor/libsodium/packaging/dotnet-core/recipes/debian-x64 +4 -0
- data/vendor/libsodium/packaging/dotnet-core/recipes/fedora-x64 +3 -0
- data/vendor/libsodium/packaging/dotnet-core/recipes/opensuse-x64 +3 -0
- data/vendor/libsodium/packaging/dotnet-core/recipes/pack +5 -0
- data/vendor/libsodium/packaging/dotnet-core/recipes/test +27 -0
- data/vendor/libsodium/packaging/dotnet-core/recipes/ubuntu-x64 +4 -0
- data/vendor/libsodium/packaging/nuget/package.config +1 -1
- data/vendor/libsodium/packaging/nuget/package.gsl +3 -3
- data/vendor/libsodium/src/Makefile.in +11 -7
- data/vendor/libsodium/src/libsodium/Makefile.am +113 -98
- data/vendor/libsodium/src/libsodium/Makefile.in +1034 -1236
- data/vendor/libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c +31 -12
- data/vendor/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c +31 -10
- data/vendor/libsodium/src/libsodium/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c +153 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/crypto_auth.c +7 -0
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/{cp/hmac_hmacsha256.c → auth_hmacsha256.c} +43 -35
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/{cp/hmac_hmacsha512.c → auth_hmacsha512.c} +43 -35
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/{cp/hmac_hmacsha512256.c → auth_hmacsha512256.c} +48 -9
- data/vendor/libsodium/src/libsodium/crypto_box/crypto_box_easy.c +4 -3
- data/vendor/libsodium/src/libsodium/crypto_box/crypto_box_seal.c +2 -1
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c +197 -0
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_seal_curve25519xchacha20poly1305.c +79 -0
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c +150 -0
- data/vendor/libsodium/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c +1156 -662
- data/vendor/libsodium/src/libsodium/crypto_core/hchacha20/core_hchacha20.c +12 -5
- data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/{core_hsalsa20_api.c → core_hsalsa20.c} +0 -0
- data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c +95 -0
- data/vendor/libsodium/src/libsodium/crypto_core/salsa/ref/core_salsa_ref.c +195 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/{blake2/generichash_blake2_api.c → blake2b/generichash_blake2.c} +7 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2.h +109 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.c +49 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.h +140 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ref.c +92 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.c +87 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.h +103 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.c +90 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.h +103 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-avx2.h +340 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-sse2.h +164 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-load-sse41.h +307 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.c +494 -0
- data/vendor/libsodium/src/libsodium/crypto_generichash/{blake2 → blake2b}/ref/generichash_blake2b.c +22 -26
- data/vendor/libsodium/src/libsodium/crypto_generichash/crypto_generichash.c +7 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c +254 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/sha256/{hash_sha256_api.c → hash_sha256.c} +4 -2
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c +280 -0
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/{hash_sha512_api.c → hash_sha512.c} +4 -2
- data/vendor/libsodium/src/libsodium/crypto_kdf/blake2b/kdf_blake2b.c +52 -0
- data/vendor/libsodium/src/libsodium/crypto_kdf/crypto_kdf.c +49 -0
- data/vendor/libsodium/src/libsodium/crypto_kx/crypto_kx.c +136 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c +6 -0
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c +34 -27
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h +1 -1
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +203 -156
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +178 -134
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c +22 -4
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.h +10 -12
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +564 -315
- data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.h +1 -1
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.c +131 -84
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.h +23 -18
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c +163 -145
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.h +2 -1
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx2.c +247 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c +42 -29
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c +71 -47
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.c +100 -65
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.h +77 -23
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blake2b-long.c +30 -31
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blamka-round-avx2.h +150 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blamka-round-ref.h +28 -26
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/blamka-round-ssse3.h +102 -99
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c +90 -41
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/pwhash_argon2id.c +213 -0
- data/vendor/libsodium/src/libsodium/crypto_pwhash/crypto_pwhash.c +72 -4
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c +34 -37
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt.h +27 -32
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c +120 -86
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.c +16 -13
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.h +4 -4
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.c +98 -50
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.c +23 -18
- data/vendor/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/sse/pwhash_scryptsalsa208sha256_sse.c +105 -105
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.c +395 -330
- data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c +225 -198
- data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox.c +7 -0
- data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c +6 -5
- data/vendor/libsodium/src/libsodium/crypto_secretbox/xchacha20poly1305/secretbox_xchacha20poly1305.c +170 -0
- data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c +83 -0
- data/vendor/libsodium/src/libsodium/crypto_shorthash/crypto_shorthash.c +7 -0
- data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.c +65 -0
- data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash_ref.h +24 -0
- data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.c +71 -0
- data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/{shorthash_siphash24_api.c → shorthash_siphash24.c} +0 -0
- data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/shorthash_siphashx24.c +11 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/crypto_sign.c +33 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ed25519_ref10.h +18 -0
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +18 -13
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c +29 -26
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +75 -36
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c +39 -15
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519.c +91 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/afternm_aes128ctr.c +174 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/beforenm_aes128ctr.c +66 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/common.h +766 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/consts.h +28 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/consts_aes128ctr.c +28 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/int128.h +50 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/int128_aes128ctr.c +149 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/stream_aes128ctr_nacl.c +31 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/nacl/xor_afternm_aes128ctr.c +195 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/{stream_aes128ctr_api.c → stream_aes128ctr.c} +6 -3
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.c +179 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c +173 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u0.h +86 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u1.h +98 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u4.h +175 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/u8.h +357 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/{stream_chacha20_ref.c → chacha20_ref.c} +93 -94
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.c +39 -7
- data/vendor/libsodium/src/libsodium/crypto_stream/crypto_stream.c +7 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.c +120 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20.c +93 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20.h +16 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/{amd64_xmm6/stream_salsa20_amd64_xmm6.S → xmm6/salsa20_xmm6-asm.S} +20 -12
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.c +31 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c +131 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.c +122 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.h +8 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u0.h +195 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u1.h +207 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u4.h +547 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/u8.h +476 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012_ref.c +106 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/stream_salsa2012.c +20 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208_ref.c +106 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208.c +20 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/xchacha20/stream_xchacha20.c +63 -0
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20.c +60 -0
- data/vendor/libsodium/src/libsodium/crypto_verify/sodium/verify.c +61 -0
- data/vendor/libsodium/src/libsodium/include/Makefile.am +8 -6
- data/vendor/libsodium/src/libsodium/include/Makefile.in +29 -21
- data/vendor/libsodium/src/libsodium/include/sodium.h +15 -4
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_aes256gcm.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_chacha20poly1305.h +6 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_aead_xchacha20poly1305.h +91 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha256.h +5 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xchacha20poly1305.h +153 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash_blake2b.h +3 -4
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha256.h +4 -3
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha512.h +4 -3
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_kdf.h +51 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_kdf_blake2b.h +42 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_kx.h +64 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +11 -9
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash.h +37 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_argon2i.h +40 -10
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_argon2id.h +116 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_pwhash_scryptsalsa208sha256.h +37 -4
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h +0 -4
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xchacha20poly1305.h +62 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h +5 -1
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash_siphash24.h +18 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign.h +22 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_ed25519.h +28 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes128ctr.h +10 -5
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_chacha20.h +14 -3
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa20.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa2012.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa208.h +3 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_xchacha20.h +53 -0
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_xsalsa20.h +4 -0
- data/vendor/libsodium/src/libsodium/include/sodium/private/common.h +84 -17
- data/vendor/libsodium/src/libsodium/include/sodium/private/implementations.h +11 -0
- data/vendor/libsodium/src/libsodium/include/sodium/private/sse2_64_32.h +50 -0
- data/vendor/libsodium/src/libsodium/include/sodium/randombytes.h +10 -2
- data/vendor/libsodium/src/libsodium/include/sodium/utils.h +4 -5
- data/vendor/libsodium/src/libsodium/include/sodium/version.h.in +4 -0
- data/vendor/libsodium/src/libsodium/randombytes/randombytes.c +47 -19
- data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +30 -50
- data/vendor/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +25 -15
- data/vendor/libsodium/src/libsodium/sodium/core.c +25 -23
- data/vendor/libsodium/src/libsodium/sodium/runtime.c +66 -57
- data/vendor/libsodium/src/libsodium/sodium/utils.c +120 -106
- data/vendor/libsodium/src/libsodium/sodium/version.c +10 -0
- data/vendor/libsodium/test/Makefile.in +11 -7
- data/vendor/libsodium/test/default/Makefile.am +65 -5
- data/vendor/libsodium/test/default/Makefile.in +243 -78
- data/vendor/libsodium/test/default/aead_aes256gcm.c +2 -2
- data/vendor/libsodium/test/default/aead_xchacha20poly1305.c +188 -0
- data/vendor/libsodium/test/default/aead_xchacha20poly1305.exp +51 -0
- data/vendor/libsodium/test/default/auth.c +11 -7
- data/vendor/libsodium/test/default/auth2.c +15 -12
- data/vendor/libsodium/test/default/auth3.c +18 -15
- data/vendor/libsodium/test/default/auth5.c +3 -2
- data/vendor/libsodium/test/default/auth6.c +4 -3
- data/vendor/libsodium/test/default/auth7.c +3 -2
- data/vendor/libsodium/test/default/box.c +57 -52
- data/vendor/libsodium/test/default/box2.c +41 -36
- data/vendor/libsodium/test/default/box7.c +4 -3
- data/vendor/libsodium/test/default/box8.c +4 -3
- data/vendor/libsodium/test/default/box_easy.c +36 -32
- data/vendor/libsodium/test/default/box_easy2.c +41 -34
- data/vendor/libsodium/test/default/box_seal.c +7 -6
- data/vendor/libsodium/test/default/box_seed.c +10 -8
- data/vendor/libsodium/test/default/chacha20.c +18 -3
- data/vendor/libsodium/test/default/chacha20.exp +45 -0
- data/vendor/libsodium/test/default/cmptest.h +1 -0
- data/vendor/libsodium/test/default/core1.c +10 -9
- data/vendor/libsodium/test/default/core2.c +13 -12
- data/vendor/libsodium/test/default/core3.c +13 -12
- data/vendor/libsodium/test/default/core4.c +11 -12
- data/vendor/libsodium/test/default/core5.c +13 -12
- data/vendor/libsodium/test/default/core6.c +15 -13
- data/vendor/libsodium/test/default/ed25519_convert.c +12 -9
- data/vendor/libsodium/test/default/hash.c +10 -6
- data/vendor/libsodium/test/default/hash3.c +3 -2
- data/vendor/libsodium/test/default/index-wasm.html.tpl +118 -0
- data/vendor/libsodium/test/default/kdf.c +61 -0
- data/vendor/libsodium/test/default/kdf.exp +77 -0
- data/vendor/libsodium/test/default/keygen.c +64 -0
- data/vendor/libsodium/test/default/keygen.exp +1 -0
- data/vendor/libsodium/test/default/kx.c +119 -0
- data/vendor/libsodium/test/default/kx.exp +7 -0
- data/vendor/libsodium/test/default/nacl-test-wrapper.sh +9 -2
- data/vendor/libsodium/test/default/onetimeauth.c +26 -23
- data/vendor/libsodium/test/default/onetimeauth2.c +22 -20
- data/vendor/libsodium/test/default/onetimeauth7.c +3 -2
- data/vendor/libsodium/test/default/pwhash.c +209 -157
- data/vendor/libsodium/test/default/pwhash_argon2id.c +388 -0
- data/vendor/libsodium/test/default/pwhash_argon2id.exp +15 -0
- data/vendor/libsodium/test/default/pwhash_scrypt.c +232 -224
- data/vendor/libsodium/test/default/pwhash_scrypt.exp +2 -1
- data/vendor/libsodium/test/default/pwhash_scrypt_ll.c +39 -41
- data/vendor/libsodium/test/default/randombytes.c +34 -13
- data/vendor/libsodium/test/default/randombytes.exp +1 -0
- data/vendor/libsodium/test/default/scalarmult.c +21 -18
- data/vendor/libsodium/test/default/scalarmult2.c +8 -6
- data/vendor/libsodium/test/default/scalarmult5.c +13 -10
- data/vendor/libsodium/test/default/scalarmult6.c +17 -14
- data/vendor/libsodium/test/default/scalarmult7.c +9 -10
- data/vendor/libsodium/test/default/secretbox.c +39 -36
- data/vendor/libsodium/test/default/secretbox2.c +28 -25
- data/vendor/libsodium/test/default/secretbox7.c +3 -2
- data/vendor/libsodium/test/default/secretbox8.c +4 -3
- data/vendor/libsodium/test/default/secretbox_easy.c +40 -37
- data/vendor/libsodium/test/default/secretbox_easy2.c +19 -18
- data/vendor/libsodium/test/default/shorthash.c +4 -4
- data/vendor/libsodium/test/default/sign.c +70 -13
- data/vendor/libsodium/test/default/sign.exp +2 -0
- data/vendor/libsodium/test/default/siphashx24.c +33 -0
- data/vendor/libsodium/test/default/siphashx24.exp +64 -0
- data/vendor/libsodium/test/default/sodium_core.c +9 -8
- data/vendor/libsodium/test/default/sodium_utils.c +52 -46
- data/vendor/libsodium/test/default/sodium_utils2.c +17 -8
- data/vendor/libsodium/test/default/sodium_utils3.c +15 -6
- data/vendor/libsodium/test/default/sodium_version.c +7 -1
- data/vendor/libsodium/test/default/stream.c +31 -18
- data/vendor/libsodium/test/default/stream.exp +65 -0
- data/vendor/libsodium/test/default/stream2.c +13 -9
- data/vendor/libsodium/test/default/stream3.c +12 -10
- data/vendor/libsodium/test/default/stream4.c +30 -27
- data/vendor/libsodium/test/default/verify1.c +5 -4
- data/vendor/libsodium/test/default/xchacha20.c +376 -0
- data/vendor/libsodium/test/default/xchacha20.exp +5 -0
- data/vendor/libsodium/test/quirks/quirks.h +4 -3
- metadata +140 -111
- data/vendor/libsodium/autom4te.cache/output.3 +0 -17240
- data/vendor/libsodium/autom4te.cache/output.4 +0 -17517
- data/vendor/libsodium/autom4te.cache/output.5 +0 -18535
- data/vendor/libsodium/autom4te.cache/output.6 +0 -19077
- data/vendor/libsodium/autom4te.cache/output.7 +0 -19837
- data/vendor/libsodium/autom4te.cache/traces.3 +0 -2833
- data/vendor/libsodium/autom4te.cache/traces.4 +0 -2951
- data/vendor/libsodium/autom4te.cache/traces.5 +0 -3042
- data/vendor/libsodium/autom4te.cache/traces.6 +0 -3194
- data/vendor/libsodium/autom4te.cache/traces.7 +0 -3614
- data/vendor/libsodium/builds/msvc/properties/ARM.props +0 -20
- data/vendor/libsodium/compile +0 -347
- data/vendor/libsodium/config.guess +0 -1568
- data/vendor/libsodium/config.sub +0 -1793
- data/vendor/libsodium/depcomp +0 -791
- data/vendor/libsodium/install-sh +0 -527
- data/vendor/libsodium/ltmain.sh +0 -9655
- data/vendor/libsodium/missing +0 -215
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256_api.c +0 -16
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/cp/verify_hmacsha256.c +0 -11
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/auth_hmacsha512_api.c +0 -16
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c +0 -12
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256_api.c +0 -16
- data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/verify_hmacsha512256.c +0 -14
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c +0 -41
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/after_curve25519xsalsa20poly1305.c +0 -22
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.c +0 -18
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/box_curve25519xsalsa20poly1305.c +0 -42
- data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c +0 -29
- data/vendor/libsodium/src/libsodium/crypto_core/hchacha20/core_hchacha20.h +0 -28
- data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20.c +0 -100
- data/vendor/libsodium/src/libsodium/crypto_core/salsa20/core_salsa20_api.c +0 -21
- data/vendor/libsodium/src/libsodium/crypto_core/salsa20/ref/core_salsa20.c +0 -126
- data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/core_salsa2012_api.c +0 -21
- data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/ref/core_salsa2012.c +0 -126
- data/vendor/libsodium/src/libsodium/crypto_core/salsa208/core_salsa208_api.c +0 -21
- data/vendor/libsodium/src/libsodium/crypto_core/salsa208/ref/core_salsa208.c +0 -126
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2-impl.h +0 -48
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h +0 -97
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-avx2.c +0 -45
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-avx2.h +0 -123
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ref.c +0 -94
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-sse41.c +0 -80
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-sse41.h +0 -97
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ssse3.c +0 -87
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-ssse3.h +0 -97
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-avx2.h +0 -339
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-sse2.h +0 -66
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-load-sse41.h +0 -400
- data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +0 -456
- data/vendor/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256.c +0 -269
- data/vendor/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512.c +0 -298
- data/vendor/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-impl.h +0 -40
- data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/box_xsalsa20poly1305.c +0 -35
- data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c +0 -26
- data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24.c +0 -72
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/description +0 -1
- data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519_api.c +0 -39
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/afternm_aes128ctr.c +0 -159
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/beforenm_aes128ctr.c +0 -59
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/common.h +0 -771
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/consts.h +0 -28
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/consts_aes128ctr.c +0 -14
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/int128.h +0 -56
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/int128_aes128ctr.c +0 -131
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/stream_aes128ctr.c +0 -29
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/types.h +0 -10
- data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/xor_afternm_aes128ctr.c +0 -180
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.h +0 -28
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/vec/stream_chacha20_vec.c +0 -336
- data/vendor/libsodium/src/libsodium/crypto_stream/chacha20/vec/stream_chacha20_vec.h +0 -28
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/stream_salsa20_ref.c +0 -55
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/xor_salsa20_ref.c +0 -63
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20_api.c +0 -19
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012.c +0 -51
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/xor_salsa2012.c +0 -54
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/stream_salsa2012_api.c +0 -11
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208.c +0 -51
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/xor_salsa208.c +0 -54
- data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208_api.c +0 -11
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/stream_xsalsa20.c +0 -24
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/xor_xsalsa20.c +0 -35
- data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20_api.c +0 -11
- data/vendor/libsodium/src/libsodium/crypto_verify/16/ref/verify_16.c +0 -17
- data/vendor/libsodium/src/libsodium/crypto_verify/16/verify_16_api.c +0 -6
- data/vendor/libsodium/src/libsodium/crypto_verify/32/ref/verify_32.c +0 -17
- data/vendor/libsodium/src/libsodium/crypto_verify/32/verify_32_api.c +0 -6
- data/vendor/libsodium/src/libsodium/crypto_verify/64/ref/verify_64.c +0 -17
- data/vendor/libsodium/src/libsodium/crypto_verify/64/verify_64_api.c +0 -6
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_int32.h +0 -8
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_int64.h +0 -8
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint16.h +0 -8
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint32.h +0 -8
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint64.h +0 -8
- data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint8.h +0 -8
- data/vendor/libsodium/test-driver +0 -139
@@ -1,22 +1,27 @@
|
|
1
1
|
# ===========================================================================
|
2
|
-
#
|
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
|
-
#
|
12
|
-
# check` under a variety of Valgrind tools to check for
|
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
|
44
|
-
# sgcheck
|
45
|
-
#
|
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
|
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
|
-
|
64
|
-
|
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
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
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
|
-
|
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
|
-
|
144
|
-
$(
|
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
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
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
|
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
|
])
|
data/vendor/libsodium/m4/pkg.m4
CHANGED
@@ -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
|
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-
|
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/
|
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.
|
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@/
|
4
|
-
|
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>© 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))
|