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.
Files changed (879) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.gitmodules +3 -0
  4. data/Gemfile +4 -0
  5. data/README.md +36 -0
  6. data/Rakefile +12 -0
  7. data/bin/console +14 -0
  8. data/bin/setup +8 -0
  9. data/ext/native/extconf.rb +25 -0
  10. data/ext/native/src/.gitignore +17 -0
  11. data/ext/native/src/.travis.yml +50 -0
  12. data/ext/native/src/CMakeLists.txt +336 -0
  13. data/ext/native/src/ChangeLog +440 -0
  14. data/ext/native/src/Jenkinsfile +208 -0
  15. data/ext/native/src/LICENSE +33 -0
  16. data/ext/native/src/README.md +195 -0
  17. data/ext/native/src/VERSION +1 -0
  18. data/ext/native/src/benchmark/CMakeLists.txt +52 -0
  19. data/ext/native/src/benchmark/benchmark_cipher.cxx +99 -0
  20. data/ext/native/src/benchmark/benchmark_hash.cxx +85 -0
  21. data/ext/native/src/benchmark/benchmark_signer.cxx +89 -0
  22. data/ext/native/src/benchmark/benchpress.hpp +464 -0
  23. data/ext/native/src/benchmark/cxxopts.hpp +1312 -0
  24. data/ext/native/src/ci/configure.sh +71 -0
  25. data/ext/native/src/ci/install-cmake.sh +48 -0
  26. data/ext/native/src/ci/install-credentials.sh +45 -0
  27. data/ext/native/src/ci/install-doxygen.sh +48 -0
  28. data/ext/native/src/ci/install-phpunit.sh +47 -0
  29. data/ext/native/src/ci/install-swig.sh +47 -0
  30. data/ext/native/src/ci/publish-docs.sh +125 -0
  31. data/ext/native/src/ci/run.sh +55 -0
  32. data/ext/native/src/ci/travis_ci_rsa.enc +0 -0
  33. data/ext/native/src/cmake/android.toolchain.cmake +1697 -0
  34. data/ext/native/src/cmake/apple.toolchain.cmake +323 -0
  35. data/ext/native/src/cmake/aux_source_directory_to_file.cmake +70 -0
  36. data/ext/native/src/cmake/check_pointer_size.cmake +64 -0
  37. data/ext/native/src/cmake/cmake_args.cmake +64 -0
  38. data/ext/native/src/cmake/copy_all_files.cmake +70 -0
  39. data/ext/native/src/cmake/file_regex_replace.cmake +69 -0
  40. data/ext/native/src/cmake/find_host_utils.cmake +54 -0
  41. data/ext/native/src/cmake/pnacl.toolchain.cmake +87 -0
  42. data/ext/native/src/cmake/uppercase_first_char.cmake +45 -0
  43. data/ext/native/src/cmake/uppercase_namespaces.cmake +86 -0
  44. data/ext/native/src/cmake/virgil_depends.cmake +53 -0
  45. data/ext/native/src/cmake/virgil_depends_local.cmake +325 -0
  46. data/ext/native/src/docs/.gitignore +0 -0
  47. data/ext/native/src/lib/CMakeLists.txt +162 -0
  48. data/ext/native/src/lib/Doxyfile.in +2310 -0
  49. data/ext/native/src/lib/cmake/config.cmake.in +40 -0
  50. data/ext/native/src/lib/include/CMakeLists.txt +68 -0
  51. data/ext/native/src/lib/include/virgil/crypto/VirgilByteArray.h +143 -0
  52. data/ext/native/src/lib/include/virgil/crypto/VirgilByteArrayUtils.h +121 -0
  53. data/ext/native/src/lib/include/virgil/crypto/VirgilChunkCipher.h +117 -0
  54. data/ext/native/src/lib/include/virgil/crypto/VirgilCipher.h +93 -0
  55. data/ext/native/src/lib/include/virgil/crypto/VirgilCipherBase.h +302 -0
  56. data/ext/native/src/lib/include/virgil/crypto/VirgilCryptoError.h +136 -0
  57. data/ext/native/src/lib/include/virgil/crypto/VirgilCryptoException.h +117 -0
  58. data/ext/native/src/lib/include/virgil/crypto/VirgilCustomParams.h +159 -0
  59. data/ext/native/src/lib/include/virgil/crypto/VirgilDataSink.h +77 -0
  60. data/ext/native/src/lib/include/virgil/crypto/VirgilDataSource.h +66 -0
  61. data/ext/native/src/lib/include/virgil/crypto/VirgilKeyPair.h +274 -0
  62. data/ext/native/src/lib/include/virgil/crypto/VirgilSigner.h +84 -0
  63. data/ext/native/src/lib/include/virgil/crypto/VirgilStreamCipher.h +99 -0
  64. data/ext/native/src/lib/include/virgil/crypto/VirgilStreamSigner.h +80 -0
  65. data/ext/native/src/lib/include/virgil/crypto/VirgilTinyCipher.h +283 -0
  66. data/ext/native/src/lib/include/virgil/crypto/VirgilVersion.h +88 -0
  67. data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilAsymmetricCipher.h +395 -0
  68. data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilBase64.h +70 -0
  69. data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilHash.h +261 -0
  70. data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilKDF.h +175 -0
  71. data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilPBE.h +164 -0
  72. data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilPBKDF.h +198 -0
  73. data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilRandom.h +121 -0
  74. data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilSymmetricCipher.h +305 -0
  75. data/ext/native/src/lib/include/virgil/crypto/foundation/VirgilSystemCryptoError.h +149 -0
  76. data/ext/native/src/lib/include/virgil/crypto/foundation/asn1/VirgilAsn1Compatible.h +100 -0
  77. data/ext/native/src/lib/include/virgil/crypto/foundation/asn1/VirgilAsn1Reader.h +179 -0
  78. data/ext/native/src/lib/include/virgil/crypto/foundation/asn1/VirgilAsn1Writer.h +241 -0
  79. data/ext/native/src/lib/include/virgil/crypto/foundation/asn1/internal/VirgilAsn1Alg.h +114 -0
  80. data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSContent.h +113 -0
  81. data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSContentInfo.h +91 -0
  82. data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSEncryptedContent.h +90 -0
  83. data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSEnvelopedData.h +116 -0
  84. data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSKeyTransRecipient.h +103 -0
  85. data/ext/native/src/lib/include/virgil/crypto/foundation/cms/VirgilCMSPasswordRecipient.h +98 -0
  86. data/ext/native/src/lib/include/virgil/crypto/foundation/internal/VirgilOID.h +81 -0
  87. data/ext/native/src/lib/include/virgil/crypto/foundation/internal/VirgilTagFilter.h +95 -0
  88. data/ext/native/src/lib/include/virgil/crypto/foundation/internal/mbedtls_context.h +93 -0
  89. data/ext/native/src/lib/include/virgil/crypto/foundation/internal/mbedtls_context_policy_spec.h +231 -0
  90. data/ext/native/src/lib/include/virgil/crypto/foundation/internal/mbedtls_type_utils.h +407 -0
  91. data/ext/native/src/lib/include/virgil/crypto/internal/utils.h +58 -0
  92. data/ext/native/src/lib/include/virgil/crypto/stream/VirgilBytesDataSink.h +84 -0
  93. data/ext/native/src/lib/include/virgil/crypto/stream/VirgilBytesDataSource.h +90 -0
  94. data/ext/native/src/lib/include/virgil/crypto/stream/VirgilStreamDataSink.h +79 -0
  95. data/ext/native/src/lib/include/virgil/crypto/stream/VirgilStreamDataSource.h +84 -0
  96. data/ext/native/src/lib/mainpage.dox +60 -0
  97. data/ext/native/src/lib/src/VirgilAsn1Alg.cxx +122 -0
  98. data/ext/native/src/lib/src/VirgilAsn1Compatible.cxx +67 -0
  99. data/ext/native/src/lib/src/VirgilAsn1Reader.cxx +190 -0
  100. data/ext/native/src/lib/src/VirgilAsn1Writer.cxx +329 -0
  101. data/ext/native/src/lib/src/VirgilAsymmetricCipher.cxx +633 -0
  102. data/ext/native/src/lib/src/VirgilBase64.cxx +94 -0
  103. data/ext/native/src/lib/src/VirgilByteArrayUtils.cxx +222 -0
  104. data/ext/native/src/lib/src/VirgilCMSContent.cxx +124 -0
  105. data/ext/native/src/lib/src/VirgilCMSContentInfo.cxx +111 -0
  106. data/ext/native/src/lib/src/VirgilCMSEncryptedContent.cxx +84 -0
  107. data/ext/native/src/lib/src/VirgilCMSEnvelopedData.cxx +131 -0
  108. data/ext/native/src/lib/src/VirgilCMSKeyTransRecipient.cxx +96 -0
  109. data/ext/native/src/lib/src/VirgilCMSPasswordRecipient.cxx +93 -0
  110. data/ext/native/src/lib/src/VirgilChunkCipher.cxx +215 -0
  111. data/ext/native/src/lib/src/VirgilCipher.cxx +92 -0
  112. data/ext/native/src/lib/src/VirgilCipherBase.cxx +340 -0
  113. data/ext/native/src/lib/src/VirgilCryptoError.cxx +88 -0
  114. data/ext/native/src/lib/src/VirgilCryptoException.cxx +84 -0
  115. data/ext/native/src/lib/src/VirgilCustomParams.cxx +193 -0
  116. data/ext/native/src/lib/src/VirgilDataSink.cxx +46 -0
  117. data/ext/native/src/lib/src/VirgilHash.cxx +269 -0
  118. data/ext/native/src/lib/src/VirgilKDF.cxx +209 -0
  119. data/ext/native/src/lib/src/VirgilKeyPair.cxx +165 -0
  120. data/ext/native/src/lib/src/VirgilPBE.cxx +215 -0
  121. data/ext/native/src/lib/src/VirgilPBKDF.cxx +286 -0
  122. data/ext/native/src/lib/src/VirgilRandom.cxx +112 -0
  123. data/ext/native/src/lib/src/VirgilSigner.cxx +91 -0
  124. data/ext/native/src/lib/src/VirgilStreamCipher.cxx +116 -0
  125. data/ext/native/src/lib/src/VirgilStreamSigner.cxx +98 -0
  126. data/ext/native/src/lib/src/VirgilSymmetricCipher.cxx +369 -0
  127. data/ext/native/src/lib/src/VirgilSystemCryptoError.cxx +58 -0
  128. data/ext/native/src/lib/src/VirgilTagFilter.cxx +76 -0
  129. data/ext/native/src/lib/src/VirgilTinyCipher.cxx +648 -0
  130. data/ext/native/src/lib/src/VirgilVersion.cxx.in +28 -0
  131. data/ext/native/src/lib/src/stream/VirgilBytesDataSink.cxx +61 -0
  132. data/ext/native/src/lib/src/stream/VirgilBytesDataSource.cxx +68 -0
  133. data/ext/native/src/lib/src/stream/VirgilStreamDataSink.cxx +57 -0
  134. data/ext/native/src/lib/src/stream/VirgilStreamDataSource.cxx +68 -0
  135. data/ext/native/src/libs_ext/mbedtls/configs/config.h +84 -0
  136. data/ext/native/src/libs_ext/mbedtls/configs/config_desktop.h +13 -0
  137. data/ext/native/src/libs_ext/mbedtls/configs/config_pnacl.h +8 -0
  138. data/ext/native/src/libs_ext/mbedtls/mbedtls.cmake +102 -0
  139. data/ext/native/src/libs_ext/rapidjson/rapidjson.cmake +61 -0
  140. data/ext/native/src/libs_ext/tinyformat/cmake/config.cmake.in +43 -0
  141. data/ext/native/src/libs_ext/tinyformat/src/tinyformat.h +1003 -0
  142. data/ext/native/src/libs_ext/tinyformat/tinyformat.cmake +77 -0
  143. data/ext/native/src/migration-2.0.md +108 -0
  144. data/ext/native/src/tests/CMakeLists.txt +50 -0
  145. data/ext/native/src/tests/catch.hpp +10200 -0
  146. data/ext/native/src/tests/test_asn1_writer.cxx +268 -0
  147. data/ext/native/src/tests/test_asymmetric_cipher.cxx +140 -0
  148. data/ext/native/src/tests/test_base64.cxx +102 -0
  149. data/ext/native/src/tests/test_byte_array_utils.cxx +102 -0
  150. data/ext/native/src/tests/test_chunk_cipher.cxx +310 -0
  151. data/ext/native/src/tests/test_cipher.cxx +402 -0
  152. data/ext/native/src/tests/test_cipher_base.cxx +353 -0
  153. data/ext/native/src/tests/test_contract_copy_move.cxx +131 -0
  154. data/ext/native/src/tests/test_hash.cxx +153 -0
  155. data/ext/native/src/tests/test_key_pair.cxx +204 -0
  156. data/ext/native/src/tests/test_pbe.cxx +95 -0
  157. data/ext/native/src/tests/test_pbkdf.cxx +368 -0
  158. data/ext/native/src/tests/test_random.cxx +93 -0
  159. data/ext/native/src/tests/test_runner.cxx +43 -0
  160. data/ext/native/src/tests/test_signer.cxx +111 -0
  161. data/ext/native/src/tests/test_stream_cipher.cxx +277 -0
  162. data/ext/native/src/tests/test_symmetric_cipher.cxx +105 -0
  163. data/ext/native/src/tests/test_tag_filter.cxx +74 -0
  164. data/ext/native/src/tests/test_tiny_cipher.cxx +172 -0
  165. data/ext/native/src/utils/build.bat +274 -0
  166. data/ext/native/src/utils/build.sh +354 -0
  167. data/ext/native/src/utils/env.sh +39 -0
  168. data/ext/native/src/utils/zip.vbs +45 -0
  169. data/ext/native/src/wrappers/CMakeLists.txt +63 -0
  170. data/ext/native/src/wrappers/asmjs/CMakeLists.txt +109 -0
  171. data/ext/native/src/wrappers/asmjs/error.js +41 -0
  172. data/ext/native/src/wrappers/asmjs/example.html +77 -0
  173. data/ext/native/src/wrappers/asmjs/helpers.js +155 -0
  174. data/ext/native/src/wrappers/asmjs/patch_embind.pl +115 -0
  175. data/ext/native/src/wrappers/asmjs/wrapper.cxx +340 -0
  176. data/ext/native/src/wrappers/java/CMakeLists.txt +156 -0
  177. data/ext/native/src/wrappers/java/src/VirgilStreamDataSink.java +62 -0
  178. data/ext/native/src/wrappers/java/src/VirgilStreamDataSource.java +72 -0
  179. data/ext/native/src/wrappers/net/CMakeLists.txt +170 -0
  180. data/ext/native/src/wrappers/net/cmake/FindCSharp.cmake +72 -0
  181. data/ext/native/src/wrappers/net/cmake/FindDotNetFrameworkSdk.cmake +92 -0
  182. data/ext/native/src/wrappers/net/cmake/FindMono.cmake +162 -0
  183. data/ext/native/src/wrappers/net/cmake/UseCSharp.cmake +119 -0
  184. data/ext/native/src/wrappers/net/cmake/UseDotNetFrameworkSdk.cmake +12 -0
  185. data/ext/native/src/wrappers/net/cmake/UseMono.cmake +16 -0
  186. data/ext/native/src/wrappers/net/src/AssemblyInfo.cs +56 -0
  187. data/ext/native/src/wrappers/net/src/VirgilStreamDataSink.cs +63 -0
  188. data/ext/native/src/wrappers/net/src/VirgilStreamDataSource.cs +74 -0
  189. data/ext/native/src/wrappers/nodejs/CMakeLists.txt +134 -0
  190. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/android-ifaddrs.h +54 -0
  191. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/ares.h +636 -0
  192. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/ares_version.h +24 -0
  193. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/libplatform/libplatform.h +38 -0
  194. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/nameser.h +211 -0
  195. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/node.h +447 -0
  196. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/node_buffer.h +125 -0
  197. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/node_internals.h +236 -0
  198. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/node_object_wrap.h +137 -0
  199. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/node_version.h +69 -0
  200. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/aes.h +149 -0
  201. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/asn1.h +1417 -0
  202. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/asn1_mac.h +579 -0
  203. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/asn1t.h +973 -0
  204. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/bio.h +875 -0
  205. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/blowfish.h +130 -0
  206. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/bn.h +957 -0
  207. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/buffer.h +118 -0
  208. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/camellia.h +132 -0
  209. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/cast.h +107 -0
  210. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/cmac.h +82 -0
  211. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/cms.h +505 -0
  212. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/comp.h +79 -0
  213. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/conf.h +267 -0
  214. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/conf_api.h +89 -0
  215. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/crypto.h +661 -0
  216. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/des.h +257 -0
  217. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/des_old.h +497 -0
  218. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/dh.h +287 -0
  219. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/dsa.h +329 -0
  220. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/dso.h +451 -0
  221. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/dtls1.h +268 -0
  222. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/e_os2.h +328 -0
  223. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ebcdic.h +26 -0
  224. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ec.h +1193 -0
  225. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ecdh.h +127 -0
  226. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ecdsa.h +260 -0
  227. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/engine.h +961 -0
  228. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/err.h +389 -0
  229. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/evp.h +1480 -0
  230. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/hmac.h +109 -0
  231. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/idea.h +105 -0
  232. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/krb5_asn.h +240 -0
  233. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/kssl.h +197 -0
  234. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/lhash.h +240 -0
  235. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/md4.h +119 -0
  236. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/md5.h +119 -0
  237. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/mdc2.h +94 -0
  238. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/modes.h +153 -0
  239. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/obj_mac.h +4031 -0
  240. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/objects.h +1143 -0
  241. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ocsp.h +626 -0
  242. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/opensslconf.h +333 -0
  243. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/opensslv.h +97 -0
  244. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ossl_typ.h +209 -0
  245. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/pem.h +611 -0
  246. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/pem2.h +70 -0
  247. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/pkcs12.h +342 -0
  248. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/pkcs7.h +481 -0
  249. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/pqueue.h +99 -0
  250. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/rand.h +150 -0
  251. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/rc2.h +103 -0
  252. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/rc4.h +88 -0
  253. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ripemd.h +105 -0
  254. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/rsa.h +610 -0
  255. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/safestack.h +2536 -0
  256. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/seed.h +149 -0
  257. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/sha.h +214 -0
  258. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/srp.h +169 -0
  259. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/srtp.h +148 -0
  260. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ssl.h +2766 -0
  261. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ssl2.h +265 -0
  262. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ssl23.h +84 -0
  263. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ssl3.h +730 -0
  264. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/stack.h +106 -0
  265. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/symhacks.h +486 -0
  266. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/tls1.h +788 -0
  267. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ts.h +862 -0
  268. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/txt_db.h +112 -0
  269. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ui.h +415 -0
  270. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/ui_compat.h +88 -0
  271. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/whrlpool.h +41 -0
  272. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/x509.h +1301 -0
  273. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/x509_vfy.h +595 -0
  274. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/openssl/x509v3.h +1015 -0
  275. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/pthread-fixes.h +72 -0
  276. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/smalloc.h +153 -0
  277. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/stdint-msvc2008.h +247 -0
  278. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/tree.h +768 -0
  279. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-aix.h +32 -0
  280. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-bsd.h +34 -0
  281. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-darwin.h +61 -0
  282. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-errno.h +418 -0
  283. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-linux.h +34 -0
  284. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-sunos.h +44 -0
  285. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-threadpool.h +37 -0
  286. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-unix.h +383 -0
  287. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-version.h +39 -0
  288. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv-win.h +647 -0
  289. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/uv.h +1467 -0
  290. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8-debug.h +267 -0
  291. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8-platform.h +62 -0
  292. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8-profiler.h +611 -0
  293. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8-testing.h +48 -0
  294. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8-util.h +487 -0
  295. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8-version.h +20 -0
  296. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8.h +6741 -0
  297. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8config.h +451 -0
  298. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/v8stdint.h +33 -0
  299. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/zconf.h +511 -0
  300. data/ext/native/src/wrappers/nodejs/node-v0.12.7/include/zlib.h +1768 -0
  301. data/ext/native/src/wrappers/nodejs/node-v0.12.7/lib/win/x64/node.lib +0 -0
  302. data/ext/native/src/wrappers/nodejs/node-v0.12.7/lib/win/x86/node.lib +0 -0
  303. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/android-ifaddrs.h +54 -0
  304. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/ares.h +589 -0
  305. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/ares_version.h +24 -0
  306. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/libplatform/libplatform.h +38 -0
  307. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/nameser.h +211 -0
  308. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/node.h +470 -0
  309. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/node_buffer.h +65 -0
  310. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/node_internals.h +339 -0
  311. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/node_object_wrap.h +116 -0
  312. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/node_version.h +45 -0
  313. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/aes.h +149 -0
  314. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/BSD-x86/opensslconf.h +258 -0
  315. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/BSD-x86_64/opensslconf.h +258 -0
  316. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/VC-WIN32/opensslconf.h +259 -0
  317. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/VC-WIN64A/opensslconf.h +259 -0
  318. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/aix-gcc/opensslconf.h +261 -0
  319. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/aix64-gcc/opensslconf.h +261 -0
  320. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/darwin-i386-cc/opensslconf.h +261 -0
  321. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/darwin64-x86_64-cc/opensslconf.h +261 -0
  322. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/linux-aarch64/opensslconf.h +258 -0
  323. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/linux-armv4/opensslconf.h +258 -0
  324. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/linux-elf/opensslconf.h +258 -0
  325. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/linux-ppc/opensslconf.h +258 -0
  326. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/linux-ppc64/opensslconf.h +258 -0
  327. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/linux-x32/opensslconf.h +258 -0
  328. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/linux-x86_64/opensslconf.h +258 -0
  329. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/solaris-x86-gcc/opensslconf.h +258 -0
  330. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/archs/solaris64-x86_64-gcc/opensslconf.h +258 -0
  331. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/asn1.h +1419 -0
  332. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/asn1_mac.h +579 -0
  333. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/asn1t.h +973 -0
  334. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/bio.h +879 -0
  335. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/blowfish.h +130 -0
  336. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/bn.h +939 -0
  337. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/buffer.h +119 -0
  338. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/camellia.h +132 -0
  339. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/cast.h +107 -0
  340. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/cmac.h +82 -0
  341. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/cms.h +555 -0
  342. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/comp.h +79 -0
  343. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/conf.h +267 -0
  344. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/conf_api.h +89 -0
  345. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/crypto.h +661 -0
  346. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/des.h +257 -0
  347. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/des_old.h +497 -0
  348. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/dh.h +392 -0
  349. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/dsa.h +332 -0
  350. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/dso.h +451 -0
  351. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/dtls1.h +272 -0
  352. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/e_os2.h +328 -0
  353. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ebcdic.h +26 -0
  354. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ec.h +1282 -0
  355. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ecdh.h +134 -0
  356. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ecdsa.h +335 -0
  357. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/engine.h +960 -0
  358. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/err.h +389 -0
  359. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/evp.h +1534 -0
  360. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/hmac.h +109 -0
  361. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/idea.h +105 -0
  362. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/krb5_asn.h +240 -0
  363. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/kssl.h +197 -0
  364. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/lhash.h +240 -0
  365. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/md4.h +119 -0
  366. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/md5.h +119 -0
  367. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/mdc2.h +94 -0
  368. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/modes.h +163 -0
  369. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/obj_mac.h +4194 -0
  370. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/objects.h +1143 -0
  371. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ocsp.h +637 -0
  372. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/opensslconf.h +138 -0
  373. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/opensslv.h +97 -0
  374. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ossl_typ.h +211 -0
  375. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/pem.h +615 -0
  376. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/pem2.h +70 -0
  377. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/pkcs12.h +342 -0
  378. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/pkcs7.h +481 -0
  379. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/pqueue.h +99 -0
  380. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/rand.h +150 -0
  381. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/rc2.h +103 -0
  382. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/rc4.h +88 -0
  383. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ripemd.h +105 -0
  384. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/rsa.h +664 -0
  385. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/safestack.h +2672 -0
  386. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/seed.h +149 -0
  387. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/sha.h +214 -0
  388. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/srp.h +169 -0
  389. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/srtp.h +147 -0
  390. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ssl.h +3164 -0
  391. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ssl2.h +265 -0
  392. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ssl23.h +84 -0
  393. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ssl3.h +774 -0
  394. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/stack.h +107 -0
  395. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/symhacks.h +516 -0
  396. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/tls1.h +813 -0
  397. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ts.h +862 -0
  398. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/txt_db.h +112 -0
  399. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ui.h +415 -0
  400. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/ui_compat.h +88 -0
  401. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/whrlpool.h +41 -0
  402. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/x509.h +1327 -0
  403. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/x509_vfy.h +647 -0
  404. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/openssl/x509v3.h +1055 -0
  405. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/pthread-fixes.h +72 -0
  406. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/stdint-msvc2008.h +247 -0
  407. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/tree.h +768 -0
  408. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-aix.h +32 -0
  409. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-bsd.h +34 -0
  410. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-darwin.h +61 -0
  411. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-errno.h +418 -0
  412. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-linux.h +34 -0
  413. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-sunos.h +44 -0
  414. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-threadpool.h +37 -0
  415. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-unix.h +383 -0
  416. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-version.h +43 -0
  417. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv-win.h +655 -0
  418. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/uv.h +1472 -0
  419. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8-debug.h +280 -0
  420. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8-platform.h +82 -0
  421. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8-profiler.h +648 -0
  422. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8-testing.h +48 -0
  423. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8-util.h +640 -0
  424. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8-version.h +20 -0
  425. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8.h +8366 -0
  426. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/v8config.h +424 -0
  427. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/zconf.h +511 -0
  428. data/ext/native/src/wrappers/nodejs/node-v4.1.0/include/zlib.h +1768 -0
  429. data/ext/native/src/wrappers/nodejs/node-v4.1.0/lib/win/x64/node.lib +0 -0
  430. data/ext/native/src/wrappers/nodejs/node-v4.1.0/lib/win/x86/node.lib +0 -0
  431. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/android-ifaddrs.h +54 -0
  432. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/ares.h +589 -0
  433. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/ares_version.h +24 -0
  434. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/common.gypi +337 -0
  435. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/config.gypi +44 -0
  436. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/libplatform/libplatform.h +38 -0
  437. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/nameser.h +211 -0
  438. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/node.h +470 -0
  439. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/node_buffer.h +65 -0
  440. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/node_internals.h +333 -0
  441. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/node_object_wrap.h +116 -0
  442. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/node_version.h +57 -0
  443. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/aes.h +149 -0
  444. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/BSD-x86/opensslconf.h +270 -0
  445. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/BSD-x86_64/opensslconf.h +270 -0
  446. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/VC-WIN32/opensslconf.h +271 -0
  447. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/VC-WIN64A/opensslconf.h +271 -0
  448. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/aix-gcc/opensslconf.h +273 -0
  449. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/aix64-gcc/opensslconf.h +273 -0
  450. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/darwin-i386-cc/opensslconf.h +273 -0
  451. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/darwin64-x86_64-cc/opensslconf.h +273 -0
  452. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/linux-aarch64/opensslconf.h +270 -0
  453. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/linux-armv4/opensslconf.h +270 -0
  454. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/linux-elf/opensslconf.h +270 -0
  455. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/linux-ppc/opensslconf.h +270 -0
  456. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/linux-ppc64/opensslconf.h +270 -0
  457. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/linux-x32/opensslconf.h +270 -0
  458. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/linux-x86_64/opensslconf.h +270 -0
  459. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/solaris-x86-gcc/opensslconf.h +270 -0
  460. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/archs/solaris64-x86_64-gcc/opensslconf.h +270 -0
  461. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/asn1.h +1419 -0
  462. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/asn1_mac.h +579 -0
  463. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/asn1t.h +973 -0
  464. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/bio.h +883 -0
  465. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/blowfish.h +130 -0
  466. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/bn.h +949 -0
  467. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/buffer.h +125 -0
  468. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/camellia.h +132 -0
  469. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/cast.h +107 -0
  470. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/cmac.h +82 -0
  471. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/cms.h +555 -0
  472. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/comp.h +83 -0
  473. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/conf.h +267 -0
  474. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/conf_api.h +89 -0
  475. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/crypto.h +661 -0
  476. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/des.h +257 -0
  477. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/des_old.h +497 -0
  478. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/dh.h +393 -0
  479. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/dsa.h +332 -0
  480. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/dso.h +451 -0
  481. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/dtls1.h +272 -0
  482. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/e_os2.h +328 -0
  483. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ebcdic.h +26 -0
  484. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ec.h +1282 -0
  485. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ecdh.h +134 -0
  486. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ecdsa.h +335 -0
  487. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/engine.h +960 -0
  488. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/err.h +389 -0
  489. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/evp.h +1534 -0
  490. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/hmac.h +109 -0
  491. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/idea.h +105 -0
  492. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/krb5_asn.h +240 -0
  493. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/kssl.h +197 -0
  494. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/lhash.h +240 -0
  495. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/md4.h +119 -0
  496. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/md5.h +119 -0
  497. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/mdc2.h +94 -0
  498. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/modes.h +163 -0
  499. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/obj_mac.h +4194 -0
  500. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/objects.h +1143 -0
  501. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ocsp.h +637 -0
  502. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/opensslconf.h +138 -0
  503. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/opensslv.h +97 -0
  504. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ossl_typ.h +211 -0
  505. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/pem.h +615 -0
  506. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/pem2.h +70 -0
  507. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/pkcs12.h +342 -0
  508. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/pkcs7.h +481 -0
  509. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/pqueue.h +99 -0
  510. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/rand.h +150 -0
  511. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/rc2.h +103 -0
  512. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/rc4.h +88 -0
  513. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ripemd.h +105 -0
  514. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/rsa.h +664 -0
  515. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/safestack.h +2672 -0
  516. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/seed.h +149 -0
  517. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/sha.h +214 -0
  518. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/srp.h +179 -0
  519. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/srtp.h +147 -0
  520. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ssl.h +3169 -0
  521. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ssl2.h +265 -0
  522. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ssl23.h +84 -0
  523. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ssl3.h +774 -0
  524. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/stack.h +107 -0
  525. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/symhacks.h +516 -0
  526. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/tls1.h +810 -0
  527. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ts.h +862 -0
  528. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/txt_db.h +112 -0
  529. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ui.h +415 -0
  530. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/ui_compat.h +88 -0
  531. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/whrlpool.h +41 -0
  532. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/x509.h +1328 -0
  533. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/x509_vfy.h +647 -0
  534. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/openssl/x509v3.h +1055 -0
  535. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/pthread-fixes.h +72 -0
  536. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/stdint-msvc2008.h +247 -0
  537. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/tree.h +768 -0
  538. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-aix.h +32 -0
  539. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-bsd.h +34 -0
  540. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-darwin.h +61 -0
  541. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-errno.h +418 -0
  542. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-linux.h +34 -0
  543. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-sunos.h +44 -0
  544. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-threadpool.h +37 -0
  545. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-unix.h +383 -0
  546. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-version.h +43 -0
  547. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv-win.h +653 -0
  548. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/uv.h +1482 -0
  549. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8-debug.h +280 -0
  550. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8-platform.h +82 -0
  551. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8-profiler.h +648 -0
  552. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8-testing.h +48 -0
  553. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8-util.h +640 -0
  554. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8-version.h +20 -0
  555. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8.h +8379 -0
  556. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/v8config.h +424 -0
  557. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/zconf.h +511 -0
  558. data/ext/native/src/wrappers/nodejs/node-v4.4.4/include/zlib.h +1768 -0
  559. data/ext/native/src/wrappers/nodejs/node-v4.4.4/lib/win/x64/node.lib +0 -0
  560. data/ext/native/src/wrappers/nodejs/node-v4.4.4/lib/win/x86/node.lib +0 -0
  561. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/android-ifaddrs.h +54 -0
  562. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/ares.h +627 -0
  563. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/ares_build.h +117 -0
  564. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/ares_rules.h +130 -0
  565. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/ares_version.h +24 -0
  566. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/common.gypi +335 -0
  567. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/config.gypi +45 -0
  568. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/libplatform/libplatform.h +38 -0
  569. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/nameser.h +211 -0
  570. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/node.h +470 -0
  571. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/node_buffer.h +65 -0
  572. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/node_internals.h +331 -0
  573. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/node_object_wrap.h +116 -0
  574. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/node_version.h +54 -0
  575. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/aes.h +149 -0
  576. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/BSD-x86/opensslconf.h +270 -0
  577. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/BSD-x86_64/opensslconf.h +270 -0
  578. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/VC-WIN32/opensslconf.h +271 -0
  579. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/VC-WIN64A/opensslconf.h +271 -0
  580. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/aix-gcc/opensslconf.h +273 -0
  581. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/aix64-gcc/opensslconf.h +273 -0
  582. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/darwin-i386-cc/opensslconf.h +273 -0
  583. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/darwin64-x86_64-cc/opensslconf.h +273 -0
  584. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/linux-aarch64/opensslconf.h +270 -0
  585. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/linux-armv4/opensslconf.h +270 -0
  586. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/linux-elf/opensslconf.h +270 -0
  587. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/linux-ppc/opensslconf.h +270 -0
  588. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/linux-ppc64/opensslconf.h +270 -0
  589. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/linux-x32/opensslconf.h +270 -0
  590. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/linux-x86_64/opensslconf.h +270 -0
  591. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/solaris-x86-gcc/opensslconf.h +270 -0
  592. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/archs/solaris64-x86_64-gcc/opensslconf.h +270 -0
  593. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/asn1.h +1419 -0
  594. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/asn1_mac.h +579 -0
  595. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/asn1t.h +973 -0
  596. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/bio.h +883 -0
  597. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/blowfish.h +130 -0
  598. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/bn.h +949 -0
  599. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/buffer.h +125 -0
  600. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/camellia.h +132 -0
  601. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/cast.h +107 -0
  602. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/cmac.h +82 -0
  603. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/cms.h +555 -0
  604. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/comp.h +79 -0
  605. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/conf.h +267 -0
  606. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/conf_api.h +89 -0
  607. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/crypto.h +661 -0
  608. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/des.h +257 -0
  609. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/des_old.h +497 -0
  610. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/dh.h +393 -0
  611. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/dsa.h +332 -0
  612. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/dso.h +451 -0
  613. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/dtls1.h +272 -0
  614. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/e_os2.h +328 -0
  615. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ebcdic.h +26 -0
  616. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ec.h +1282 -0
  617. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ecdh.h +134 -0
  618. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ecdsa.h +335 -0
  619. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/engine.h +960 -0
  620. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/err.h +389 -0
  621. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/evp.h +1534 -0
  622. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/hmac.h +109 -0
  623. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/idea.h +105 -0
  624. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/krb5_asn.h +240 -0
  625. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/kssl.h +197 -0
  626. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/lhash.h +240 -0
  627. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/md4.h +119 -0
  628. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/md5.h +119 -0
  629. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/mdc2.h +94 -0
  630. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/modes.h +163 -0
  631. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/obj_mac.h +4194 -0
  632. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/objects.h +1143 -0
  633. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ocsp.h +637 -0
  634. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/opensslconf.h +138 -0
  635. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/opensslv.h +97 -0
  636. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ossl_typ.h +211 -0
  637. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/pem.h +615 -0
  638. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/pem2.h +70 -0
  639. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/pkcs12.h +342 -0
  640. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/pkcs7.h +481 -0
  641. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/pqueue.h +99 -0
  642. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/rand.h +150 -0
  643. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/rc2.h +103 -0
  644. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/rc4.h +88 -0
  645. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ripemd.h +105 -0
  646. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/rsa.h +664 -0
  647. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/safestack.h +2672 -0
  648. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/seed.h +149 -0
  649. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/sha.h +214 -0
  650. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/srp.h +179 -0
  651. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/srtp.h +147 -0
  652. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ssl.h +3169 -0
  653. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ssl2.h +265 -0
  654. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ssl23.h +84 -0
  655. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ssl3.h +774 -0
  656. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/stack.h +107 -0
  657. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/symhacks.h +516 -0
  658. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/tls1.h +810 -0
  659. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ts.h +862 -0
  660. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/txt_db.h +112 -0
  661. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ui.h +415 -0
  662. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/ui_compat.h +88 -0
  663. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/whrlpool.h +41 -0
  664. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/x509.h +1327 -0
  665. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/x509_vfy.h +647 -0
  666. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/openssl/x509v3.h +1055 -0
  667. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/pthread-fixes.h +72 -0
  668. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/stdint-msvc2008.h +247 -0
  669. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/tree.h +768 -0
  670. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-aix.h +32 -0
  671. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-bsd.h +34 -0
  672. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-darwin.h +61 -0
  673. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-errno.h +418 -0
  674. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-linux.h +34 -0
  675. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-sunos.h +44 -0
  676. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-threadpool.h +37 -0
  677. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-unix.h +383 -0
  678. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-version.h +43 -0
  679. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv-win.h +653 -0
  680. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/uv.h +1482 -0
  681. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8-debug.h +280 -0
  682. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8-platform.h +114 -0
  683. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8-profiler.h +648 -0
  684. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8-testing.h +48 -0
  685. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8-util.h +643 -0
  686. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8-version.h +20 -0
  687. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8.h +8369 -0
  688. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/v8config.h +424 -0
  689. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/zconf.h +511 -0
  690. data/ext/native/src/wrappers/nodejs/node-v5.9.1/include/zlib.h +1768 -0
  691. data/ext/native/src/wrappers/nodejs/node-v5.9.1/lib/win/x64/node.lib +0 -0
  692. data/ext/native/src/wrappers/nodejs/node-v5.9.1/lib/win/x86/node.lib +0 -0
  693. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/android-ifaddrs.h +54 -0
  694. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/ares.h +635 -0
  695. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/ares_build.h +117 -0
  696. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/ares_rules.h +130 -0
  697. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/ares_version.h +24 -0
  698. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/common.gypi +361 -0
  699. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/config.gypi +47 -0
  700. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/libplatform/libplatform.h +38 -0
  701. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/nameser.h +211 -0
  702. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/node.h +489 -0
  703. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/node_buffer.h +68 -0
  704. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/node_internals.h +309 -0
  705. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/node_object_wrap.h +111 -0
  706. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/node_version.h +54 -0
  707. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/aes.h +149 -0
  708. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/BSD-x86/opensslconf.h +270 -0
  709. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/BSD-x86_64/opensslconf.h +270 -0
  710. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/VC-WIN32/opensslconf.h +271 -0
  711. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/VC-WIN64A/opensslconf.h +271 -0
  712. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/aix-gcc/opensslconf.h +273 -0
  713. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/aix64-gcc/opensslconf.h +273 -0
  714. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/darwin-i386-cc/opensslconf.h +273 -0
  715. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/darwin64-x86_64-cc/opensslconf.h +273 -0
  716. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux-aarch64/opensslconf.h +270 -0
  717. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux-armv4/opensslconf.h +270 -0
  718. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux-elf/opensslconf.h +270 -0
  719. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux-ppc/opensslconf.h +270 -0
  720. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux-ppc64/opensslconf.h +270 -0
  721. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux-x32/opensslconf.h +270 -0
  722. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux-x86_64/opensslconf.h +270 -0
  723. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux32-s390x/opensslconf.h +270 -0
  724. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/linux64-s390x/opensslconf.h +270 -0
  725. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/solaris-x86-gcc/opensslconf.h +270 -0
  726. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/archs/solaris64-x86_64-gcc/opensslconf.h +270 -0
  727. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/asn1.h +1419 -0
  728. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/asn1_mac.h +579 -0
  729. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/asn1t.h +973 -0
  730. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/bio.h +883 -0
  731. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/blowfish.h +130 -0
  732. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/bn.h +949 -0
  733. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/buffer.h +125 -0
  734. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/camellia.h +132 -0
  735. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/cast.h +107 -0
  736. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/cmac.h +82 -0
  737. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/cms.h +555 -0
  738. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/comp.h +83 -0
  739. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/conf.h +267 -0
  740. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/conf_api.h +89 -0
  741. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/crypto.h +661 -0
  742. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/des.h +257 -0
  743. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/des_old.h +497 -0
  744. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/dh.h +393 -0
  745. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/dsa.h +332 -0
  746. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/dso.h +451 -0
  747. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/dtls1.h +272 -0
  748. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/e_os2.h +328 -0
  749. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ebcdic.h +26 -0
  750. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ec.h +1282 -0
  751. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ecdh.h +134 -0
  752. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ecdsa.h +335 -0
  753. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/engine.h +960 -0
  754. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/err.h +389 -0
  755. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/evp.h +1534 -0
  756. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/hmac.h +109 -0
  757. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/idea.h +105 -0
  758. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/krb5_asn.h +240 -0
  759. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/kssl.h +197 -0
  760. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/lhash.h +240 -0
  761. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/md4.h +119 -0
  762. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/md5.h +119 -0
  763. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/mdc2.h +94 -0
  764. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/modes.h +163 -0
  765. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/obj_mac.h +4194 -0
  766. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/objects.h +1143 -0
  767. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ocsp.h +637 -0
  768. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/opensslconf.h +146 -0
  769. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/opensslv.h +97 -0
  770. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ossl_typ.h +211 -0
  771. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/pem.h +615 -0
  772. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/pem2.h +70 -0
  773. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/pkcs12.h +342 -0
  774. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/pkcs7.h +481 -0
  775. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/pqueue.h +99 -0
  776. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/rand.h +150 -0
  777. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/rc2.h +103 -0
  778. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/rc4.h +88 -0
  779. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ripemd.h +105 -0
  780. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/rsa.h +664 -0
  781. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/safestack.h +2672 -0
  782. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/seed.h +149 -0
  783. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/sha.h +214 -0
  784. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/srp.h +179 -0
  785. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/srtp.h +147 -0
  786. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ssl.h +3169 -0
  787. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ssl2.h +265 -0
  788. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ssl23.h +84 -0
  789. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ssl3.h +774 -0
  790. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/stack.h +107 -0
  791. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/symhacks.h +516 -0
  792. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/tls1.h +810 -0
  793. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ts.h +862 -0
  794. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/txt_db.h +112 -0
  795. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ui.h +415 -0
  796. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/ui_compat.h +88 -0
  797. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/whrlpool.h +41 -0
  798. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/x509.h +1328 -0
  799. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/x509_vfy.h +647 -0
  800. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/openssl/x509v3.h +1055 -0
  801. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/pthread-fixes.h +72 -0
  802. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/stdint-msvc2008.h +247 -0
  803. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/tree.h +768 -0
  804. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-aix.h +32 -0
  805. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-bsd.h +34 -0
  806. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-darwin.h +61 -0
  807. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-errno.h +418 -0
  808. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-linux.h +34 -0
  809. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-sunos.h +44 -0
  810. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-threadpool.h +37 -0
  811. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-unix.h +383 -0
  812. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-version.h +43 -0
  813. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv-win.h +648 -0
  814. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/uv.h +1495 -0
  815. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8-debug.h +288 -0
  816. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8-experimental.h +54 -0
  817. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8-platform.h +171 -0
  818. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8-profiler.h +782 -0
  819. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8-testing.h +48 -0
  820. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8-util.h +643 -0
  821. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8-version.h +20 -0
  822. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8.h +8586 -0
  823. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/v8config.h +438 -0
  824. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/zconf.h +511 -0
  825. data/ext/native/src/wrappers/nodejs/node-v6.1.0/include/zlib.h +1768 -0
  826. data/ext/native/src/wrappers/nodejs/node-v6.1.0/lib/win/x64/node.lib +0 -0
  827. data/ext/native/src/wrappers/nodejs/node-v6.1.0/lib/win/x86/node.lib +0 -0
  828. data/ext/native/src/wrappers/php/CMakeLists.txt +118 -0
  829. data/ext/native/src/wrappers/php/cmake/FindPHPLibs.cmake +49 -0
  830. data/ext/native/src/wrappers/php/tests/CMakeLists.txt +94 -0
  831. data/ext/native/src/wrappers/php/tests/StringSink.php.in +60 -0
  832. data/ext/native/src/wrappers/php/tests/StringSource.php.in +67 -0
  833. data/ext/native/src/wrappers/php/tests/VirgilAsn1Reader_Test.php.in +160 -0
  834. data/ext/native/src/wrappers/php/tests/VirgilAsn1Writer_Test.php.in +160 -0
  835. data/ext/native/src/wrappers/php/tests/VirgilAsymmetricCipher_EC_Test.php.in +337 -0
  836. data/ext/native/src/wrappers/php/tests/VirgilAsymmetricCipher_RSA_Test.php.in +340 -0
  837. data/ext/native/src/wrappers/php/tests/VirgilChunkCipher_Test.php.in +207 -0
  838. data/ext/native/src/wrappers/php/tests/VirgilCipher_Test.php.in +181 -0
  839. data/ext/native/src/wrappers/php/tests/VirgilCustomParams_Test.php.in +78 -0
  840. data/ext/native/src/wrappers/php/tests/VirgilHash_MD5_Test.php.in +159 -0
  841. data/ext/native/src/wrappers/php/tests/VirgilHash_SHA256_Test.php.in +159 -0
  842. data/ext/native/src/wrappers/php/tests/VirgilHash_SHA512_Test.php.in +167 -0
  843. data/ext/native/src/wrappers/php/tests/VirgilKDF_Test.php.in +123 -0
  844. data/ext/native/src/wrappers/php/tests/VirgilPBE_Test.php.in +84 -0
  845. data/ext/native/src/wrappers/php/tests/VirgilPBKDF_Test.php.in +66 -0
  846. data/ext/native/src/wrappers/php/tests/VirgilRandom_Test.php.in +56 -0
  847. data/ext/native/src/wrappers/php/tests/VirgilSigner_Test.php.in +211 -0
  848. data/ext/native/src/wrappers/php/tests/VirgilStreamCipher_Test.php.in +207 -0
  849. data/ext/native/src/wrappers/php/tests/VirgilStreamSigner_Test.php.in +212 -0
  850. data/ext/native/src/wrappers/php/tests/VirgilSymmetricCipher_Test.php.in +174 -0
  851. data/ext/native/src/wrappers/php/tests/VirgilVersion_Test.php.in +61 -0
  852. data/ext/native/src/wrappers/php/tests/data/CMakeLists.txt +50 -0
  853. data/ext/native/src/wrappers/php/tests/data/asn1_complex.der +0 -0
  854. data/ext/native/src/wrappers/php/tests/data/asn1_custom_tag.der +0 -0
  855. data/ext/native/src/wrappers/php/tests/data/asn1_integer.der +1 -0
  856. data/ext/native/src/wrappers/php/tests/data/asn1_octet_string.der +0 -0
  857. data/ext/native/src/wrappers/php/tests/data/asn1_sequence.der +0 -0
  858. data/ext/native/src/wrappers/php/tests/data/asn1_utf8_string.der +1 -0
  859. data/ext/native/src/wrappers/php/tests/data/certificate_public_key.pem +6 -0
  860. data/ext/native/src/wrappers/python/CMakeLists.txt +95 -0
  861. data/ext/native/src/wrappers/ruby/CMakeLists.txt +84 -0
  862. data/ext/native/src/wrappers/swig/common.i +119 -0
  863. data/ext/native/src/wrappers/swig/csharp/FixedArray.i +347 -0
  864. data/ext/native/src/wrappers/swig/csharp/VirgilByteArray.i +38 -0
  865. data/ext/native/src/wrappers/swig/csharp/common.i +48 -0
  866. data/ext/native/src/wrappers/swig/csharp/csharphead.swg.in +85 -0
  867. data/ext/native/src/wrappers/swig/java/VirgilByteArray.i +158 -0
  868. data/ext/native/src/wrappers/swig/java/common.i +70 -0
  869. data/ext/native/src/wrappers/swig/php/VirgilByteArray.i +107 -0
  870. data/ext/native/src/wrappers/swig/php/common.i +90 -0
  871. data/ext/native/src/wrappers/swig/util.i +85 -0
  872. data/ext/native/src/wrappers/swig/wrapper.i.in +158 -0
  873. data/lib/virgil/crypto.rb +10 -0
  874. data/lib/virgil/crypto/bytes.rb +57 -0
  875. data/lib/virgil/crypto/version.rb +5 -0
  876. data/lib/virgil/crypto/virgil_stream_data_sink.rb +53 -0
  877. data/lib/virgil/crypto/virgil_stream_data_source.rb +54 -0
  878. data/virgil-crypto.gemspec +53 -0
  879. 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
+ "MIIEIjANBgkqhkiG9w0BAQEFAAOCBA8AMIIECgKCBAEAtWIfF94ni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ppqVadzsZB6rAanz3LEz/djJaePqvOx2DHgcoH3Gi24qS/XTpNgsC2i7jSw+\n"
180
+ "g4qx0iSpWSzn4qf4YM/l2JmSA+ZTuaPm8EkFig1u5jErT268pjcqvqPBdvfcwSYX\n"
181
+ "a+vDzxIZviB7LrKvuH/PWjaiUpe37Jc+kH92S90q/Bq4eXrm6d3BSjKsx+bl1mLP\n"
182
+ "e/txbhAvG0uBc8CoX/PBcY/d5y4Pf+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
+ }