virgil-crypto 2.0.2b0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.gitmodules +3 -0
- data/Gemfile +4 -0
- data/README.md +36 -0
- data/Rakefile +12 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/ext/native/extconf.rb +25 -0
- data/ext/native/src/.gitignore +17 -0
- data/ext/native/src/.travis.yml +50 -0
- data/ext/native/src/CMakeLists.txt +336 -0
- data/ext/native/src/ChangeLog +440 -0
- data/ext/native/src/Jenkinsfile +208 -0
- data/ext/native/src/LICENSE +33 -0
- data/ext/native/src/README.md +195 -0
- data/ext/native/src/VERSION +1 -0
- data/ext/native/src/benchmark/CMakeLists.txt +52 -0
- data/ext/native/src/benchmark/benchmark_cipher.cxx +99 -0
- data/ext/native/src/benchmark/benchmark_hash.cxx +85 -0
- data/ext/native/src/benchmark/benchmark_signer.cxx +89 -0
- data/ext/native/src/benchmark/benchpress.hpp +464 -0
- data/ext/native/src/benchmark/cxxopts.hpp +1312 -0
- data/ext/native/src/ci/configure.sh +71 -0
- data/ext/native/src/ci/install-cmake.sh +48 -0
- data/ext/native/src/ci/install-credentials.sh +45 -0
- data/ext/native/src/ci/install-doxygen.sh +48 -0
- data/ext/native/src/ci/install-phpunit.sh +47 -0
- data/ext/native/src/ci/install-swig.sh +47 -0
- data/ext/native/src/ci/publish-docs.sh +125 -0
- data/ext/native/src/ci/run.sh +55 -0
- data/ext/native/src/ci/travis_ci_rsa.enc +0 -0
- data/ext/native/src/cmake/android.toolchain.cmake +1697 -0
- data/ext/native/src/cmake/apple.toolchain.cmake +323 -0
- data/ext/native/src/cmake/aux_source_directory_to_file.cmake +70 -0
- data/ext/native/src/cmake/check_pointer_size.cmake +64 -0
- data/ext/native/src/cmake/cmake_args.cmake +64 -0
- data/ext/native/src/cmake/copy_all_files.cmake +70 -0
- data/ext/native/src/cmake/file_regex_replace.cmake +69 -0
- data/ext/native/src/cmake/find_host_utils.cmake +54 -0
- data/ext/native/src/cmake/pnacl.toolchain.cmake +87 -0
- data/ext/native/src/cmake/uppercase_first_char.cmake +45 -0
- data/ext/native/src/cmake/uppercase_namespaces.cmake +86 -0
- data/ext/native/src/cmake/virgil_depends.cmake +53 -0
- data/ext/native/src/cmake/virgil_depends_local.cmake +325 -0
- data/ext/native/src/docs/.gitignore +0 -0
- data/ext/native/src/lib/CMakeLists.txt +162 -0
- data/ext/native/src/lib/Doxyfile.in +2310 -0
- data/ext/native/src/lib/cmake/config.cmake.in +40 -0
- data/ext/native/src/lib/include/CMakeLists.txt +68 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilByteArray.h +143 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilByteArrayUtils.h +121 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilChunkCipher.h +117 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilCipher.h +93 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilCipherBase.h +302 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilCryptoError.h +136 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilCryptoException.h +117 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilCustomParams.h +159 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilDataSink.h +77 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilDataSource.h +66 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilKeyPair.h +274 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilSigner.h +84 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilStreamCipher.h +99 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilStreamSigner.h +80 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilTinyCipher.h +283 -0
- data/ext/native/src/lib/include/virgil/crypto/VirgilVersion.h +88 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilAsymmetricCipher.h +395 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilBase64.h +70 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilHash.h +261 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilKDF.h +175 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilPBE.h +164 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilPBKDF.h +198 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilRandom.h +121 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilSymmetricCipher.h +305 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilSystemCryptoError.h +149 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/asn1/VirgilAsn1Compatible.h +100 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/asn1/VirgilAsn1Reader.h +179 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/asn1/VirgilAsn1Writer.h +241 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/asn1/internal/VirgilAsn1Alg.h +114 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSContent.h +113 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSContentInfo.h +91 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSEncryptedContent.h +90 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSEnvelopedData.h +116 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSKeyTransRecipient.h +103 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSPasswordRecipient.h +98 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/internal/VirgilOID.h +81 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/internal/VirgilTagFilter.h +95 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/internal/mbedtls_context.h +93 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/internal/mbedtls_context_policy_spec.h +231 -0
- data/ext/native/src/lib/include/virgil/crypto/foundation/internal/mbedtls_type_utils.h +407 -0
- data/ext/native/src/lib/include/virgil/crypto/internal/utils.h +58 -0
- data/ext/native/src/lib/include/virgil/crypto/stream/VirgilBytesDataSink.h +84 -0
- data/ext/native/src/lib/include/virgil/crypto/stream/VirgilBytesDataSource.h +90 -0
- data/ext/native/src/lib/include/virgil/crypto/stream/VirgilStreamDataSink.h +79 -0
- data/ext/native/src/lib/include/virgil/crypto/stream/VirgilStreamDataSource.h +84 -0
- data/ext/native/src/lib/mainpage.dox +60 -0
- data/ext/native/src/lib/src/VirgilAsn1Alg.cxx +122 -0
- data/ext/native/src/lib/src/VirgilAsn1Compatible.cxx +67 -0
- data/ext/native/src/lib/src/VirgilAsn1Reader.cxx +190 -0
- data/ext/native/src/lib/src/VirgilAsn1Writer.cxx +329 -0
- data/ext/native/src/lib/src/VirgilAsymmetricCipher.cxx +633 -0
- data/ext/native/src/lib/src/VirgilBase64.cxx +94 -0
- data/ext/native/src/lib/src/VirgilByteArrayUtils.cxx +222 -0
- data/ext/native/src/lib/src/VirgilCMSContent.cxx +124 -0
- data/ext/native/src/lib/src/VirgilCMSContentInfo.cxx +111 -0
- data/ext/native/src/lib/src/VirgilCMSEncryptedContent.cxx +84 -0
- data/ext/native/src/lib/src/VirgilCMSEnvelopedData.cxx +131 -0
- data/ext/native/src/lib/src/VirgilCMSKeyTransRecipient.cxx +96 -0
- data/ext/native/src/lib/src/VirgilCMSPasswordRecipient.cxx +93 -0
- data/ext/native/src/lib/src/VirgilChunkCipher.cxx +215 -0
- data/ext/native/src/lib/src/VirgilCipher.cxx +92 -0
- data/ext/native/src/lib/src/VirgilCipherBase.cxx +340 -0
- data/ext/native/src/lib/src/VirgilCryptoError.cxx +88 -0
- data/ext/native/src/lib/src/VirgilCryptoException.cxx +84 -0
- data/ext/native/src/lib/src/VirgilCustomParams.cxx +193 -0
- data/ext/native/src/lib/src/VirgilDataSink.cxx +46 -0
- data/ext/native/src/lib/src/VirgilHash.cxx +269 -0
- data/ext/native/src/lib/src/VirgilKDF.cxx +209 -0
- data/ext/native/src/lib/src/VirgilKeyPair.cxx +165 -0
- data/ext/native/src/lib/src/VirgilPBE.cxx +215 -0
- data/ext/native/src/lib/src/VirgilPBKDF.cxx +286 -0
- data/ext/native/src/lib/src/VirgilRandom.cxx +112 -0
- data/ext/native/src/lib/src/VirgilSigner.cxx +91 -0
- data/ext/native/src/lib/src/VirgilStreamCipher.cxx +116 -0
- data/ext/native/src/lib/src/VirgilStreamSigner.cxx +98 -0
- data/ext/native/src/lib/src/VirgilSymmetricCipher.cxx +369 -0
- data/ext/native/src/lib/src/VirgilSystemCryptoError.cxx +58 -0
- data/ext/native/src/lib/src/VirgilTagFilter.cxx +76 -0
- data/ext/native/src/lib/src/VirgilTinyCipher.cxx +648 -0
- data/ext/native/src/lib/src/VirgilVersion.cxx.in +28 -0
- data/ext/native/src/lib/src/stream/VirgilBytesDataSink.cxx +61 -0
- data/ext/native/src/lib/src/stream/VirgilBytesDataSource.cxx +68 -0
- data/ext/native/src/lib/src/stream/VirgilStreamDataSink.cxx +57 -0
- data/ext/native/src/lib/src/stream/VirgilStreamDataSource.cxx +68 -0
- data/ext/native/src/libs_ext/mbedtls/configs/config.h +84 -0
- data/ext/native/src/libs_ext/mbedtls/configs/config_desktop.h +13 -0
- data/ext/native/src/libs_ext/mbedtls/configs/config_pnacl.h +8 -0
- data/ext/native/src/libs_ext/mbedtls/mbedtls.cmake +102 -0
- data/ext/native/src/libs_ext/rapidjson/rapidjson.cmake +61 -0
- data/ext/native/src/libs_ext/tinyformat/cmake/config.cmake.in +43 -0
- data/ext/native/src/libs_ext/tinyformat/src/tinyformat.h +1003 -0
- data/ext/native/src/libs_ext/tinyformat/tinyformat.cmake +77 -0
- data/ext/native/src/migration-2.0.md +108 -0
- data/ext/native/src/tests/CMakeLists.txt +50 -0
- data/ext/native/src/tests/catch.hpp +10200 -0
- data/ext/native/src/tests/test_asn1_writer.cxx +268 -0
- data/ext/native/src/tests/test_asymmetric_cipher.cxx +140 -0
- data/ext/native/src/tests/test_base64.cxx +102 -0
- data/ext/native/src/tests/test_byte_array_utils.cxx +102 -0
- data/ext/native/src/tests/test_chunk_cipher.cxx +310 -0
- data/ext/native/src/tests/test_cipher.cxx +402 -0
- data/ext/native/src/tests/test_cipher_base.cxx +353 -0
- data/ext/native/src/tests/test_contract_copy_move.cxx +131 -0
- data/ext/native/src/tests/test_hash.cxx +153 -0
- data/ext/native/src/tests/test_key_pair.cxx +204 -0
- data/ext/native/src/tests/test_pbe.cxx +95 -0
- data/ext/native/src/tests/test_pbkdf.cxx +368 -0
- data/ext/native/src/tests/test_random.cxx +93 -0
- data/ext/native/src/tests/test_runner.cxx +43 -0
- data/ext/native/src/tests/test_signer.cxx +111 -0
- data/ext/native/src/tests/test_stream_cipher.cxx +277 -0
- data/ext/native/src/tests/test_symmetric_cipher.cxx +105 -0
- data/ext/native/src/tests/test_tag_filter.cxx +74 -0
- data/ext/native/src/tests/test_tiny_cipher.cxx +172 -0
- data/ext/native/src/utils/build.bat +274 -0
- data/ext/native/src/utils/build.sh +354 -0
- data/ext/native/src/utils/env.sh +39 -0
- data/ext/native/src/utils/zip.vbs +45 -0
- data/ext/native/src/wrappers/CMakeLists.txt +63 -0
- data/ext/native/src/wrappers/asmjs/CMakeLists.txt +109 -0
- data/ext/native/src/wrappers/asmjs/error.js +41 -0
- data/ext/native/src/wrappers/asmjs/example.html +77 -0
- data/ext/native/src/wrappers/asmjs/helpers.js +155 -0
- data/ext/native/src/wrappers/asmjs/patch_embind.pl +115 -0
- data/ext/native/src/wrappers/asmjs/wrapper.cxx +340 -0
- data/ext/native/src/wrappers/java/CMakeLists.txt +156 -0
- data/ext/native/src/wrappers/java/src/VirgilStreamDataSink.java +62 -0
- data/ext/native/src/wrappers/java/src/VirgilStreamDataSource.java +72 -0
- data/ext/native/src/wrappers/net/CMakeLists.txt +170 -0
- data/ext/native/src/wrappers/net/cmake/FindCSharp.cmake +72 -0
- data/ext/native/src/wrappers/net/cmake/FindDotNetFrameworkSdk.cmake +92 -0
- data/ext/native/src/wrappers/net/cmake/FindMono.cmake +162 -0
- data/ext/native/src/wrappers/net/cmake/UseCSharp.cmake +119 -0
- data/ext/native/src/wrappers/net/cmake/UseDotNetFrameworkSdk.cmake +12 -0
- data/ext/native/src/wrappers/net/cmake/UseMono.cmake +16 -0
- data/ext/native/src/wrappers/net/src/AssemblyInfo.cs +56 -0
- data/ext/native/src/wrappers/net/src/VirgilStreamDataSink.cs +63 -0
- data/ext/native/src/wrappers/net/src/VirgilStreamDataSource.cs +74 -0
- data/ext/native/src/wrappers/nodejs/CMakeLists.txt +134 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/android-ifaddrs.h +54 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/ares.h +636 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/ares_version.h +24 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/libplatform/libplatform.h +38 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/nameser.h +211 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/node.h +447 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/node_buffer.h +125 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/node_internals.h +236 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/node_object_wrap.h +137 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/node_version.h +69 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/aes.h +149 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/asn1.h +1417 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/asn1_mac.h +579 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/asn1t.h +973 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/bio.h +875 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/blowfish.h +130 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/bn.h +957 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/buffer.h +118 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/camellia.h +132 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/cast.h +107 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/cmac.h +82 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/cms.h +505 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/comp.h +79 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/conf.h +267 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/conf_api.h +89 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/crypto.h +661 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/des.h +257 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/des_old.h +497 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/dh.h +287 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/dsa.h +329 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/dso.h +451 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/dtls1.h +268 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/e_os2.h +328 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ebcdic.h +26 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ec.h +1193 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ecdh.h +127 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ecdsa.h +260 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/engine.h +961 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/err.h +389 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/evp.h +1480 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/hmac.h +109 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/idea.h +105 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/krb5_asn.h +240 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/kssl.h +197 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/lhash.h +240 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/md4.h +119 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/md5.h +119 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/mdc2.h +94 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/modes.h +153 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/obj_mac.h +4031 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/objects.h +1143 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ocsp.h +626 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/opensslconf.h +333 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/opensslv.h +97 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ossl_typ.h +209 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/pem.h +611 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/pem2.h +70 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/pkcs12.h +342 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/pkcs7.h +481 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/pqueue.h +99 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/rand.h +150 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/rc2.h +103 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/rc4.h +88 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ripemd.h +105 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/rsa.h +610 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/safestack.h +2536 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/seed.h +149 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/sha.h +214 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/srp.h +169 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/srtp.h +148 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ssl.h +2766 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ssl2.h +265 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ssl23.h +84 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ssl3.h +730 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/stack.h +106 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/symhacks.h +486 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/tls1.h +788 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ts.h +862 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/txt_db.h +112 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ui.h +415 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ui_compat.h +88 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/whrlpool.h +41 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/x509.h +1301 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/x509_vfy.h +595 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/x509v3.h +1015 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/pthread-fixes.h +72 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/smalloc.h +153 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/stdint-msvc2008.h +247 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/tree.h +768 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-aix.h +32 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-bsd.h +34 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-darwin.h +61 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-errno.h +418 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-linux.h +34 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-sunos.h +44 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-threadpool.h +37 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-unix.h +383 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-version.h +39 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-win.h +647 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv.h +1467 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8-debug.h +267 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8-platform.h +62 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8-profiler.h +611 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8-testing.h +48 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8-util.h +487 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8-version.h +20 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8.h +6741 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8config.h +451 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8stdint.h +33 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/zconf.h +511 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/zlib.h +1768 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/lib/win/x64/node.lib +0 -0
- data/ext/native/src/wrappers/nodejs/node-v0.12.7/lib/win/x86/node.lib +0 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/android-ifaddrs.h +54 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/ares.h +589 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/ares_version.h +24 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/libplatform/libplatform.h +38 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/nameser.h +211 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/node.h +470 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/node_buffer.h +65 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/node_internals.h +339 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/node_object_wrap.h +116 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/node_version.h +45 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/aes.h +149 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/BSD-x86/opensslconf.h +258 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/BSD-x86_64/opensslconf.h +258 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/VC-WIN32/opensslconf.h +259 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/VC-WIN64A/opensslconf.h +259 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/aix-gcc/opensslconf.h +261 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/aix64-gcc/opensslconf.h +261 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/darwin-i386-cc/opensslconf.h +261 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/darwin64-x86_64-cc/opensslconf.h +261 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/linux-aarch64/opensslconf.h +258 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/linux-armv4/opensslconf.h +258 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/linux-elf/opensslconf.h +258 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/linux-ppc/opensslconf.h +258 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/linux-ppc64/opensslconf.h +258 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/linux-x32/opensslconf.h +258 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/linux-x86_64/opensslconf.h +258 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/solaris-x86-gcc/opensslconf.h +258 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/solaris64-x86_64-gcc/opensslconf.h +258 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/asn1.h +1419 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/asn1_mac.h +579 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/asn1t.h +973 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/bio.h +879 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/blowfish.h +130 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/bn.h +939 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/buffer.h +119 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/camellia.h +132 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/cast.h +107 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/cmac.h +82 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/cms.h +555 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/comp.h +79 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/conf.h +267 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/conf_api.h +89 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/crypto.h +661 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/des.h +257 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/des_old.h +497 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/dh.h +392 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/dsa.h +332 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/dso.h +451 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/dtls1.h +272 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/e_os2.h +328 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ebcdic.h +26 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ec.h +1282 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ecdh.h +134 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ecdsa.h +335 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/engine.h +960 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/err.h +389 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/evp.h +1534 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/hmac.h +109 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/idea.h +105 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/krb5_asn.h +240 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/kssl.h +197 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/lhash.h +240 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/md4.h +119 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/md5.h +119 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/mdc2.h +94 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/modes.h +163 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/obj_mac.h +4194 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/objects.h +1143 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ocsp.h +637 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/opensslconf.h +138 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/opensslv.h +97 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ossl_typ.h +211 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/pem.h +615 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/pem2.h +70 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/pkcs12.h +342 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/pkcs7.h +481 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/pqueue.h +99 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/rand.h +150 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/rc2.h +103 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/rc4.h +88 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ripemd.h +105 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/rsa.h +664 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/safestack.h +2672 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/seed.h +149 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/sha.h +214 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/srp.h +169 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/srtp.h +147 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ssl.h +3164 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ssl2.h +265 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ssl23.h +84 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ssl3.h +774 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/stack.h +107 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/symhacks.h +516 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/tls1.h +813 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ts.h +862 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/txt_db.h +112 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ui.h +415 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ui_compat.h +88 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/whrlpool.h +41 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/x509.h +1327 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/x509_vfy.h +647 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/x509v3.h +1055 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/pthread-fixes.h +72 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/stdint-msvc2008.h +247 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/tree.h +768 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-aix.h +32 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-bsd.h +34 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-darwin.h +61 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-errno.h +418 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-linux.h +34 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-sunos.h +44 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-threadpool.h +37 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-unix.h +383 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-version.h +43 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-win.h +655 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv.h +1472 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8-debug.h +280 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8-platform.h +82 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8-profiler.h +648 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8-testing.h +48 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8-util.h +640 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8-version.h +20 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8.h +8366 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8config.h +424 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/zconf.h +511 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/zlib.h +1768 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/lib/win/x64/node.lib +0 -0
- data/ext/native/src/wrappers/nodejs/node-v4.1.0/lib/win/x86/node.lib +0 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/android-ifaddrs.h +54 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/ares.h +589 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/ares_version.h +24 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/common.gypi +337 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/config.gypi +44 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/libplatform/libplatform.h +38 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/nameser.h +211 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/node.h +470 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/node_buffer.h +65 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/node_internals.h +333 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/node_object_wrap.h +116 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/node_version.h +57 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/aes.h +149 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/BSD-x86/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/BSD-x86_64/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/VC-WIN32/opensslconf.h +271 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/VC-WIN64A/opensslconf.h +271 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/aix-gcc/opensslconf.h +273 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/aix64-gcc/opensslconf.h +273 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/darwin-i386-cc/opensslconf.h +273 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/darwin64-x86_64-cc/opensslconf.h +273 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/linux-aarch64/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/linux-armv4/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/linux-elf/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/linux-ppc/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/linux-ppc64/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/linux-x32/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/linux-x86_64/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/solaris-x86-gcc/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/solaris64-x86_64-gcc/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/asn1.h +1419 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/asn1_mac.h +579 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/asn1t.h +973 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/bio.h +883 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/blowfish.h +130 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/bn.h +949 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/buffer.h +125 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/camellia.h +132 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/cast.h +107 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/cmac.h +82 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/cms.h +555 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/comp.h +83 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/conf.h +267 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/conf_api.h +89 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/crypto.h +661 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/des.h +257 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/des_old.h +497 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/dh.h +393 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/dsa.h +332 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/dso.h +451 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/dtls1.h +272 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/e_os2.h +328 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ebcdic.h +26 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ec.h +1282 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ecdh.h +134 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ecdsa.h +335 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/engine.h +960 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/err.h +389 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/evp.h +1534 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/hmac.h +109 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/idea.h +105 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/krb5_asn.h +240 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/kssl.h +197 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/lhash.h +240 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/md4.h +119 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/md5.h +119 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/mdc2.h +94 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/modes.h +163 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/obj_mac.h +4194 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/objects.h +1143 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ocsp.h +637 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/opensslconf.h +138 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/opensslv.h +97 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ossl_typ.h +211 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/pem.h +615 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/pem2.h +70 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/pkcs12.h +342 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/pkcs7.h +481 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/pqueue.h +99 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/rand.h +150 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/rc2.h +103 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/rc4.h +88 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ripemd.h +105 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/rsa.h +664 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/safestack.h +2672 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/seed.h +149 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/sha.h +214 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/srp.h +179 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/srtp.h +147 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ssl.h +3169 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ssl2.h +265 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ssl23.h +84 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ssl3.h +774 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/stack.h +107 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/symhacks.h +516 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/tls1.h +810 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ts.h +862 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/txt_db.h +112 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ui.h +415 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ui_compat.h +88 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/whrlpool.h +41 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/x509.h +1328 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/x509_vfy.h +647 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/x509v3.h +1055 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/pthread-fixes.h +72 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/stdint-msvc2008.h +247 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/tree.h +768 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-aix.h +32 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-bsd.h +34 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-darwin.h +61 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-errno.h +418 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-linux.h +34 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-sunos.h +44 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-threadpool.h +37 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-unix.h +383 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-version.h +43 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-win.h +653 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv.h +1482 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8-debug.h +280 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8-platform.h +82 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8-profiler.h +648 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8-testing.h +48 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8-util.h +640 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8-version.h +20 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8.h +8379 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8config.h +424 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/zconf.h +511 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/zlib.h +1768 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/lib/win/x64/node.lib +0 -0
- data/ext/native/src/wrappers/nodejs/node-v4.4.4/lib/win/x86/node.lib +0 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/android-ifaddrs.h +54 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/ares.h +627 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/ares_build.h +117 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/ares_rules.h +130 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/ares_version.h +24 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/common.gypi +335 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/config.gypi +45 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/libplatform/libplatform.h +38 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/nameser.h +211 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/node.h +470 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/node_buffer.h +65 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/node_internals.h +331 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/node_object_wrap.h +116 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/node_version.h +54 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/aes.h +149 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/BSD-x86/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/BSD-x86_64/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/VC-WIN32/opensslconf.h +271 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/VC-WIN64A/opensslconf.h +271 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/aix-gcc/opensslconf.h +273 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/aix64-gcc/opensslconf.h +273 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/darwin-i386-cc/opensslconf.h +273 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/darwin64-x86_64-cc/opensslconf.h +273 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/linux-aarch64/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/linux-armv4/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/linux-elf/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/linux-ppc/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/linux-ppc64/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/linux-x32/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/linux-x86_64/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/solaris-x86-gcc/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/solaris64-x86_64-gcc/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/asn1.h +1419 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/asn1_mac.h +579 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/asn1t.h +973 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/bio.h +883 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/blowfish.h +130 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/bn.h +949 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/buffer.h +125 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/camellia.h +132 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/cast.h +107 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/cmac.h +82 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/cms.h +555 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/comp.h +79 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/conf.h +267 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/conf_api.h +89 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/crypto.h +661 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/des.h +257 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/des_old.h +497 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/dh.h +393 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/dsa.h +332 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/dso.h +451 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/dtls1.h +272 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/e_os2.h +328 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ebcdic.h +26 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ec.h +1282 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ecdh.h +134 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ecdsa.h +335 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/engine.h +960 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/err.h +389 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/evp.h +1534 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/hmac.h +109 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/idea.h +105 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/krb5_asn.h +240 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/kssl.h +197 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/lhash.h +240 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/md4.h +119 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/md5.h +119 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/mdc2.h +94 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/modes.h +163 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/obj_mac.h +4194 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/objects.h +1143 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ocsp.h +637 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/opensslconf.h +138 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/opensslv.h +97 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ossl_typ.h +211 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/pem.h +615 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/pem2.h +70 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/pkcs12.h +342 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/pkcs7.h +481 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/pqueue.h +99 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/rand.h +150 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/rc2.h +103 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/rc4.h +88 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ripemd.h +105 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/rsa.h +664 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/safestack.h +2672 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/seed.h +149 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/sha.h +214 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/srp.h +179 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/srtp.h +147 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ssl.h +3169 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ssl2.h +265 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ssl23.h +84 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ssl3.h +774 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/stack.h +107 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/symhacks.h +516 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/tls1.h +810 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ts.h +862 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/txt_db.h +112 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ui.h +415 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ui_compat.h +88 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/whrlpool.h +41 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/x509.h +1327 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/x509_vfy.h +647 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/x509v3.h +1055 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/pthread-fixes.h +72 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/stdint-msvc2008.h +247 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/tree.h +768 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-aix.h +32 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-bsd.h +34 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-darwin.h +61 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-errno.h +418 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-linux.h +34 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-sunos.h +44 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-threadpool.h +37 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-unix.h +383 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-version.h +43 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-win.h +653 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv.h +1482 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8-debug.h +280 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8-platform.h +114 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8-profiler.h +648 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8-testing.h +48 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8-util.h +643 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8-version.h +20 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8.h +8369 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8config.h +424 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/zconf.h +511 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/zlib.h +1768 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/lib/win/x64/node.lib +0 -0
- data/ext/native/src/wrappers/nodejs/node-v5.9.1/lib/win/x86/node.lib +0 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/android-ifaddrs.h +54 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/ares.h +635 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/ares_build.h +117 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/ares_rules.h +130 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/ares_version.h +24 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/common.gypi +361 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/config.gypi +47 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/libplatform/libplatform.h +38 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/nameser.h +211 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/node.h +489 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/node_buffer.h +68 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/node_internals.h +309 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/node_object_wrap.h +111 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/node_version.h +54 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/aes.h +149 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/BSD-x86/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/BSD-x86_64/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/VC-WIN32/opensslconf.h +271 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/VC-WIN64A/opensslconf.h +271 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/aix-gcc/opensslconf.h +273 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/aix64-gcc/opensslconf.h +273 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/darwin-i386-cc/opensslconf.h +273 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/darwin64-x86_64-cc/opensslconf.h +273 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux-aarch64/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux-armv4/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux-elf/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux-ppc/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux-ppc64/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux-x32/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux-x86_64/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux32-s390x/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux64-s390x/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/solaris-x86-gcc/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/solaris64-x86_64-gcc/opensslconf.h +270 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/asn1.h +1419 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/asn1_mac.h +579 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/asn1t.h +973 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/bio.h +883 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/blowfish.h +130 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/bn.h +949 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/buffer.h +125 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/camellia.h +132 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/cast.h +107 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/cmac.h +82 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/cms.h +555 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/comp.h +83 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/conf.h +267 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/conf_api.h +89 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/crypto.h +661 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/des.h +257 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/des_old.h +497 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/dh.h +393 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/dsa.h +332 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/dso.h +451 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/dtls1.h +272 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/e_os2.h +328 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ebcdic.h +26 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ec.h +1282 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ecdh.h +134 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ecdsa.h +335 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/engine.h +960 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/err.h +389 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/evp.h +1534 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/hmac.h +109 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/idea.h +105 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/krb5_asn.h +240 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/kssl.h +197 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/lhash.h +240 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/md4.h +119 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/md5.h +119 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/mdc2.h +94 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/modes.h +163 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/obj_mac.h +4194 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/objects.h +1143 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ocsp.h +637 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/opensslconf.h +146 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/opensslv.h +97 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ossl_typ.h +211 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/pem.h +615 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/pem2.h +70 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/pkcs12.h +342 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/pkcs7.h +481 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/pqueue.h +99 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/rand.h +150 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/rc2.h +103 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/rc4.h +88 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ripemd.h +105 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/rsa.h +664 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/safestack.h +2672 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/seed.h +149 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/sha.h +214 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/srp.h +179 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/srtp.h +147 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ssl.h +3169 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ssl2.h +265 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ssl23.h +84 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ssl3.h +774 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/stack.h +107 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/symhacks.h +516 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/tls1.h +810 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ts.h +862 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/txt_db.h +112 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ui.h +415 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ui_compat.h +88 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/whrlpool.h +41 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/x509.h +1328 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/x509_vfy.h +647 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/x509v3.h +1055 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/pthread-fixes.h +72 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/stdint-msvc2008.h +247 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/tree.h +768 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-aix.h +32 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-bsd.h +34 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-darwin.h +61 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-errno.h +418 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-linux.h +34 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-sunos.h +44 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-threadpool.h +37 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-unix.h +383 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-version.h +43 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-win.h +648 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv.h +1495 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8-debug.h +288 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8-experimental.h +54 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8-platform.h +171 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8-profiler.h +782 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8-testing.h +48 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8-util.h +643 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8-version.h +20 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8.h +8586 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8config.h +438 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/zconf.h +511 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/zlib.h +1768 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/lib/win/x64/node.lib +0 -0
- data/ext/native/src/wrappers/nodejs/node-v6.1.0/lib/win/x86/node.lib +0 -0
- data/ext/native/src/wrappers/php/CMakeLists.txt +118 -0
- data/ext/native/src/wrappers/php/cmake/FindPHPLibs.cmake +49 -0
- data/ext/native/src/wrappers/php/tests/CMakeLists.txt +94 -0
- data/ext/native/src/wrappers/php/tests/StringSink.php.in +60 -0
- data/ext/native/src/wrappers/php/tests/StringSource.php.in +67 -0
- data/ext/native/src/wrappers/php/tests/VirgilAsn1Reader_Test.php.in +160 -0
- data/ext/native/src/wrappers/php/tests/VirgilAsn1Writer_Test.php.in +160 -0
- data/ext/native/src/wrappers/php/tests/VirgilAsymmetricCipher_EC_Test.php.in +337 -0
- data/ext/native/src/wrappers/php/tests/VirgilAsymmetricCipher_RSA_Test.php.in +340 -0
- data/ext/native/src/wrappers/php/tests/VirgilChunkCipher_Test.php.in +207 -0
- data/ext/native/src/wrappers/php/tests/VirgilCipher_Test.php.in +181 -0
- data/ext/native/src/wrappers/php/tests/VirgilCustomParams_Test.php.in +78 -0
- data/ext/native/src/wrappers/php/tests/VirgilHash_MD5_Test.php.in +159 -0
- data/ext/native/src/wrappers/php/tests/VirgilHash_SHA256_Test.php.in +159 -0
- data/ext/native/src/wrappers/php/tests/VirgilHash_SHA512_Test.php.in +167 -0
- data/ext/native/src/wrappers/php/tests/VirgilKDF_Test.php.in +123 -0
- data/ext/native/src/wrappers/php/tests/VirgilPBE_Test.php.in +84 -0
- data/ext/native/src/wrappers/php/tests/VirgilPBKDF_Test.php.in +66 -0
- data/ext/native/src/wrappers/php/tests/VirgilRandom_Test.php.in +56 -0
- data/ext/native/src/wrappers/php/tests/VirgilSigner_Test.php.in +211 -0
- data/ext/native/src/wrappers/php/tests/VirgilStreamCipher_Test.php.in +207 -0
- data/ext/native/src/wrappers/php/tests/VirgilStreamSigner_Test.php.in +212 -0
- data/ext/native/src/wrappers/php/tests/VirgilSymmetricCipher_Test.php.in +174 -0
- data/ext/native/src/wrappers/php/tests/VirgilVersion_Test.php.in +61 -0
- data/ext/native/src/wrappers/php/tests/data/CMakeLists.txt +50 -0
- data/ext/native/src/wrappers/php/tests/data/asn1_complex.der +0 -0
- data/ext/native/src/wrappers/php/tests/data/asn1_custom_tag.der +0 -0
- data/ext/native/src/wrappers/php/tests/data/asn1_integer.der +1 -0
- data/ext/native/src/wrappers/php/tests/data/asn1_octet_string.der +0 -0
- data/ext/native/src/wrappers/php/tests/data/asn1_sequence.der +0 -0
- data/ext/native/src/wrappers/php/tests/data/asn1_utf8_string.der +1 -0
- data/ext/native/src/wrappers/php/tests/data/certificate_public_key.pem +6 -0
- data/ext/native/src/wrappers/python/CMakeLists.txt +95 -0
- data/ext/native/src/wrappers/ruby/CMakeLists.txt +84 -0
- data/ext/native/src/wrappers/swig/common.i +119 -0
- data/ext/native/src/wrappers/swig/csharp/FixedArray.i +347 -0
- data/ext/native/src/wrappers/swig/csharp/VirgilByteArray.i +38 -0
- data/ext/native/src/wrappers/swig/csharp/common.i +48 -0
- data/ext/native/src/wrappers/swig/csharp/csharphead.swg.in +85 -0
- data/ext/native/src/wrappers/swig/java/VirgilByteArray.i +158 -0
- data/ext/native/src/wrappers/swig/java/common.i +70 -0
- data/ext/native/src/wrappers/swig/php/VirgilByteArray.i +107 -0
- data/ext/native/src/wrappers/swig/php/common.i +90 -0
- data/ext/native/src/wrappers/swig/util.i +85 -0
- data/ext/native/src/wrappers/swig/wrapper.i.in +158 -0
- data/lib/virgil/crypto.rb +10 -0
- data/lib/virgil/crypto/bytes.rb +57 -0
- data/lib/virgil/crypto/version.rb +5 -0
- data/lib/virgil/crypto/virgil_stream_data_sink.rb +53 -0
- data/lib/virgil/crypto/virgil_stream_data_source.rb +54 -0
- data/virgil-crypto.gemspec +53 -0
- metadata +978 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2015-2016 Virgil Security Inc.
|
|
3
|
+
*
|
|
4
|
+
* Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
|
|
5
|
+
*
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Redistribution and use in source and binary forms, with or without
|
|
9
|
+
* modification, are permitted provided that the following conditions are
|
|
10
|
+
* met:
|
|
11
|
+
*
|
|
12
|
+
* (1) Redistributions of source code must retain the above copyright
|
|
13
|
+
* notice, this list of conditions and the following disclaimer.
|
|
14
|
+
*
|
|
15
|
+
* (2) Redistributions in binary form must reproduce the above copyright
|
|
16
|
+
* notice, this list of conditions and the following disclaimer in
|
|
17
|
+
* the documentation and/or other materials provided with the
|
|
18
|
+
* distribution.
|
|
19
|
+
*
|
|
20
|
+
* (3) Neither the name of the copyright holder nor the names of its
|
|
21
|
+
* contributors may be used to endorse or promote products derived from
|
|
22
|
+
* this software without specific prior written permission.
|
|
23
|
+
*
|
|
24
|
+
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR
|
|
25
|
+
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
26
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
27
|
+
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
|
28
|
+
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
29
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
30
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
31
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
32
|
+
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
|
33
|
+
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
34
|
+
* POSSIBILITY OF SUCH DAMAGE.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @file test_hash.cxx
|
|
39
|
+
* @brief Covers class VirgilByteArrayUtils
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
#include "catch.hpp"
|
|
43
|
+
|
|
44
|
+
#include <iostream>
|
|
45
|
+
|
|
46
|
+
#include <virgil/crypto/VirgilByteArray.h>
|
|
47
|
+
#include <virgil/crypto/VirgilByteArrayUtils.h>
|
|
48
|
+
|
|
49
|
+
using virgil::crypto::VirgilByteArray;
|
|
50
|
+
using virgil::crypto::VirgilByteArrayUtils;
|
|
51
|
+
|
|
52
|
+
TEST_CASE("Json -> bytes", "[byte-array]") {
|
|
53
|
+
std::string pretty_json =
|
|
54
|
+
"{"
|
|
55
|
+
" \"object\" : {"
|
|
56
|
+
" \"number_integer\" : 123,"
|
|
57
|
+
" \"bool_true\" : true,"
|
|
58
|
+
" \"bool_false\" : false,"
|
|
59
|
+
" \"string\" : \"test string\""
|
|
60
|
+
" },"
|
|
61
|
+
" \"array\" : ["
|
|
62
|
+
" 1, true, false, \"test string\""
|
|
63
|
+
" ],"
|
|
64
|
+
" \"bool_true\" : true,"
|
|
65
|
+
" \"null\" : null,"
|
|
66
|
+
" \"bool_false\" : false,"
|
|
67
|
+
" \"number_integer\" : 123,"
|
|
68
|
+
" \"string\" : \"test_string\""
|
|
69
|
+
"}";
|
|
70
|
+
std::string minified_json =
|
|
71
|
+
"{\"object\":{\"number_integer\":123,\"bool_true\":true,\"bool_false\":false,\""
|
|
72
|
+
"string\":\"test string\"},\"array\":[1,true,false,\"test string\"],\"bool_true"
|
|
73
|
+
"\":true,\"bool_false\":false,\"number_integer\":123,\"string\":\"test_string\","
|
|
74
|
+
"\"null\" : null}";
|
|
75
|
+
std::string rearranged_json =
|
|
76
|
+
"{"
|
|
77
|
+
" \"bool_false\" : false,"
|
|
78
|
+
" \"null\" : null,"
|
|
79
|
+
" \"number_integer\" : 123,"
|
|
80
|
+
" \"array\" : ["
|
|
81
|
+
" 1, true, false, \"test string\""
|
|
82
|
+
" ],"
|
|
83
|
+
" \"string\" : \"test_string\","
|
|
84
|
+
" \"bool_true\" : true,"
|
|
85
|
+
" \"object\" : {"
|
|
86
|
+
" \"bool_false\" : false,"
|
|
87
|
+
" \"string\" : \"test string\","
|
|
88
|
+
" \"bool_true\" : true,"
|
|
89
|
+
" \"number_integer\" : 123"
|
|
90
|
+
" }"
|
|
91
|
+
"}";
|
|
92
|
+
|
|
93
|
+
SECTION("Test JSON to bytes convertion") {
|
|
94
|
+
VirgilByteArray pretty_json_bytes = VirgilByteArrayUtils::jsonToBytes(pretty_json);
|
|
95
|
+
VirgilByteArray minified_json_bytes = VirgilByteArrayUtils::jsonToBytes(minified_json);
|
|
96
|
+
VirgilByteArray rearranged_json_bytes = VirgilByteArrayUtils::jsonToBytes(rearranged_json);
|
|
97
|
+
REQUIRE(VirgilByteArrayUtils::bytesToHex(pretty_json_bytes) ==
|
|
98
|
+
VirgilByteArrayUtils::bytesToHex(minified_json_bytes));
|
|
99
|
+
REQUIRE(VirgilByteArrayUtils::bytesToHex(pretty_json_bytes) ==
|
|
100
|
+
VirgilByteArrayUtils::bytesToHex(rearranged_json_bytes));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2015-2016 Virgil Security Inc.
|
|
3
|
+
*
|
|
4
|
+
* Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
|
|
5
|
+
*
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Redistribution and use in source and binary forms, with or without
|
|
9
|
+
* modification, are permitted provided that the following conditions are
|
|
10
|
+
* met:
|
|
11
|
+
*
|
|
12
|
+
* (1) Redistributions of source code must retain the above copyright
|
|
13
|
+
* notice, this list of conditions and the following disclaimer.
|
|
14
|
+
*
|
|
15
|
+
* (2) Redistributions in binary form must reproduce the above copyright
|
|
16
|
+
* notice, this list of conditions and the following disclaimer in
|
|
17
|
+
* the documentation and/or other materials provided with the
|
|
18
|
+
* distribution.
|
|
19
|
+
*
|
|
20
|
+
* (3) Neither the name of the copyright holder nor the names of its
|
|
21
|
+
* contributors may be used to endorse or promote products derived from
|
|
22
|
+
* this software without specific prior written permission.
|
|
23
|
+
*
|
|
24
|
+
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR
|
|
25
|
+
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
26
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
27
|
+
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
|
28
|
+
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
29
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
30
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
31
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
32
|
+
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
|
33
|
+
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
34
|
+
* POSSIBILITY OF SUCH DAMAGE.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @file test_chunk_cipher.cxx
|
|
39
|
+
* @brief Covers class VirgilChunkCipher
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
#if LIB_FILE_IO
|
|
43
|
+
|
|
44
|
+
#include "catch.hpp"
|
|
45
|
+
|
|
46
|
+
#include <virgil/crypto/VirgilByteArray.h>
|
|
47
|
+
#include <virgil/crypto/VirgilChunkCipher.h>
|
|
48
|
+
#include <virgil/crypto/VirgilKeyPair.h>
|
|
49
|
+
#include <virgil/crypto/stream/VirgilBytesDataSource.h>
|
|
50
|
+
#include <virgil/crypto/stream/VirgilBytesDataSink.h>
|
|
51
|
+
#include <virgil/crypto/foundation/VirgilBase64.h>
|
|
52
|
+
|
|
53
|
+
using virgil::crypto::str2bytes;
|
|
54
|
+
using virgil::crypto::bytes2hex;
|
|
55
|
+
using virgil::crypto::bytes2str;
|
|
56
|
+
using virgil::crypto::VirgilByteArray;
|
|
57
|
+
using virgil::crypto::VirgilChunkCipher;
|
|
58
|
+
using virgil::crypto::VirgilKeyPair;
|
|
59
|
+
using virgil::crypto::stream::VirgilBytesDataSource;
|
|
60
|
+
using virgil::crypto::stream::VirgilBytesDataSink;
|
|
61
|
+
using virgil::crypto::foundation::VirgilBase64;
|
|
62
|
+
|
|
63
|
+
TEST_CASE("VirgilChunkCipher: encrypt and decrypt with generated keys", "[chunk-cipher]") {
|
|
64
|
+
VirgilByteArray password = str2bytes("password");
|
|
65
|
+
VirgilByteArray recipientId = str2bytes("2e8176ba-34db-4c65-b977-c5eac687c4ac");
|
|
66
|
+
VirgilKeyPair keyPair = VirgilKeyPair::generateRecommended(password);
|
|
67
|
+
|
|
68
|
+
VirgilByteArray testData = str2bytes("this string will be encrypted");
|
|
69
|
+
VirgilBytesDataSource testDataSource(testData);
|
|
70
|
+
|
|
71
|
+
VirgilByteArray encryptedData;
|
|
72
|
+
VirgilBytesDataSink encryptedDataSink(encryptedData);
|
|
73
|
+
VirgilBytesDataSource encryptedDataSource(encryptedData);
|
|
74
|
+
|
|
75
|
+
VirgilByteArray decryptedData;
|
|
76
|
+
VirgilBytesDataSink decryptedDataSink(decryptedData);
|
|
77
|
+
|
|
78
|
+
VirgilChunkCipher encCipher;
|
|
79
|
+
VirgilChunkCipher decCipher;
|
|
80
|
+
encCipher.addKeyRecipient(recipientId, keyPair.publicKey());
|
|
81
|
+
|
|
82
|
+
SECTION("and embedded content info") {
|
|
83
|
+
testDataSource.reset();
|
|
84
|
+
encryptedDataSource.reset();
|
|
85
|
+
decryptedDataSink.reset();
|
|
86
|
+
|
|
87
|
+
encCipher.encrypt(testDataSource, encryptedDataSink, true, 3);
|
|
88
|
+
|
|
89
|
+
encryptedDataSource.reset();
|
|
90
|
+
decryptedDataSink.reset();
|
|
91
|
+
REQUIRE_THROWS(
|
|
92
|
+
decCipher.decryptWithKey(encryptedDataSource, decryptedDataSink, recipientId, keyPair.privateKey())
|
|
93
|
+
);
|
|
94
|
+
encryptedDataSource.reset();
|
|
95
|
+
decryptedDataSink.reset();
|
|
96
|
+
REQUIRE_NOTHROW(
|
|
97
|
+
decCipher.decryptWithKey(encryptedDataSource, decryptedDataSink, recipientId, keyPair.privateKey(), password)
|
|
98
|
+
);
|
|
99
|
+
REQUIRE(testData == decryptedData);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
SECTION("and embedded content info with custom parameters") {
|
|
103
|
+
VirgilByteArray intParamKey = str2bytes("int_parameter_key");
|
|
104
|
+
const int intParamValue = 35777;
|
|
105
|
+
VirgilByteArray strParamKey = str2bytes("string_parameter_key");
|
|
106
|
+
VirgilByteArray strParamValue = str2bytes("string parameter");
|
|
107
|
+
VirgilByteArray hexParamKey = str2bytes("data_param_value");
|
|
108
|
+
VirgilByteArray hexParamValue = str2bytes("will be stored as octet string");
|
|
109
|
+
|
|
110
|
+
encCipher.customParams().setInteger(intParamKey, intParamValue);
|
|
111
|
+
encCipher.customParams().setString(strParamKey, strParamValue);
|
|
112
|
+
encCipher.customParams().setData(hexParamKey, hexParamValue);
|
|
113
|
+
|
|
114
|
+
testDataSource.reset();
|
|
115
|
+
encryptedDataSource.reset();
|
|
116
|
+
decryptedDataSink.reset();
|
|
117
|
+
|
|
118
|
+
encCipher.encrypt(testDataSource, encryptedDataSink, true);
|
|
119
|
+
encCipher.removeAllRecipients();
|
|
120
|
+
encCipher.customParams().clear();
|
|
121
|
+
|
|
122
|
+
encryptedDataSource.reset();
|
|
123
|
+
decryptedDataSink.reset();
|
|
124
|
+
REQUIRE_NOTHROW(
|
|
125
|
+
decCipher.decryptWithKey(encryptedDataSource, decryptedDataSink, recipientId, keyPair.privateKey(), password)
|
|
126
|
+
);
|
|
127
|
+
REQUIRE(testData == decryptedData);
|
|
128
|
+
|
|
129
|
+
REQUIRE(decCipher.customParams().getInteger(intParamKey) == intParamValue);
|
|
130
|
+
REQUIRE(decCipher.customParams().getString(strParamKey) == strParamValue);
|
|
131
|
+
REQUIRE(decCipher.customParams().getData(hexParamKey) == hexParamValue);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
SECTION("and separated content info") {
|
|
135
|
+
testDataSource.reset();
|
|
136
|
+
encryptedDataSource.reset();
|
|
137
|
+
decryptedDataSink.reset();
|
|
138
|
+
|
|
139
|
+
encCipher.encrypt(testDataSource, encryptedDataSink, false);
|
|
140
|
+
VirgilByteArray contentInfo = encCipher.getContentInfo();
|
|
141
|
+
REQUIRE(contentInfo.size() > 0);
|
|
142
|
+
encCipher.removeAllRecipients();
|
|
143
|
+
encCipher.customParams().clear();
|
|
144
|
+
|
|
145
|
+
REQUIRE_NOTHROW(
|
|
146
|
+
decCipher.setContentInfo(contentInfo)
|
|
147
|
+
);
|
|
148
|
+
encryptedDataSource.reset();
|
|
149
|
+
decryptedDataSink.reset();
|
|
150
|
+
REQUIRE_THROWS(
|
|
151
|
+
decCipher.decryptWithKey(encryptedDataSource, decryptedDataSink, recipientId, keyPair.privateKey())
|
|
152
|
+
);
|
|
153
|
+
encryptedDataSource.reset();
|
|
154
|
+
decryptedDataSink.reset();
|
|
155
|
+
REQUIRE_NOTHROW(
|
|
156
|
+
decCipher.decryptWithKey(encryptedDataSource, decryptedDataSink, recipientId, keyPair.privateKey(), password)
|
|
157
|
+
);
|
|
158
|
+
REQUIRE(testData == decryptedData);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
SECTION("and separated content info with custom parameters") {
|
|
162
|
+
VirgilByteArray intParamKey = str2bytes("int_parameter_key");
|
|
163
|
+
const int intParamValue = 35777;
|
|
164
|
+
VirgilByteArray strParamKey = str2bytes("string_parameter_key");
|
|
165
|
+
VirgilByteArray strParamValue = str2bytes("string parameter");
|
|
166
|
+
VirgilByteArray hexParamKey = str2bytes("data_param_value");
|
|
167
|
+
VirgilByteArray hexParamValue = str2bytes("will be stored as octet string");
|
|
168
|
+
|
|
169
|
+
encCipher.customParams().setInteger(intParamKey, intParamValue);
|
|
170
|
+
encCipher.customParams().setString(strParamKey, strParamValue);
|
|
171
|
+
encCipher.customParams().setData(hexParamKey, hexParamValue);
|
|
172
|
+
|
|
173
|
+
testDataSource.reset();
|
|
174
|
+
encryptedDataSource.reset();
|
|
175
|
+
decryptedDataSink.reset();
|
|
176
|
+
|
|
177
|
+
encCipher.encrypt(testDataSource, encryptedDataSink, false);
|
|
178
|
+
VirgilByteArray contentInfo = encCipher.getContentInfo();
|
|
179
|
+
encCipher.removeAllRecipients();
|
|
180
|
+
encCipher.customParams().clear();
|
|
181
|
+
|
|
182
|
+
REQUIRE_NOTHROW(
|
|
183
|
+
decCipher.setContentInfo(contentInfo)
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
encryptedDataSource.reset();
|
|
187
|
+
decryptedDataSink.reset();
|
|
188
|
+
REQUIRE_NOTHROW(
|
|
189
|
+
decCipher.decryptWithKey(encryptedDataSource, decryptedDataSink, recipientId, keyPair.privateKey(), password)
|
|
190
|
+
);
|
|
191
|
+
REQUIRE(testData == decryptedData);
|
|
192
|
+
|
|
193
|
+
REQUIRE(decCipher.customParams().getInteger(intParamKey) == intParamValue);
|
|
194
|
+
REQUIRE(decCipher.customParams().getString(strParamKey) == strParamValue);
|
|
195
|
+
REQUIRE(decCipher.customParams().getData(hexParamKey) == hexParamValue);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
TEST_CASE("VirgilChunkCipher: generated keys", "[chunk-cipher]") {
|
|
200
|
+
VirgilByteArray testData = str2bytes("this string will be encrypted");
|
|
201
|
+
VirgilByteArray bobId = str2bytes("2e8176ba-34db-4c65-b977-c5eac687c4ac");
|
|
202
|
+
VirgilByteArray johnId = str2bytes("968dc52d-2045-4abe-ab51-0b04737cac76");
|
|
203
|
+
VirgilKeyPair bobKeyPair = VirgilKeyPair::generateRecommended();
|
|
204
|
+
VirgilKeyPair johnKeyPair = VirgilKeyPair::generateRecommended();
|
|
205
|
+
VirgilByteArray alicePassword = str2bytes("alice secret");
|
|
206
|
+
|
|
207
|
+
VirgilBytesDataSource testDataSource(testData);
|
|
208
|
+
|
|
209
|
+
VirgilByteArray encryptedData;
|
|
210
|
+
VirgilBytesDataSink encryptedDataSink(encryptedData);
|
|
211
|
+
VirgilBytesDataSource encryptedDataSource(encryptedData);
|
|
212
|
+
|
|
213
|
+
VirgilByteArray decryptedData;
|
|
214
|
+
VirgilBytesDataSink decryptedDataSink(decryptedData);
|
|
215
|
+
|
|
216
|
+
VirgilChunkCipher encCipher;
|
|
217
|
+
VirgilChunkCipher decCipher;
|
|
218
|
+
encCipher.addKeyRecipient(bobId, bobKeyPair.publicKey());
|
|
219
|
+
encCipher.addKeyRecipient(johnId, johnKeyPair.publicKey());
|
|
220
|
+
encCipher.addPasswordRecipient(alicePassword);
|
|
221
|
+
|
|
222
|
+
SECTION("encrypt for multiple recipients with embedded content info") {
|
|
223
|
+
encCipher.encrypt(testDataSource, encryptedDataSink, true);
|
|
224
|
+
encCipher.removeAllRecipients();
|
|
225
|
+
|
|
226
|
+
SECTION("decrypt for Bob") {
|
|
227
|
+
encryptedDataSource.reset();
|
|
228
|
+
decCipher.decryptWithKey(encryptedDataSource, decryptedDataSink, bobId, bobKeyPair.privateKey());
|
|
229
|
+
REQUIRE(testData == decryptedData);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
SECTION("decrypt for John") {
|
|
233
|
+
encryptedDataSource.reset();
|
|
234
|
+
decCipher.decryptWithKey(encryptedDataSource, decryptedDataSink, johnId, johnKeyPair.privateKey());
|
|
235
|
+
REQUIRE(testData == decryptedData);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
SECTION("decrypt for Alice") {
|
|
239
|
+
encryptedDataSource.reset();
|
|
240
|
+
decCipher.decryptWithPassword(encryptedDataSource, decryptedDataSink, alicePassword);
|
|
241
|
+
REQUIRE(testData == decryptedData);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
SECTION("encrypt for multiple recipients with separated content info") {
|
|
246
|
+
encCipher.encrypt(testDataSource, encryptedDataSink, false);
|
|
247
|
+
VirgilByteArray contentInfo = encCipher.getContentInfo();
|
|
248
|
+
encCipher.removeAllRecipients();
|
|
249
|
+
|
|
250
|
+
REQUIRE_NOTHROW(
|
|
251
|
+
decCipher.setContentInfo(contentInfo)
|
|
252
|
+
);
|
|
253
|
+
|
|
254
|
+
SECTION("decrypt for Bob") {
|
|
255
|
+
encryptedDataSource.reset();
|
|
256
|
+
decCipher.decryptWithKey(encryptedDataSource, decryptedDataSink, bobId, bobKeyPair.privateKey());
|
|
257
|
+
REQUIRE(testData == decryptedData);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
SECTION("decrypt for John") {
|
|
261
|
+
encryptedDataSource.reset();
|
|
262
|
+
decCipher.decryptWithKey(encryptedDataSource, decryptedDataSink, johnId, johnKeyPair.privateKey());
|
|
263
|
+
REQUIRE(testData == decryptedData);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
SECTION("decrypt for Alice") {
|
|
267
|
+
encryptedDataSource.reset();
|
|
268
|
+
decCipher.decryptWithPassword(encryptedDataSource, decryptedDataSink, alicePassword);
|
|
269
|
+
REQUIRE(testData == decryptedData);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
TEST_CASE("VirgilChunkCipher: data read from a source by one pass", "[chunk-cipher]") {
|
|
275
|
+
VirgilByteArray encryptedData = VirgilBase64::decode(
|
|
276
|
+
"MIIBegIBADCCAVsGCSqGSIb3DQEHA6CCAUwwggFIAgECMYIBGTCCARUCAQKgIgQg3OSMIJkPbdDdMCZ8"
|
|
277
|
+
"62YN1WZgdwQFX1dt7c2ZCMM9su4wBwYDK2VwBQAEgeIwgd8CAQAwKjAFBgMrZXADIQAILc51E+qsD5zb"
|
|
278
|
+
"H56fzjYvaSsGndig3WrMvdlpjAF7YzAYBgcogYxxAgUCMA0GCWCGSAFlAwQCAgUAMEEwDQYJYIZIAWUD"
|
|
279
|
+
"BAICBQAEMEW1RpGN0v6BUfTCERATacq+SjktHcD4CuNXCkXKeCD5wzco4firwgNJnj3yO/A9lTBRMB0G"
|
|
280
|
+
"CWCGSAFlAwQBKgQQDzZ6ZT9Zlp+tZwPL5KpCiwQw6DkOg8QCf1mTzVst7GNj9i39C6cudIx5rozoOPLD"
|
|
281
|
+
"5zKvA94YLM6f3tdnhyvh10auMCYGCSqGSIb3DQEHATAZBglghkgBZQMEAS4EDMYL9mftkelU8Vg4s6AW"
|
|
282
|
+
"MRQwEgwJY2h1bmtTaXploAUCAxAAADn8INszCuazHwo8OBEQzNDp6HQAVXsmpsVrnMqapQs+XPxV7pW1"
|
|
283
|
+
"QNc+vYCDsMY5V2HUApE=");
|
|
284
|
+
VirgilByteArray publicKey = VirgilBase64::decode(
|
|
285
|
+
"LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUNvd0JRWURLMlZ3QXlFQTBmN1J1K2k1REdpSFRRVFlX"
|
|
286
|
+
"d3dUTllBbVVQK2x3U2VhbXdoS29wUFNBV009Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo=");
|
|
287
|
+
VirgilByteArray privateKey = VirgilBase64::decode(
|
|
288
|
+
"LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1DNENBUUF3QlFZREsyVndCQ0lFSUwrR2tCTjJnelNH"
|
|
289
|
+
"Mkp0azdsQWtDRit5SDBxZUoxMDRPR1JHcTNDQjVBSWMKLS0tLS1FTkQgUFJJVkFURSBLRVktLS0tLQo=");
|
|
290
|
+
VirgilByteArray recipientId = VirgilBase64::decode("3OSMIJkPbdDdMCZ862YN1WZgdwQFX1dt7c2ZCMM9su4=");
|
|
291
|
+
|
|
292
|
+
VirgilByteArray decryptedData;
|
|
293
|
+
VirgilBytesDataSource encryptedSource(encryptedData, encryptedData.size());
|
|
294
|
+
VirgilBytesDataSink decryptedSink(decryptedData);
|
|
295
|
+
|
|
296
|
+
VirgilChunkCipher cipher;
|
|
297
|
+
|
|
298
|
+
REQUIRE(VirgilKeyPair::isKeyPairMatch(publicKey, privateKey));
|
|
299
|
+
REQUIRE_NOTHROW(cipher.decryptWithKey(encryptedSource, decryptedSink, recipientId, privateKey));
|
|
300
|
+
REQUIRE(decryptedData.size() > 0);
|
|
301
|
+
REQUIRE(bytes2str(decryptedData) == "538DF736-57A0-4B39-B695-73681E59EAAC");
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
#else
|
|
305
|
+
#if defined(_MSC_VER)
|
|
306
|
+
#pragma message("Tests for class VirgilChunkCipher are ignored, because LIB_FILE_IO build parameter is not defined")
|
|
307
|
+
#else
|
|
308
|
+
#warning "Tests for class VirgilChunkCipher are ignored, because LIB_FILE_IO build parameter is not defined"
|
|
309
|
+
#endif /* _MSC_VER */
|
|
310
|
+
#endif /* LIB_FILE_IO */
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2015-2016 Virgil Security Inc.
|
|
3
|
+
*
|
|
4
|
+
* Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
|
|
5
|
+
*
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Redistribution and use in source and binary forms, with or without
|
|
9
|
+
* modification, are permitted provided that the following conditions are
|
|
10
|
+
* met:
|
|
11
|
+
*
|
|
12
|
+
* (1) Redistributions of source code must retain the above copyright
|
|
13
|
+
* notice, this list of conditions and the following disclaimer.
|
|
14
|
+
*
|
|
15
|
+
* (2) Redistributions in binary form must reproduce the above copyright
|
|
16
|
+
* notice, this list of conditions and the following disclaimer in
|
|
17
|
+
* the documentation and/or other materials provided with the
|
|
18
|
+
* distribution.
|
|
19
|
+
*
|
|
20
|
+
* (3) Neither the name of the copyright holder nor the names of its
|
|
21
|
+
* contributors may be used to endorse or promote products derived from
|
|
22
|
+
* this software without specific prior written permission.
|
|
23
|
+
*
|
|
24
|
+
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR
|
|
25
|
+
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
26
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
27
|
+
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
|
28
|
+
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
29
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
30
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
31
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
32
|
+
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
|
33
|
+
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
34
|
+
* POSSIBILITY OF SUCH DAMAGE.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @file test_cipher.cxx
|
|
39
|
+
* @brief Covers class VirgilCipher
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
#include "catch.hpp"
|
|
43
|
+
|
|
44
|
+
#include <virgil/crypto/VirgilByteArray.h>
|
|
45
|
+
#include <virgil/crypto/VirgilByteArrayUtils.h>
|
|
46
|
+
#include <virgil/crypto/VirgilCipher.h>
|
|
47
|
+
#include <virgil/crypto/VirgilKeyPair.h>
|
|
48
|
+
|
|
49
|
+
using virgil::crypto::str2bytes;
|
|
50
|
+
using virgil::crypto::bytes2hex;
|
|
51
|
+
using virgil::crypto::bytes2str;
|
|
52
|
+
using virgil::crypto::VirgilByteArray;
|
|
53
|
+
using virgil::crypto::VirgilCipher;
|
|
54
|
+
using virgil::crypto::VirgilKeyPair;
|
|
55
|
+
using virgil::crypto::VirgilByteArrayUtils;
|
|
56
|
+
|
|
57
|
+
constexpr char kRSA_8192_Public[] = "-----BEGIN PUBLIC KEY-----\n"
|
|
58
|
+
"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Pf+LjZbiU/5ocnOFkxY3ra64gpofWDCdp8t2V\n"
|
|
183
|
+
"gts=\n"
|
|
184
|
+
"-----END ENCRYPTED PRIVATE KEY-----\n";
|
|
185
|
+
|
|
186
|
+
static void test_encrypt_decrypt(const VirgilKeyPair& keyPair, const VirgilByteArray& keyPassword) {
|
|
187
|
+
VirgilByteArray testData = str2bytes("this string will be encrypted");
|
|
188
|
+
VirgilByteArray recipientId = str2bytes("2e8176ba-34db-4c65-b977-c5eac687c4ac");
|
|
189
|
+
|
|
190
|
+
VirgilCipher cipher;
|
|
191
|
+
cipher.addKeyRecipient(recipientId, keyPair.publicKey());
|
|
192
|
+
|
|
193
|
+
SECTION("and embedded content info") {
|
|
194
|
+
VirgilByteArray encryptedData = cipher.encrypt(testData, true);
|
|
195
|
+
VirgilByteArray decryptedData;
|
|
196
|
+
REQUIRE_THROWS(
|
|
197
|
+
decryptedData = cipher.decryptWithKey(encryptedData, recipientId, keyPair.privateKey())
|
|
198
|
+
);
|
|
199
|
+
REQUIRE_NOTHROW(
|
|
200
|
+
decryptedData = cipher.decryptWithKey(encryptedData, recipientId, keyPair.privateKey(), keyPassword)
|
|
201
|
+
);
|
|
202
|
+
REQUIRE(testData == decryptedData);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
SECTION("and embedded content info with custom parameters") {
|
|
206
|
+
VirgilByteArray intParamKey = str2bytes("int_parameter_key");
|
|
207
|
+
const int intParamValue = 35777;
|
|
208
|
+
VirgilByteArray strParamKey = str2bytes("string_parameter_key");
|
|
209
|
+
VirgilByteArray strParamValue = str2bytes("string parameter");
|
|
210
|
+
VirgilByteArray hexParamKey = str2bytes("data_param_value");
|
|
211
|
+
VirgilByteArray hexParamValue = str2bytes("will be stored as octet string");
|
|
212
|
+
|
|
213
|
+
cipher.customParams().setInteger(intParamKey, intParamValue);
|
|
214
|
+
cipher.customParams().setString(strParamKey, strParamValue);
|
|
215
|
+
cipher.customParams().setData(hexParamKey, hexParamValue);
|
|
216
|
+
|
|
217
|
+
VirgilByteArray encryptedData = cipher.encrypt(testData, true);
|
|
218
|
+
cipher.removeAllRecipients();
|
|
219
|
+
cipher.customParams().clear();
|
|
220
|
+
|
|
221
|
+
VirgilByteArray decryptedData;
|
|
222
|
+
REQUIRE_NOTHROW(
|
|
223
|
+
decryptedData = cipher.decryptWithKey(encryptedData, recipientId, keyPair.privateKey(), keyPassword)
|
|
224
|
+
);
|
|
225
|
+
REQUIRE(testData == decryptedData);
|
|
226
|
+
|
|
227
|
+
REQUIRE(cipher.customParams().getInteger(intParamKey) == intParamValue);
|
|
228
|
+
REQUIRE(cipher.customParams().getString(strParamKey) == strParamValue);
|
|
229
|
+
REQUIRE(cipher.customParams().getData(hexParamKey) == hexParamValue);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
SECTION("and separated content info") {
|
|
233
|
+
VirgilByteArray encryptedData = cipher.encrypt(testData, false);
|
|
234
|
+
VirgilByteArray contentInfo = cipher.getContentInfo();
|
|
235
|
+
REQUIRE(contentInfo.size() > 0);
|
|
236
|
+
|
|
237
|
+
REQUIRE_NOTHROW(
|
|
238
|
+
cipher.setContentInfo(contentInfo)
|
|
239
|
+
);
|
|
240
|
+
|
|
241
|
+
VirgilByteArray decryptedData;
|
|
242
|
+
REQUIRE_THROWS(
|
|
243
|
+
decryptedData = cipher.decryptWithKey(encryptedData, recipientId, keyPair.privateKey())
|
|
244
|
+
);
|
|
245
|
+
REQUIRE_NOTHROW(
|
|
246
|
+
decryptedData = cipher.decryptWithKey(encryptedData, recipientId, keyPair.privateKey(), keyPassword)
|
|
247
|
+
);
|
|
248
|
+
REQUIRE(testData == decryptedData);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
SECTION("and separated content info with custom parameters") {
|
|
252
|
+
VirgilByteArray intParamKey = str2bytes("int_parameter_key");
|
|
253
|
+
const int intParamValue = 35777;
|
|
254
|
+
VirgilByteArray strParamKey = str2bytes("string_parameter_key");
|
|
255
|
+
VirgilByteArray strParamValue = str2bytes("string parameter");
|
|
256
|
+
VirgilByteArray hexParamKey = str2bytes("data_param_value");
|
|
257
|
+
VirgilByteArray hexParamValue = str2bytes("will be stored as octet string");
|
|
258
|
+
|
|
259
|
+
cipher.customParams().setInteger(intParamKey, intParamValue);
|
|
260
|
+
cipher.customParams().setString(strParamKey, strParamValue);
|
|
261
|
+
cipher.customParams().setData(hexParamKey, hexParamValue);
|
|
262
|
+
|
|
263
|
+
VirgilByteArray encryptedData = cipher.encrypt(testData, false);
|
|
264
|
+
VirgilByteArray contentInfo = cipher.getContentInfo();
|
|
265
|
+
REQUIRE(contentInfo.size() > 0);
|
|
266
|
+
|
|
267
|
+
REQUIRE_NOTHROW(
|
|
268
|
+
cipher.setContentInfo(contentInfo)
|
|
269
|
+
);
|
|
270
|
+
|
|
271
|
+
VirgilByteArray decryptedData;
|
|
272
|
+
REQUIRE_NOTHROW(
|
|
273
|
+
decryptedData = cipher.decryptWithKey(encryptedData, recipientId, keyPair.privateKey(), keyPassword)
|
|
274
|
+
);
|
|
275
|
+
REQUIRE(testData == decryptedData);
|
|
276
|
+
|
|
277
|
+
REQUIRE(cipher.customParams().getInteger(intParamKey) == intParamValue);
|
|
278
|
+
REQUIRE(cipher.customParams().getString(strParamKey) == strParamValue);
|
|
279
|
+
REQUIRE(cipher.customParams().getData(hexParamKey) == hexParamValue);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
#define TEST_CASE_ENCRYPT_DECRYPT(KeyType) \
|
|
284
|
+
TEST_CASE("VirgilCipher: encrypt and decrypt with " #KeyType "keys", "[cipher]") { \
|
|
285
|
+
const VirgilByteArray keyPassword = VirgilByteArrayUtils::stringToBytes("key password"); \
|
|
286
|
+
test_encrypt_decrypt(VirgilKeyPair::generate(VirgilKeyPair::Type::KeyType, keyPassword), keyPassword); \
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
TEST_CASE_ENCRYPT_DECRYPT(EC_SECP384R1)
|
|
290
|
+
|
|
291
|
+
TEST_CASE_ENCRYPT_DECRYPT(EC_BP384R1)
|
|
292
|
+
|
|
293
|
+
TEST_CASE_ENCRYPT_DECRYPT(EC_SECP256K1)
|
|
294
|
+
|
|
295
|
+
TEST_CASE_ENCRYPT_DECRYPT(EC_CURVE25519)
|
|
296
|
+
|
|
297
|
+
TEST_CASE_ENCRYPT_DECRYPT(FAST_EC_X25519)
|
|
298
|
+
|
|
299
|
+
TEST_CASE_ENCRYPT_DECRYPT(FAST_EC_ED25519)
|
|
300
|
+
|
|
301
|
+
TEST_CASE_ENCRYPT_DECRYPT(RSA_2048)
|
|
302
|
+
|
|
303
|
+
TEST_CASE_ENCRYPT_DECRYPT(RSA_3072)
|
|
304
|
+
|
|
305
|
+
TEST_CASE_ENCRYPT_DECRYPT(RSA_4096)
|
|
306
|
+
|
|
307
|
+
#undef TEST_CASE_ENCRYPT_DECRYPT
|
|
308
|
+
|
|
309
|
+
TEST_CASE("VirgilCipher: encrypt and decrypt with RSA_8192 keys", "[cipher]") {
|
|
310
|
+
const VirgilByteArray keyPassword = VirgilByteArrayUtils::stringToBytes("password");
|
|
311
|
+
test_encrypt_decrypt(VirgilKeyPair(
|
|
312
|
+
VirgilByteArrayUtils::stringToBytes(kRSA_8192_Public),
|
|
313
|
+
VirgilByteArrayUtils::stringToBytes(kRSA_8192_Private)), keyPassword
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
TEST_CASE("VirgilCipher: encrypt and decrypt for multiple recipients", "[cipher]") {
|
|
318
|
+
VirgilByteArray testData = str2bytes("this string will be encrypted");
|
|
319
|
+
VirgilByteArray bobId = str2bytes("2e8176ba-34db-4c65-b977-c5eac687c4ac");
|
|
320
|
+
VirgilByteArray johnId = str2bytes("968dc52d-2045-4abe-ab51-0b04737cac76");
|
|
321
|
+
VirgilKeyPair bobKeyPair = VirgilKeyPair::generateRecommended();
|
|
322
|
+
VirgilKeyPair johnKeyPair = VirgilKeyPair::generateRecommended();
|
|
323
|
+
VirgilByteArray alicePassword = str2bytes("alice secret");
|
|
324
|
+
|
|
325
|
+
SECTION("encrypt for multiple recipients") {
|
|
326
|
+
VirgilByteArray encryptedData;
|
|
327
|
+
|
|
328
|
+
VirgilCipher cipher;
|
|
329
|
+
cipher.addKeyRecipient(bobId, bobKeyPair.publicKey());
|
|
330
|
+
cipher.addKeyRecipient(johnId, johnKeyPair.publicKey());
|
|
331
|
+
cipher.addPasswordRecipient(alicePassword);
|
|
332
|
+
encryptedData = cipher.encrypt(testData, true);
|
|
333
|
+
|
|
334
|
+
SECTION("decrypt for Bob") {
|
|
335
|
+
VirgilCipher decoder;
|
|
336
|
+
VirgilByteArray decryptedData = decoder.decryptWithKey(encryptedData, bobId, bobKeyPair.privateKey());
|
|
337
|
+
REQUIRE(testData == decryptedData);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
SECTION("decrypt for John") {
|
|
341
|
+
VirgilCipher decoder;
|
|
342
|
+
VirgilByteArray decryptedData = decoder.decryptWithKey(encryptedData, johnId, johnKeyPair.privateKey());
|
|
343
|
+
REQUIRE(testData == decryptedData);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
SECTION("decrypt for Alice") {
|
|
347
|
+
VirgilCipher decoder;
|
|
348
|
+
VirgilByteArray decryptedData = decoder.decryptWithPassword(encryptedData, alicePassword);
|
|
349
|
+
REQUIRE(testData == decryptedData);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
TEST_CASE("VirgilCipher: encrypt and decrypt with password", "[cipher]") {
|
|
355
|
+
VirgilByteArray password = str2bytes("password");
|
|
356
|
+
VirgilByteArray wrongPassword = str2bytes("wrong password");
|
|
357
|
+
VirgilByteArray testData = str2bytes("this string will be encrypted");
|
|
358
|
+
|
|
359
|
+
VirgilCipher cipher;
|
|
360
|
+
cipher.addPasswordRecipient(password);
|
|
361
|
+
|
|
362
|
+
SECTION("and embedded content info") {
|
|
363
|
+
VirgilByteArray encryptedData = cipher.encrypt(testData, true);
|
|
364
|
+
VirgilByteArray decryptedData;
|
|
365
|
+
REQUIRE_THROWS(
|
|
366
|
+
decryptedData = cipher.decryptWithPassword(encryptedData, wrongPassword)
|
|
367
|
+
);
|
|
368
|
+
REQUIRE_NOTHROW(
|
|
369
|
+
decryptedData = cipher.decryptWithPassword(encryptedData, password)
|
|
370
|
+
);
|
|
371
|
+
REQUIRE(testData == decryptedData);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
TEST_CASE("VirgilCipher: check recipient existence", "[cipher]") {
|
|
376
|
+
VirgilByteArray bobId = str2bytes("2e8176ba-34db-4c65-b977-c5eac687c4ac");
|
|
377
|
+
VirgilByteArray johnId = str2bytes("968dc52d-2045-4abe-ab51-0b04737cac76");
|
|
378
|
+
VirgilByteArray aliceId = str2bytes("99e435e7-2527-4a5a-89bb-37927bdb337b");
|
|
379
|
+
VirgilKeyPair bobKeyPair = VirgilKeyPair::generateRecommended();
|
|
380
|
+
VirgilKeyPair johnKeyPair = VirgilKeyPair::generateRecommended();
|
|
381
|
+
|
|
382
|
+
VirgilCipher cipher;
|
|
383
|
+
cipher.addKeyRecipient(bobId, bobKeyPair.publicKey());
|
|
384
|
+
cipher.addKeyRecipient(johnId, johnKeyPair.publicKey());
|
|
385
|
+
|
|
386
|
+
SECTION("within local context") {
|
|
387
|
+
REQUIRE(cipher.keyRecipientExists(bobId));
|
|
388
|
+
REQUIRE(cipher.keyRecipientExists(johnId));
|
|
389
|
+
REQUIRE_FALSE(cipher.keyRecipientExists(aliceId));
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
SECTION("ContentInfo context") {
|
|
393
|
+
(void) cipher.encrypt(VirgilByteArray());
|
|
394
|
+
|
|
395
|
+
VirgilCipher restoredCipher;
|
|
396
|
+
restoredCipher.setContentInfo(cipher.getContentInfo());
|
|
397
|
+
|
|
398
|
+
REQUIRE(restoredCipher.keyRecipientExists(bobId));
|
|
399
|
+
REQUIRE(restoredCipher.keyRecipientExists(johnId));
|
|
400
|
+
REQUIRE_FALSE(restoredCipher.keyRecipientExists(aliceId));
|
|
401
|
+
}
|
|
402
|
+
}
|