@annadata/capacitor-mqtt-quic 0.1.5 → 0.1.7

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 (795) hide show
  1. package/AnnadataCapacitorMqttQuic.podspec +36 -0
  2. package/README.md +121 -12
  3. package/android/NGTCP2_BUILD_INSTRUCTIONS.md +65 -44
  4. package/android/build-openssl.sh +1 -1
  5. package/android/install/nghttp3-android/arm64-v8a/include/nghttp3/nghttp3.h +3295 -0
  6. package/android/install/nghttp3-android/arm64-v8a/include/nghttp3/version.h +46 -0
  7. package/android/install/nghttp3-android/arm64-v8a/lib/cmake/nghttp3/nghttp3Config.cmake +3 -0
  8. package/android/install/nghttp3-android/arm64-v8a/lib/cmake/nghttp3/nghttp3ConfigVersion.cmake +65 -0
  9. package/android/install/nghttp3-android/arm64-v8a/lib/cmake/nghttp3/nghttp3Targets-release.cmake +29 -0
  10. package/android/install/nghttp3-android/arm64-v8a/lib/cmake/nghttp3/nghttp3Targets.cmake +114 -0
  11. package/android/install/nghttp3-android/arm64-v8a/lib/libnghttp3.a +0 -0
  12. package/android/install/nghttp3-android/arm64-v8a/lib/libnghttp3.so +0 -0
  13. package/android/install/nghttp3-android/arm64-v8a/lib/pkgconfig/libnghttp3.pc +34 -0
  14. package/android/install/nghttp3-android/arm64-v8a/share/doc/nghttp3/README.rst +75 -0
  15. package/android/install/nghttp3-android/armeabi-v7a/include/nghttp3/nghttp3.h +3295 -0
  16. package/android/install/nghttp3-android/armeabi-v7a/include/nghttp3/version.h +46 -0
  17. package/android/install/nghttp3-android/armeabi-v7a/lib/cmake/nghttp3/nghttp3Config.cmake +3 -0
  18. package/android/install/nghttp3-android/armeabi-v7a/lib/cmake/nghttp3/nghttp3ConfigVersion.cmake +65 -0
  19. package/android/install/nghttp3-android/armeabi-v7a/lib/cmake/nghttp3/nghttp3Targets-release.cmake +29 -0
  20. package/android/install/nghttp3-android/armeabi-v7a/lib/cmake/nghttp3/nghttp3Targets.cmake +114 -0
  21. package/android/install/nghttp3-android/armeabi-v7a/lib/libnghttp3.a +0 -0
  22. package/android/install/nghttp3-android/armeabi-v7a/lib/libnghttp3.so +0 -0
  23. package/android/install/nghttp3-android/armeabi-v7a/lib/pkgconfig/libnghttp3.pc +34 -0
  24. package/android/install/nghttp3-android/armeabi-v7a/share/doc/nghttp3/README.rst +75 -0
  25. package/android/install/nghttp3-android/x86_64/include/nghttp3/nghttp3.h +3295 -0
  26. package/android/install/nghttp3-android/x86_64/include/nghttp3/version.h +46 -0
  27. package/android/install/nghttp3-android/x86_64/lib/cmake/nghttp3/nghttp3Config.cmake +3 -0
  28. package/android/install/nghttp3-android/x86_64/lib/cmake/nghttp3/nghttp3ConfigVersion.cmake +65 -0
  29. package/android/install/nghttp3-android/x86_64/lib/cmake/nghttp3/nghttp3Targets-release.cmake +29 -0
  30. package/android/install/nghttp3-android/x86_64/lib/cmake/nghttp3/nghttp3Targets.cmake +114 -0
  31. package/android/install/nghttp3-android/x86_64/lib/libnghttp3.a +0 -0
  32. package/android/install/nghttp3-android/x86_64/lib/libnghttp3.so +0 -0
  33. package/android/install/nghttp3-android/x86_64/lib/pkgconfig/libnghttp3.pc +34 -0
  34. package/android/install/nghttp3-android/x86_64/share/doc/nghttp3/README.rst +75 -0
  35. package/android/install/ngtcp2-android/arm64-v8a/include/ngtcp2/ngtcp2.h +6254 -0
  36. package/android/install/ngtcp2-android/arm64-v8a/include/ngtcp2/ngtcp2_crypto.h +1037 -0
  37. package/android/install/ngtcp2-android/arm64-v8a/include/ngtcp2/ngtcp2_crypto_wolfssl.h +106 -0
  38. package/android/install/ngtcp2-android/arm64-v8a/include/ngtcp2/version.h +51 -0
  39. package/android/install/ngtcp2-android/arm64-v8a/lib/cmake/ngtcp2/ngtcp2Config.cmake +6 -0
  40. package/android/install/ngtcp2-android/arm64-v8a/lib/cmake/ngtcp2/ngtcp2ConfigVersion.cmake +65 -0
  41. package/android/install/ngtcp2-android/arm64-v8a/lib/cmake/ngtcp2/ngtcp2Targets-release.cmake +29 -0
  42. package/android/install/ngtcp2-android/arm64-v8a/lib/cmake/ngtcp2/ngtcp2Targets.cmake +114 -0
  43. package/android/install/ngtcp2-android/arm64-v8a/lib/libngtcp2.a +0 -0
  44. package/android/install/ngtcp2-android/arm64-v8a/lib/libngtcp2.so +0 -0
  45. package/android/install/ngtcp2-android/arm64-v8a/lib/libngtcp2_crypto_wolfssl.a +0 -0
  46. package/android/install/ngtcp2-android/arm64-v8a/lib/libngtcp2_crypto_wolfssl.so +0 -0
  47. package/android/install/ngtcp2-android/arm64-v8a/lib/pkgconfig/libngtcp2.pc +33 -0
  48. package/android/install/ngtcp2-android/arm64-v8a/lib/pkgconfig/libngtcp2_crypto_wolfssl.pc +34 -0
  49. package/android/install/ngtcp2-android/arm64-v8a/share/doc/ngtcp2/README.rst +385 -0
  50. package/android/install/ngtcp2-android/armeabi-v7a/include/ngtcp2/ngtcp2.h +6254 -0
  51. package/android/install/ngtcp2-android/armeabi-v7a/include/ngtcp2/ngtcp2_crypto.h +1037 -0
  52. package/android/install/ngtcp2-android/armeabi-v7a/include/ngtcp2/ngtcp2_crypto_wolfssl.h +106 -0
  53. package/android/install/ngtcp2-android/armeabi-v7a/include/ngtcp2/version.h +51 -0
  54. package/android/install/ngtcp2-android/armeabi-v7a/lib/cmake/ngtcp2/ngtcp2Config.cmake +6 -0
  55. package/android/install/ngtcp2-android/armeabi-v7a/lib/cmake/ngtcp2/ngtcp2ConfigVersion.cmake +65 -0
  56. package/android/install/ngtcp2-android/armeabi-v7a/lib/cmake/ngtcp2/ngtcp2Targets-release.cmake +29 -0
  57. package/android/install/ngtcp2-android/armeabi-v7a/lib/cmake/ngtcp2/ngtcp2Targets.cmake +114 -0
  58. package/android/install/ngtcp2-android/armeabi-v7a/lib/libngtcp2.a +0 -0
  59. package/android/install/ngtcp2-android/armeabi-v7a/lib/libngtcp2.so +0 -0
  60. package/android/install/ngtcp2-android/armeabi-v7a/lib/libngtcp2_crypto_wolfssl.a +0 -0
  61. package/android/install/ngtcp2-android/armeabi-v7a/lib/libngtcp2_crypto_wolfssl.so +0 -0
  62. package/android/install/ngtcp2-android/armeabi-v7a/lib/pkgconfig/libngtcp2.pc +33 -0
  63. package/android/install/ngtcp2-android/armeabi-v7a/lib/pkgconfig/libngtcp2_crypto_wolfssl.pc +34 -0
  64. package/android/install/ngtcp2-android/armeabi-v7a/share/doc/ngtcp2/README.rst +385 -0
  65. package/android/install/ngtcp2-android/x86_64/include/ngtcp2/ngtcp2.h +6254 -0
  66. package/android/install/ngtcp2-android/x86_64/include/ngtcp2/ngtcp2_crypto.h +1037 -0
  67. package/android/install/ngtcp2-android/x86_64/include/ngtcp2/ngtcp2_crypto_wolfssl.h +106 -0
  68. package/android/install/ngtcp2-android/x86_64/include/ngtcp2/version.h +51 -0
  69. package/android/install/ngtcp2-android/x86_64/lib/cmake/ngtcp2/ngtcp2Config.cmake +6 -0
  70. package/android/install/ngtcp2-android/x86_64/lib/cmake/ngtcp2/ngtcp2ConfigVersion.cmake +65 -0
  71. package/android/install/ngtcp2-android/x86_64/lib/cmake/ngtcp2/ngtcp2Targets-release.cmake +29 -0
  72. package/android/install/ngtcp2-android/x86_64/lib/cmake/ngtcp2/ngtcp2Targets.cmake +114 -0
  73. package/android/install/ngtcp2-android/x86_64/lib/libngtcp2.a +0 -0
  74. package/android/install/ngtcp2-android/x86_64/lib/libngtcp2.so +0 -0
  75. package/android/install/ngtcp2-android/x86_64/lib/libngtcp2_crypto_wolfssl.a +0 -0
  76. package/android/install/ngtcp2-android/x86_64/lib/libngtcp2_crypto_wolfssl.so +0 -0
  77. package/android/install/ngtcp2-android/x86_64/lib/pkgconfig/libngtcp2.pc +33 -0
  78. package/android/install/ngtcp2-android/x86_64/lib/pkgconfig/libngtcp2_crypto_wolfssl.pc +34 -0
  79. package/android/install/ngtcp2-android/x86_64/share/doc/ngtcp2/README.rst +385 -0
  80. package/android/install/wolfssl-android/arm64-v8a/bin/wolfssl-config +117 -0
  81. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/callbacks.h +93 -0
  82. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/certs_test.h +7073 -0
  83. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/certs_test_sm.h +2913 -0
  84. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/crl.h +58 -0
  85. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/error-ssl.h +280 -0
  86. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/ocsp.h +191 -0
  87. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/aes.h +117 -0
  88. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/asn1.h +315 -0
  89. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/asn1t.h +30 -0
  90. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/bio.h +237 -0
  91. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/bn.h +332 -0
  92. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/buffer.h +57 -0
  93. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/camellia.h +27 -0
  94. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/cmac.h +66 -0
  95. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/cms.h +26 -0
  96. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/compat_types.h +70 -0
  97. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/conf.h +117 -0
  98. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/crypto.h +171 -0
  99. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/des.h +124 -0
  100. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/dh.h +144 -0
  101. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/dsa.h +164 -0
  102. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ec.h +525 -0
  103. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ec25519.h +46 -0
  104. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ec448.h +46 -0
  105. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ecdh.h +49 -0
  106. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ecdsa.h +87 -0
  107. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ed25519.h +49 -0
  108. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ed448.h +49 -0
  109. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/engine.h +9 -0
  110. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/err.h +84 -0
  111. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/evp.h +1540 -0
  112. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/fips_rand.h +125 -0
  113. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/hmac.h +98 -0
  114. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/kdf.h +45 -0
  115. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/lhash.h +64 -0
  116. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/md4.h +66 -0
  117. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/md5.h +108 -0
  118. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/modes.h +45 -0
  119. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/obj_mac.h +92 -0
  120. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/objects.h +86 -0
  121. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ocsp.h +108 -0
  122. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/opensslconf.h +8 -0
  123. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/opensslv.h +78 -0
  124. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ossl_typ.h +32 -0
  125. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/pem.h +301 -0
  126. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/pkcs12.h +57 -0
  127. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/pkcs7.h +110 -0
  128. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/rand.h +38 -0
  129. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/rc4.h +64 -0
  130. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ripemd.h +58 -0
  131. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/rsa.h +291 -0
  132. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/safestack.h +40 -0
  133. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/sha.h +331 -0
  134. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/sha3.h +158 -0
  135. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/srp.h +33 -0
  136. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ssl.h +1923 -0
  137. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ssl23.h +1 -0
  138. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/stack.h +61 -0
  139. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/tls1.h +64 -0
  140. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/txt_db.h +60 -0
  141. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/ui.h +2 -0
  142. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/x509.h +227 -0
  143. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/x509_vfy.h +50 -0
  144. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/openssl/x509v3.h +237 -0
  145. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/options.h +273 -0
  146. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/quic.h +310 -0
  147. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/sniffer.h +359 -0
  148. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/sniffer_error.h +151 -0
  149. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/ssl.h +6300 -0
  150. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/test.h +4989 -0
  151. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/version.h +40 -0
  152. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/aes.h +1074 -0
  153. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/arc4.h +69 -0
  154. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ascon.h +109 -0
  155. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/asn.h +2855 -0
  156. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/asn_public.h +1009 -0
  157. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/blake2-impl.h +155 -0
  158. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/blake2-int.h +174 -0
  159. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/blake2.h +108 -0
  160. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/camellia.h +116 -0
  161. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/chacha.h +133 -0
  162. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/chacha20_poly1305.h +157 -0
  163. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/cmac.h +168 -0
  164. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/coding.h +107 -0
  165. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/compress.h +60 -0
  166. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/cpuid.h +153 -0
  167. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/cryptocb.h +770 -0
  168. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/curve25519.h +225 -0
  169. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/curve448.h +151 -0
  170. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/des3.h +167 -0
  171. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/dh.h +210 -0
  172. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/dilithium.h +1051 -0
  173. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/dsa.h +121 -0
  174. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ecc.h +1074 -0
  175. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/eccsi.h +176 -0
  176. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ed25519.h +239 -0
  177. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ed448.h +214 -0
  178. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/error-crypt.h +368 -0
  179. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ext_lms.h +62 -0
  180. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ext_mlkem.h +74 -0
  181. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ext_xmss.h +53 -0
  182. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/falcon.h +180 -0
  183. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/fe_448.h +122 -0
  184. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/fe_operations.h +189 -0
  185. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/fips_test.h +131 -0
  186. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ge_448.h +84 -0
  187. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ge_operations.h +134 -0
  188. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/hash.h +296 -0
  189. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/hmac.h +231 -0
  190. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/hpke.h +145 -0
  191. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/integer.h +449 -0
  192. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/kdf.h +199 -0
  193. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/lms.h +202 -0
  194. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/logging.h +588 -0
  195. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/md2.h +83 -0
  196. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/md4.h +77 -0
  197. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/md5.h +141 -0
  198. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/mem_track.h +968 -0
  199. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/memory.h +545 -0
  200. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/misc.h +214 -0
  201. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/mlkem.h +377 -0
  202. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/mpi_class.h +1021 -0
  203. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/mpi_superclass.h +96 -0
  204. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/oid_sum.h +1907 -0
  205. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/pkcs12.h +79 -0
  206. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/pkcs7.h +578 -0
  207. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/poly1305.h +207 -0
  208. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/pwdbased.h +81 -0
  209. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/random.h +300 -0
  210. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/rc2.h +68 -0
  211. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/ripemd.h +67 -0
  212. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/rsa.h +494 -0
  213. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sakke.h +228 -0
  214. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/settings.h +4762 -0
  215. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sha.h +237 -0
  216. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sha256.h +360 -0
  217. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sha3.h +274 -0
  218. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sha512.h +372 -0
  219. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/signature.h +87 -0
  220. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/siphash.h +101 -0
  221. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sm2.h +27 -0
  222. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sm3.h +27 -0
  223. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sm4.h +27 -0
  224. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sp_int.h +1396 -0
  225. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/sphincs.h +167 -0
  226. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/srp.h +313 -0
  227. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/tfm.h +941 -0
  228. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/types.h +2383 -0
  229. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/visibility.h +97 -0
  230. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/wc_encrypt.h +126 -0
  231. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/wc_lms.h +506 -0
  232. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/wc_mlkem.h +370 -0
  233. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/wc_port.h +1764 -0
  234. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/wc_xmss.h +285 -0
  235. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/wolfevent.h +120 -0
  236. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/wolfmath.h +175 -0
  237. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfcrypt/xmss.h +203 -0
  238. package/android/install/wolfssl-android/arm64-v8a/include/wolfssl/wolfio.h +1035 -0
  239. package/android/install/wolfssl-android/arm64-v8a/lib/libwolfssl.a +0 -0
  240. package/android/install/wolfssl-android/arm64-v8a/lib/libwolfssl.la +41 -0
  241. package/android/install/wolfssl-android/arm64-v8a/lib/pkgconfig/wolfssl.pc +11 -0
  242. package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/QUIC.md +117 -0
  243. package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/README.txt +8 -0
  244. package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/async_client.c +245 -0
  245. package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/async_server.c +331 -0
  246. package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/client.c +4885 -0
  247. package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/echoclient.c +341 -0
  248. package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/echoserver.c +498 -0
  249. package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/sctp-client-dtls.c +135 -0
  250. package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/sctp-client.c +78 -0
  251. package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/sctp-server-dtls.c +134 -0
  252. package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/sctp-server.c +83 -0
  253. package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/server.c +4124 -0
  254. package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/example/tls_bench.c +2357 -0
  255. package/android/install/wolfssl-android/arm64-v8a/share/doc/wolfssl/taoCert.txt +176 -0
  256. package/android/install/wolfssl-android/armeabi-v7a/bin/wolfssl-config +117 -0
  257. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/callbacks.h +93 -0
  258. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/certs_test.h +7073 -0
  259. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/certs_test_sm.h +2913 -0
  260. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/crl.h +58 -0
  261. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/error-ssl.h +280 -0
  262. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/ocsp.h +191 -0
  263. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/aes.h +117 -0
  264. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/asn1.h +315 -0
  265. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/asn1t.h +30 -0
  266. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/bio.h +237 -0
  267. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/bn.h +332 -0
  268. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/buffer.h +57 -0
  269. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/camellia.h +27 -0
  270. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/cmac.h +66 -0
  271. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/cms.h +26 -0
  272. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/compat_types.h +70 -0
  273. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/conf.h +117 -0
  274. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/crypto.h +171 -0
  275. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/des.h +124 -0
  276. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/dh.h +144 -0
  277. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/dsa.h +164 -0
  278. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ec.h +525 -0
  279. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ec25519.h +46 -0
  280. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ec448.h +46 -0
  281. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ecdh.h +49 -0
  282. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ecdsa.h +87 -0
  283. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ed25519.h +49 -0
  284. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ed448.h +49 -0
  285. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/engine.h +9 -0
  286. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/err.h +84 -0
  287. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/evp.h +1540 -0
  288. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/fips_rand.h +125 -0
  289. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/hmac.h +98 -0
  290. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/kdf.h +45 -0
  291. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/lhash.h +64 -0
  292. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/md4.h +66 -0
  293. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/md5.h +108 -0
  294. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/modes.h +45 -0
  295. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/obj_mac.h +92 -0
  296. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/objects.h +86 -0
  297. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ocsp.h +108 -0
  298. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/opensslconf.h +8 -0
  299. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/opensslv.h +78 -0
  300. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ossl_typ.h +32 -0
  301. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/pem.h +301 -0
  302. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/pkcs12.h +57 -0
  303. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/pkcs7.h +110 -0
  304. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/rand.h +38 -0
  305. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/rc4.h +64 -0
  306. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ripemd.h +58 -0
  307. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/rsa.h +291 -0
  308. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/safestack.h +40 -0
  309. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/sha.h +331 -0
  310. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/sha3.h +158 -0
  311. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/srp.h +33 -0
  312. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ssl.h +1923 -0
  313. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ssl23.h +1 -0
  314. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/stack.h +61 -0
  315. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/tls1.h +64 -0
  316. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/txt_db.h +60 -0
  317. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/ui.h +2 -0
  318. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/x509.h +227 -0
  319. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/x509_vfy.h +50 -0
  320. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/openssl/x509v3.h +237 -0
  321. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/options.h +261 -0
  322. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/quic.h +310 -0
  323. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/sniffer.h +359 -0
  324. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/sniffer_error.h +151 -0
  325. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/ssl.h +6300 -0
  326. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/test.h +4989 -0
  327. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/version.h +40 -0
  328. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/aes.h +1074 -0
  329. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/arc4.h +69 -0
  330. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ascon.h +109 -0
  331. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/asn.h +2855 -0
  332. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/asn_public.h +1009 -0
  333. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/blake2-impl.h +155 -0
  334. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/blake2-int.h +174 -0
  335. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/blake2.h +108 -0
  336. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/camellia.h +116 -0
  337. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/chacha.h +133 -0
  338. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/chacha20_poly1305.h +157 -0
  339. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/cmac.h +168 -0
  340. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/coding.h +107 -0
  341. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/compress.h +60 -0
  342. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/cpuid.h +153 -0
  343. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/cryptocb.h +770 -0
  344. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/curve25519.h +225 -0
  345. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/curve448.h +151 -0
  346. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/des3.h +167 -0
  347. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/dh.h +210 -0
  348. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/dilithium.h +1051 -0
  349. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/dsa.h +121 -0
  350. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ecc.h +1074 -0
  351. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/eccsi.h +176 -0
  352. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ed25519.h +239 -0
  353. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ed448.h +214 -0
  354. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/error-crypt.h +368 -0
  355. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ext_lms.h +62 -0
  356. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ext_mlkem.h +74 -0
  357. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ext_xmss.h +53 -0
  358. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/falcon.h +180 -0
  359. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/fe_448.h +122 -0
  360. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/fe_operations.h +189 -0
  361. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/fips_test.h +131 -0
  362. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ge_448.h +84 -0
  363. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ge_operations.h +134 -0
  364. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/hash.h +296 -0
  365. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/hmac.h +231 -0
  366. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/hpke.h +145 -0
  367. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/integer.h +449 -0
  368. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/kdf.h +199 -0
  369. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/lms.h +202 -0
  370. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/logging.h +588 -0
  371. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/md2.h +83 -0
  372. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/md4.h +77 -0
  373. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/md5.h +141 -0
  374. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/mem_track.h +968 -0
  375. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/memory.h +545 -0
  376. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/misc.h +214 -0
  377. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/mlkem.h +377 -0
  378. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/mpi_class.h +1021 -0
  379. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/mpi_superclass.h +96 -0
  380. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/oid_sum.h +1907 -0
  381. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/pkcs12.h +79 -0
  382. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/pkcs7.h +578 -0
  383. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/poly1305.h +207 -0
  384. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/pwdbased.h +81 -0
  385. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/random.h +300 -0
  386. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/rc2.h +68 -0
  387. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/ripemd.h +67 -0
  388. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/rsa.h +494 -0
  389. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sakke.h +228 -0
  390. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/settings.h +4762 -0
  391. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sha.h +237 -0
  392. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sha256.h +360 -0
  393. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sha3.h +274 -0
  394. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sha512.h +372 -0
  395. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/signature.h +87 -0
  396. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/siphash.h +101 -0
  397. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sm2.h +27 -0
  398. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sm3.h +27 -0
  399. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sm4.h +27 -0
  400. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sp_int.h +1396 -0
  401. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/sphincs.h +167 -0
  402. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/srp.h +313 -0
  403. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/tfm.h +941 -0
  404. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/types.h +2383 -0
  405. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/visibility.h +97 -0
  406. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/wc_encrypt.h +126 -0
  407. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/wc_lms.h +506 -0
  408. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/wc_mlkem.h +370 -0
  409. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/wc_port.h +1764 -0
  410. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/wc_xmss.h +285 -0
  411. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/wolfevent.h +120 -0
  412. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/wolfmath.h +175 -0
  413. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfcrypt/xmss.h +203 -0
  414. package/android/install/wolfssl-android/armeabi-v7a/include/wolfssl/wolfio.h +1035 -0
  415. package/android/install/wolfssl-android/armeabi-v7a/lib/libwolfssl.a +0 -0
  416. package/android/install/wolfssl-android/armeabi-v7a/lib/libwolfssl.la +41 -0
  417. package/android/install/wolfssl-android/armeabi-v7a/lib/pkgconfig/wolfssl.pc +11 -0
  418. package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/QUIC.md +117 -0
  419. package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/README.txt +8 -0
  420. package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/async_client.c +245 -0
  421. package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/async_server.c +331 -0
  422. package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/client.c +4885 -0
  423. package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/echoclient.c +341 -0
  424. package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/echoserver.c +498 -0
  425. package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/sctp-client-dtls.c +135 -0
  426. package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/sctp-client.c +78 -0
  427. package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/sctp-server-dtls.c +134 -0
  428. package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/sctp-server.c +83 -0
  429. package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/server.c +4124 -0
  430. package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/example/tls_bench.c +2357 -0
  431. package/android/install/wolfssl-android/armeabi-v7a/share/doc/wolfssl/taoCert.txt +176 -0
  432. package/android/install/wolfssl-android/x86_64/bin/wolfssl-config +117 -0
  433. package/android/install/wolfssl-android/x86_64/include/wolfssl/callbacks.h +93 -0
  434. package/android/install/wolfssl-android/x86_64/include/wolfssl/certs_test.h +7073 -0
  435. package/android/install/wolfssl-android/x86_64/include/wolfssl/certs_test_sm.h +2913 -0
  436. package/android/install/wolfssl-android/x86_64/include/wolfssl/crl.h +58 -0
  437. package/android/install/wolfssl-android/x86_64/include/wolfssl/error-ssl.h +280 -0
  438. package/android/install/wolfssl-android/x86_64/include/wolfssl/ocsp.h +191 -0
  439. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/aes.h +117 -0
  440. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/asn1.h +315 -0
  441. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/asn1t.h +30 -0
  442. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/bio.h +237 -0
  443. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/bn.h +332 -0
  444. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/buffer.h +57 -0
  445. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/camellia.h +27 -0
  446. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/cmac.h +66 -0
  447. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/cms.h +26 -0
  448. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/compat_types.h +70 -0
  449. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/conf.h +117 -0
  450. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/crypto.h +171 -0
  451. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/des.h +124 -0
  452. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/dh.h +144 -0
  453. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/dsa.h +164 -0
  454. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ec.h +525 -0
  455. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ec25519.h +46 -0
  456. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ec448.h +46 -0
  457. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ecdh.h +49 -0
  458. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ecdsa.h +87 -0
  459. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ed25519.h +49 -0
  460. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ed448.h +49 -0
  461. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/engine.h +9 -0
  462. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/err.h +84 -0
  463. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/evp.h +1540 -0
  464. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/fips_rand.h +125 -0
  465. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/hmac.h +98 -0
  466. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/kdf.h +45 -0
  467. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/lhash.h +64 -0
  468. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/md4.h +66 -0
  469. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/md5.h +108 -0
  470. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/modes.h +45 -0
  471. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/obj_mac.h +92 -0
  472. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/objects.h +86 -0
  473. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ocsp.h +108 -0
  474. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/opensslconf.h +8 -0
  475. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/opensslv.h +78 -0
  476. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ossl_typ.h +32 -0
  477. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/pem.h +301 -0
  478. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/pkcs12.h +57 -0
  479. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/pkcs7.h +110 -0
  480. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/rand.h +38 -0
  481. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/rc4.h +64 -0
  482. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ripemd.h +58 -0
  483. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/rsa.h +291 -0
  484. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/safestack.h +40 -0
  485. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/sha.h +331 -0
  486. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/sha3.h +158 -0
  487. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/srp.h +33 -0
  488. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ssl.h +1923 -0
  489. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ssl23.h +1 -0
  490. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/stack.h +61 -0
  491. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/tls1.h +64 -0
  492. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/txt_db.h +60 -0
  493. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/ui.h +2 -0
  494. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/x509.h +227 -0
  495. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/x509_vfy.h +50 -0
  496. package/android/install/wolfssl-android/x86_64/include/wolfssl/openssl/x509v3.h +237 -0
  497. package/android/install/wolfssl-android/x86_64/include/wolfssl/options.h +273 -0
  498. package/android/install/wolfssl-android/x86_64/include/wolfssl/quic.h +310 -0
  499. package/android/install/wolfssl-android/x86_64/include/wolfssl/sniffer.h +359 -0
  500. package/android/install/wolfssl-android/x86_64/include/wolfssl/sniffer_error.h +151 -0
  501. package/android/install/wolfssl-android/x86_64/include/wolfssl/ssl.h +6300 -0
  502. package/android/install/wolfssl-android/x86_64/include/wolfssl/test.h +4989 -0
  503. package/android/install/wolfssl-android/x86_64/include/wolfssl/version.h +40 -0
  504. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/aes.h +1074 -0
  505. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/arc4.h +69 -0
  506. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ascon.h +109 -0
  507. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/asn.h +2855 -0
  508. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/asn_public.h +1009 -0
  509. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/blake2-impl.h +155 -0
  510. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/blake2-int.h +174 -0
  511. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/blake2.h +108 -0
  512. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/camellia.h +116 -0
  513. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/chacha.h +133 -0
  514. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/chacha20_poly1305.h +157 -0
  515. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/cmac.h +168 -0
  516. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/coding.h +107 -0
  517. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/compress.h +60 -0
  518. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/cpuid.h +153 -0
  519. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/cryptocb.h +770 -0
  520. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/curve25519.h +225 -0
  521. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/curve448.h +151 -0
  522. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/des3.h +167 -0
  523. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/dh.h +210 -0
  524. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/dilithium.h +1051 -0
  525. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/dsa.h +121 -0
  526. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ecc.h +1074 -0
  527. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/eccsi.h +176 -0
  528. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ed25519.h +239 -0
  529. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ed448.h +214 -0
  530. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/error-crypt.h +368 -0
  531. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ext_lms.h +62 -0
  532. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ext_mlkem.h +74 -0
  533. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ext_xmss.h +53 -0
  534. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/falcon.h +180 -0
  535. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/fe_448.h +122 -0
  536. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/fe_operations.h +189 -0
  537. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/fips_test.h +131 -0
  538. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ge_448.h +84 -0
  539. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ge_operations.h +134 -0
  540. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/hash.h +296 -0
  541. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/hmac.h +231 -0
  542. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/hpke.h +145 -0
  543. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/integer.h +449 -0
  544. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/kdf.h +199 -0
  545. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/lms.h +202 -0
  546. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/logging.h +588 -0
  547. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/md2.h +83 -0
  548. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/md4.h +77 -0
  549. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/md5.h +141 -0
  550. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/mem_track.h +968 -0
  551. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/memory.h +545 -0
  552. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/misc.h +214 -0
  553. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/mlkem.h +377 -0
  554. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/mpi_class.h +1021 -0
  555. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/mpi_superclass.h +96 -0
  556. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/oid_sum.h +1907 -0
  557. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/pkcs12.h +79 -0
  558. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/pkcs7.h +578 -0
  559. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/poly1305.h +207 -0
  560. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/pwdbased.h +81 -0
  561. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/random.h +300 -0
  562. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/rc2.h +68 -0
  563. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/ripemd.h +67 -0
  564. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/rsa.h +494 -0
  565. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sakke.h +228 -0
  566. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/settings.h +4762 -0
  567. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sha.h +237 -0
  568. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sha256.h +360 -0
  569. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sha3.h +274 -0
  570. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sha512.h +372 -0
  571. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/signature.h +87 -0
  572. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/siphash.h +101 -0
  573. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sm2.h +27 -0
  574. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sm3.h +27 -0
  575. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sm4.h +27 -0
  576. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sp_int.h +1396 -0
  577. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/sphincs.h +167 -0
  578. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/srp.h +313 -0
  579. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/tfm.h +941 -0
  580. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/types.h +2383 -0
  581. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/visibility.h +97 -0
  582. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/wc_encrypt.h +126 -0
  583. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/wc_lms.h +506 -0
  584. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/wc_mlkem.h +370 -0
  585. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/wc_port.h +1764 -0
  586. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/wc_xmss.h +285 -0
  587. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/wolfevent.h +120 -0
  588. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/wolfmath.h +175 -0
  589. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfcrypt/xmss.h +203 -0
  590. package/android/install/wolfssl-android/x86_64/include/wolfssl/wolfio.h +1035 -0
  591. package/android/install/wolfssl-android/x86_64/lib/libwolfssl.a +0 -0
  592. package/android/install/wolfssl-android/x86_64/lib/libwolfssl.la +41 -0
  593. package/android/install/wolfssl-android/x86_64/lib/pkgconfig/wolfssl.pc +11 -0
  594. package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/QUIC.md +117 -0
  595. package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/README.txt +8 -0
  596. package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/async_client.c +245 -0
  597. package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/async_server.c +331 -0
  598. package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/client.c +4885 -0
  599. package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/echoclient.c +341 -0
  600. package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/echoserver.c +498 -0
  601. package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/sctp-client-dtls.c +135 -0
  602. package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/sctp-client.c +78 -0
  603. package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/sctp-server-dtls.c +134 -0
  604. package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/sctp-server.c +83 -0
  605. package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/server.c +4124 -0
  606. package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/example/tls_bench.c +2357 -0
  607. package/android/install/wolfssl-android/x86_64/share/doc/wolfssl/taoCert.txt +176 -0
  608. package/android/src/main/cpp/CMakeLists.txt +19 -27
  609. package/android/src/main/cpp/ngtcp2_jni.cpp +30 -36
  610. package/android/src/main/kotlin/ai/annadata/mqttquic/MqttQuicPlugin.kt +15 -0
  611. package/android/src/main/kotlin/ai/annadata/mqttquic/client/MQTTClient.kt +6 -2
  612. package/build-native.sh +397 -0
  613. package/deps-versions.sh +25 -0
  614. package/dist/esm/definitions.d.ts +20 -0
  615. package/dist/esm/definitions.d.ts.map +1 -1
  616. package/dist/esm/web.d.ts +26 -3
  617. package/dist/esm/web.d.ts.map +1 -1
  618. package/dist/esm/web.js +230 -10
  619. package/dist/esm/web.js.map +1 -1
  620. package/dist/plugin.cjs.js +11363 -13
  621. package/dist/plugin.cjs.js.map +1 -1
  622. package/dist/plugin.js +11364 -14
  623. package/dist/plugin.js.map +1 -1
  624. package/docs/ARCHITECTURAL_ANALYSIS.md +710 -0
  625. package/docs/CAPACITOR_MQTT_QUIC_PRODUCTION_PLUGIN.md +190 -0
  626. package/docs/CAPACITOR_VERSION_SUPPORT.md +65 -0
  627. package/docs/IMPLEMENTATION_SUMMARY.md +246 -0
  628. package/docs/MQTT5_CLIENT_COMPLIANCE.md +48 -0
  629. package/docs/MQTT5_IMPLEMENTATION_COMPLETE.md +178 -0
  630. package/docs/MQTT_VERSION_ANALYSIS.md +233 -0
  631. package/docs/NGTCP2_IMPLEMENTATION_STATUS.md +214 -0
  632. package/docs/NGTCP2_INTEGRATION_PLAN.md +597 -0
  633. package/docs/P0_P1_CHANGELOG.md +79 -0
  634. package/docs/PRODUCTION_PUBLISH_STEPS.md +161 -0
  635. package/docs/PROJECT_OVERVIEW.md +193 -0
  636. package/ios/.swiftpm/xcode/xcuserdata/annadata.xcuserdatad/xcschemes/xcschememanagement.plist +1 -1
  637. package/ios/NGTCP2_BUILD_INSTRUCTIONS.md +12 -0
  638. package/ios/Sources/MqttQuicPlugin/MqttQuicPlugin.swift +6 -0
  639. package/ios/Sources/MqttQuicPlugin/QUIC/NGTCP2Bridge.mm +6 -0
  640. package/ios/build-openssl.sh +1 -1
  641. package/ios/libs/MqttQuicLibs.xcframework/ios-arm64/libmqttquic_native_device.a +0 -0
  642. package/ios/libs/MqttQuicLibs.xcframework/ios-arm64_x86_64-simulator/libmqttquic_native_simulator.a +0 -0
  643. package/ios/libs/libnghttp3.a +0 -0
  644. package/ios/libs/libngtcp2.a +0 -0
  645. package/ios/libs/libngtcp2_crypto_wolfssl.a +0 -0
  646. package/ios/libs/libwolfssl.a +0 -0
  647. package/ios/libs-simulator/libnghttp3.a +0 -0
  648. package/ios/libs-simulator/libngtcp2.a +0 -0
  649. package/ios/libs-simulator/libngtcp2_crypto_wolfssl.a +0 -0
  650. package/ios/libs-simulator/libwolfssl.a +0 -0
  651. package/ios/libs-simulator-x86_64/libnghttp3.a +0 -0
  652. package/ios/libs-simulator-x86_64/libngtcp2.a +0 -0
  653. package/ios/libs-simulator-x86_64/libngtcp2_crypto_wolfssl.a +0 -0
  654. package/ios/libs-simulator-x86_64/libwolfssl.a +0 -0
  655. package/package.json +22 -8
  656. package/ios/include/ngtcp2/ngtcp2_crypto_quictls.h +0 -147
  657. package/ios/include/openssl/aes.h +0 -111
  658. package/ios/include/openssl/asn1.h +0 -1131
  659. package/ios/include/openssl/asn1_mac.h +0 -10
  660. package/ios/include/openssl/asn1err.h +0 -140
  661. package/ios/include/openssl/asn1t.h +0 -946
  662. package/ios/include/openssl/async.h +0 -96
  663. package/ios/include/openssl/asyncerr.h +0 -29
  664. package/ios/include/openssl/bio.h +0 -887
  665. package/ios/include/openssl/bioerr.h +0 -65
  666. package/ios/include/openssl/blowfish.h +0 -78
  667. package/ios/include/openssl/bn.h +0 -584
  668. package/ios/include/openssl/bnerr.h +0 -47
  669. package/ios/include/openssl/buffer.h +0 -62
  670. package/ios/include/openssl/buffererr.h +0 -25
  671. package/ios/include/openssl/camellia.h +0 -117
  672. package/ios/include/openssl/cast.h +0 -71
  673. package/ios/include/openssl/cmac.h +0 -52
  674. package/ios/include/openssl/cmp.h +0 -597
  675. package/ios/include/openssl/cmp_util.h +0 -56
  676. package/ios/include/openssl/cmperr.h +0 -116
  677. package/ios/include/openssl/cms.h +0 -493
  678. package/ios/include/openssl/cmserr.h +0 -124
  679. package/ios/include/openssl/comp.h +0 -59
  680. package/ios/include/openssl/comperr.h +0 -31
  681. package/ios/include/openssl/conf.h +0 -214
  682. package/ios/include/openssl/conf_api.h +0 -46
  683. package/ios/include/openssl/conferr.h +0 -52
  684. package/ios/include/openssl/configuration.h +0 -149
  685. package/ios/include/openssl/conftypes.h +0 -44
  686. package/ios/include/openssl/core.h +0 -233
  687. package/ios/include/openssl/core_dispatch.h +0 -960
  688. package/ios/include/openssl/core_names.h +0 -561
  689. package/ios/include/openssl/core_object.h +0 -41
  690. package/ios/include/openssl/crmf.h +0 -227
  691. package/ios/include/openssl/crmferr.h +0 -50
  692. package/ios/include/openssl/crypto.h +0 -558
  693. package/ios/include/openssl/cryptoerr.h +0 -55
  694. package/ios/include/openssl/cryptoerr_legacy.h +0 -1466
  695. package/ios/include/openssl/ct.h +0 -573
  696. package/ios/include/openssl/cterr.h +0 -45
  697. package/ios/include/openssl/decoder.h +0 -133
  698. package/ios/include/openssl/decodererr.h +0 -28
  699. package/ios/include/openssl/des.h +0 -211
  700. package/ios/include/openssl/dh.h +0 -335
  701. package/ios/include/openssl/dherr.h +0 -58
  702. package/ios/include/openssl/dsa.h +0 -280
  703. package/ios/include/openssl/dsaerr.h +0 -44
  704. package/ios/include/openssl/dtls1.h +0 -57
  705. package/ios/include/openssl/e_os2.h +0 -308
  706. package/ios/include/openssl/ebcdic.h +0 -39
  707. package/ios/include/openssl/ec.h +0 -1572
  708. package/ios/include/openssl/ecdh.h +0 -10
  709. package/ios/include/openssl/ecdsa.h +0 -10
  710. package/ios/include/openssl/ecerr.h +0 -104
  711. package/ios/include/openssl/encoder.h +0 -124
  712. package/ios/include/openssl/encodererr.h +0 -28
  713. package/ios/include/openssl/engine.h +0 -833
  714. package/ios/include/openssl/engineerr.h +0 -63
  715. package/ios/include/openssl/err.h +0 -504
  716. package/ios/include/openssl/ess.h +0 -128
  717. package/ios/include/openssl/esserr.h +0 -32
  718. package/ios/include/openssl/evp.h +0 -2175
  719. package/ios/include/openssl/evperr.h +0 -134
  720. package/ios/include/openssl/fips_names.h +0 -77
  721. package/ios/include/openssl/fipskey.h +0 -36
  722. package/ios/include/openssl/hmac.h +0 -62
  723. package/ios/include/openssl/http.h +0 -109
  724. package/ios/include/openssl/httperr.h +0 -55
  725. package/ios/include/openssl/idea.h +0 -82
  726. package/ios/include/openssl/kdf.h +0 -138
  727. package/ios/include/openssl/kdferr.h +0 -16
  728. package/ios/include/openssl/lhash.h +0 -331
  729. package/ios/include/openssl/macros.h +0 -325
  730. package/ios/include/openssl/md2.h +0 -56
  731. package/ios/include/openssl/md4.h +0 -63
  732. package/ios/include/openssl/md5.h +0 -62
  733. package/ios/include/openssl/mdc2.h +0 -55
  734. package/ios/include/openssl/modes.h +0 -219
  735. package/ios/include/openssl/obj_mac.h +0 -5481
  736. package/ios/include/openssl/objects.h +0 -183
  737. package/ios/include/openssl/objectserr.h +0 -28
  738. package/ios/include/openssl/ocsp.h +0 -483
  739. package/ios/include/openssl/ocsperr.h +0 -53
  740. package/ios/include/openssl/opensslconf.h +0 -17
  741. package/ios/include/openssl/opensslv.h +0 -114
  742. package/ios/include/openssl/ossl_typ.h +0 -16
  743. package/ios/include/openssl/param_build.h +0 -63
  744. package/ios/include/openssl/params.h +0 -160
  745. package/ios/include/openssl/pem.h +0 -541
  746. package/ios/include/openssl/pem2.h +0 -19
  747. package/ios/include/openssl/pemerr.h +0 -58
  748. package/ios/include/openssl/pkcs12.h +0 -353
  749. package/ios/include/openssl/pkcs12err.h +0 -45
  750. package/ios/include/openssl/pkcs7.h +0 -430
  751. package/ios/include/openssl/pkcs7err.h +0 -63
  752. package/ios/include/openssl/prov_ssl.h +0 -34
  753. package/ios/include/openssl/proverr.h +0 -149
  754. package/ios/include/openssl/provider.h +0 -60
  755. package/ios/include/openssl/quic.h +0 -19
  756. package/ios/include/openssl/rand.h +0 -125
  757. package/ios/include/openssl/randerr.h +0 -69
  758. package/ios/include/openssl/rc2.h +0 -68
  759. package/ios/include/openssl/rc4.h +0 -47
  760. package/ios/include/openssl/rc5.h +0 -79
  761. package/ios/include/openssl/ripemd.h +0 -59
  762. package/ios/include/openssl/rsa.h +0 -610
  763. package/ios/include/openssl/rsaerr.h +0 -107
  764. package/ios/include/openssl/safestack.h +0 -297
  765. package/ios/include/openssl/seed.h +0 -113
  766. package/ios/include/openssl/self_test.h +0 -94
  767. package/ios/include/openssl/sha.h +0 -138
  768. package/ios/include/openssl/srp.h +0 -285
  769. package/ios/include/openssl/srtp.h +0 -56
  770. package/ios/include/openssl/ssl.h +0 -2671
  771. package/ios/include/openssl/ssl2.h +0 -30
  772. package/ios/include/openssl/ssl3.h +0 -347
  773. package/ios/include/openssl/sslerr.h +0 -348
  774. package/ios/include/openssl/sslerr_legacy.h +0 -468
  775. package/ios/include/openssl/stack.h +0 -90
  776. package/ios/include/openssl/store.h +0 -369
  777. package/ios/include/openssl/storeerr.h +0 -49
  778. package/ios/include/openssl/symhacks.h +0 -39
  779. package/ios/include/openssl/tls1.h +0 -1186
  780. package/ios/include/openssl/trace.h +0 -312
  781. package/ios/include/openssl/ts.h +0 -505
  782. package/ios/include/openssl/tserr.h +0 -67
  783. package/ios/include/openssl/txt_db.h +0 -63
  784. package/ios/include/openssl/types.h +0 -239
  785. package/ios/include/openssl/ui.h +0 -407
  786. package/ios/include/openssl/uierr.h +0 -38
  787. package/ios/include/openssl/whrlpool.h +0 -62
  788. package/ios/include/openssl/x509.h +0 -1279
  789. package/ios/include/openssl/x509_vfy.h +0 -894
  790. package/ios/include/openssl/x509err.h +0 -69
  791. package/ios/include/openssl/x509v3.h +0 -1453
  792. package/ios/include/openssl/x509v3err.h +0 -93
  793. package/ios/libs/libcrypto.a +0 -0
  794. package/ios/libs/libngtcp2_crypto_quictls.a +0 -0
  795. package/ios/libs/libssl.a +0 -0
@@ -0,0 +1,1764 @@
1
+ /* wc_port.h
2
+ *
3
+ * Copyright (C) 2006-2025 wolfSSL Inc.
4
+ *
5
+ * This file is part of wolfSSL.
6
+ *
7
+ * wolfSSL is free software; you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation; either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * wolfSSL is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program; if not, write to the Free Software
19
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
20
+ */
21
+
22
+ /*!
23
+ \file wolfssl/wolfcrypt/wc_port.h
24
+ */
25
+
26
+ #ifndef WOLF_CRYPT_PORT_H
27
+ #define WOLF_CRYPT_PORT_H
28
+
29
+ #include <wolfssl/wolfcrypt/settings.h>
30
+ #include <wolfssl/wolfcrypt/visibility.h>
31
+
32
+ #ifdef __cplusplus
33
+ extern "C" {
34
+ #endif
35
+
36
+ /* Detect if compiler supports C99. "NO_WOLF_C99" can be defined in
37
+ * user_settings.h to disable checking for C99 support. */
38
+ #if !defined(WOLF_C99) && defined(__STDC_VERSION__) && \
39
+ !defined(WOLFSSL_ARDUINO) && !defined(NO_WOLF_C99)
40
+ #if __STDC_VERSION__ >= 199901L
41
+ #define WOLF_C99
42
+ #endif
43
+ #endif
44
+
45
+
46
+ /* GENERIC INCLUDE SECTION */
47
+ #if defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
48
+ #include <mqx.h>
49
+ #if (defined(MQX_USE_IO_OLD) && MQX_USE_IO_OLD) || \
50
+ defined(FREESCALE_MQX_5_0)
51
+ #include <fio.h>
52
+ #else
53
+ #include <nio.h>
54
+ #endif
55
+ #endif
56
+
57
+ #if defined(WOLFSSL_MAX3266X) || defined(WOLFSSL_MAX3266X_OLD)
58
+ #include <wolfssl/wolfcrypt/port/maxim/max3266x.h>
59
+ #endif
60
+
61
+ #ifdef WOLFSSL_LINUXKM
62
+ #include "../../linuxkm/linuxkm_wc_port.h"
63
+ #elif defined(WOLFSSL_BSDKM)
64
+ #include "../../bsdkm/bsdkm_wc_port.h"
65
+ #endif /* WOLFSSL_LINUXKM */
66
+
67
+ #ifndef WARN_UNUSED_RESULT
68
+ #if defined(WOLFSSL_LINUXKM) && defined(__must_check)
69
+ #define WARN_UNUSED_RESULT __must_check
70
+ #elif (defined(__GNUC__) && (__GNUC__ >= 4)) || \
71
+ (defined(__IAR_SYSTEMS_ICC__) && (__VER__ >= 9040001))
72
+ #define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
73
+ #else
74
+ #define WARN_UNUSED_RESULT
75
+ #endif
76
+ #endif /* !WARN_UNUSED_RESULT */
77
+
78
+ #ifndef WC_MAYBE_UNUSED
79
+ #if (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) || \
80
+ defined(__IAR_SYSTEMS_ICC__)
81
+ #define WC_MAYBE_UNUSED __attribute__((unused))
82
+ #else
83
+ #define WC_MAYBE_UNUSED
84
+ #endif
85
+ #endif /* !WC_MAYBE_UNUSED */
86
+
87
+ #ifndef WC_DEPRECATED
88
+ #ifdef WOLFSSL_ZEPHYR
89
+ #define WC_DEPRECATED(msg) /* null expansion */
90
+ #elif ((defined(__GNUC__) && \
91
+ ((__GNUC__ >= 5) || \
92
+ ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))))) || \
93
+ defined(__clang__)
94
+ #define WC_DEPRECATED(msg) __attribute__((deprecated(msg)))
95
+ #elif defined(__WATCOMC__)
96
+ /* Watcom macro needs to expand to something, here just a comment: */
97
+ #define WC_DEPRECATED(msg) /* null expansion */
98
+ #elif defined(_MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__) || \
99
+ defined(_WIN32_WCE)
100
+ #define WC_DEPRECATED(msg) __declspec(deprecated(msg))
101
+ #elif (defined(__GNUC__) && (__GNUC__ >= 4)) || \
102
+ defined(__IAR_SYSTEMS_ICC__)
103
+ #define WC_DEPRECATED(msg) __attribute__((deprecated))
104
+ #else
105
+ #define WC_DEPRECATED(msg) /* null expansion */
106
+ #endif
107
+ #endif /* !WC_MAYBE_UNUSED */
108
+
109
+ /* use inlining if compiler allows */
110
+ #ifndef WC_INLINE
111
+ #ifndef NO_INLINE
112
+ #ifdef _MSC_VER
113
+ #define WC_INLINE __inline
114
+ #elif defined(__GNUC__)
115
+ #ifdef WOLFSSL_VXWORKS
116
+ #define WC_INLINE __inline__
117
+ #else
118
+ #define WC_INLINE inline
119
+ #endif
120
+ #elif defined(__IAR_SYSTEMS_ICC__)
121
+ #define WC_INLINE inline
122
+ #elif defined(THREADX)
123
+ #define WC_INLINE _Inline
124
+ #elif defined(__ghc__)
125
+ #ifndef __cplusplus
126
+ #define WC_INLINE __inline
127
+ #else
128
+ #define WC_INLINE inline
129
+ #endif
130
+ #elif defined(__CCRX__)
131
+ #define WC_INLINE inline
132
+ #elif defined(__DCC__)
133
+ #ifndef __cplusplus
134
+ #define WC_INLINE __inline__
135
+ #else
136
+ #define WC_INLINE inline
137
+ #endif
138
+ #else
139
+ #define WC_INLINE WC_MAYBE_UNUSED
140
+ #endif
141
+ #else
142
+ #define WC_INLINE WC_MAYBE_UNUSED
143
+ #endif
144
+ #endif
145
+
146
+ #ifndef WC_OMIT_FRAME_POINTER
147
+ #if defined(__GNUC__)
148
+ #define WC_OMIT_FRAME_POINTER \
149
+ __attribute__((optimize("-fomit-frame-pointer")))
150
+ #else
151
+ #define WC_OMIT_FRAME_POINTER
152
+ #endif
153
+ #endif
154
+
155
+ /* THREADING/MUTEX SECTION */
156
+ #if defined(SINGLE_THREADED) && defined(NO_FILESYSTEM)
157
+ /* No system headers required for build. */
158
+ #elif defined(__WATCOMC__)
159
+ #if defined(SINGLE_THREADED)
160
+ #if defined(USE_WINDOWS_API)
161
+ #define _WINSOCKAPI_ /* block inclusion of winsock.h header file */
162
+ #include <windows.h>
163
+ #undef _WINSOCKAPI_ /* undefine it for MINGW winsock2.h header */
164
+ #ifndef WOLFSSL_USER_IO
165
+ #include <winsock2.h>
166
+ #include <ws2tcpip.h> /* required for InetPton */
167
+ #endif
168
+ #elif defined(__OS2__)
169
+ #include <os2.h>
170
+ #endif
171
+ #else
172
+ #if defined(USE_WINDOWS_API)
173
+ #define _WINSOCKAPI_ /* block inclusion of winsock.h header file */
174
+ #include <windows.h>
175
+ #undef _WINSOCKAPI_ /* undefine it for MINGW winsock2.h header */
176
+ #include <process.h>
177
+ #ifndef WOLFSSL_USER_IO
178
+ #include <winsock2.h>
179
+ #include <ws2tcpip.h> /* required for InetPton */
180
+ #endif
181
+ #elif defined(__NT__)
182
+ #define _WINSOCKAPI_ /* block inclusion of winsock.h header file */
183
+ #include <windows.h>
184
+ #undef _WINSOCKAPI_ /* undefine it for MINGW winsock2.h header file */
185
+ #elif defined(__OS2__)
186
+ #define INCL_DOSSEMAPHORES
187
+ #define INCL_DOSPROCESS
188
+ #include <os2.h>
189
+ #include <process.h>
190
+ #else
191
+ #ifndef WOLFSSL_USER_MUTEX
192
+ #define WOLFSSL_PTHREADS
193
+ #endif
194
+ #if defined(WOLFSSL_PTHREADS)
195
+ #include <pthread.h>
196
+ #endif
197
+ #endif
198
+ #endif
199
+ #elif defined(USE_WINDOWS_API)
200
+ #if defined(WOLFSSL_PTHREADS)
201
+ #include <pthread.h>
202
+ #endif
203
+ #ifdef WOLFSSL_GAME_BUILD
204
+ #include "system/xtl.h"
205
+ #else
206
+ #ifndef WIN32_LEAN_AND_MEAN
207
+ #define WIN32_LEAN_AND_MEAN
208
+ #endif
209
+ #if !defined(WOLFSSL_SGX) && !defined(WOLFSSL_NOT_WINDOWS_API)
210
+ #define _WINSOCKAPI_ /* block inclusion of winsock.h header file. */
211
+ #include <windows.h>
212
+ #undef _WINSOCKAPI_ /* undefine it for MINGW winsock2.h header */
213
+ #ifndef WOLFSSL_USER_IO
214
+ #include <winsock2.h>
215
+ #include <ws2tcpip.h> /* required for InetPton */
216
+ #endif
217
+ #endif /* WOLFSSL_SGX */
218
+ #endif
219
+ #if !defined(SINGLE_THREADED) && !defined(_WIN32_WCE)
220
+ #include <process.h>
221
+ #endif
222
+ #elif defined(THREADX)
223
+ #ifndef SINGLE_THREADED
224
+ #ifdef NEED_THREADX_TYPES
225
+ #include <types.h>
226
+ #endif
227
+ #include <tx_api.h>
228
+ #endif
229
+ #elif defined(WOLFSSL_DEOS)
230
+ #include "mutexapi.h"
231
+ #elif defined(MICRIUM)
232
+ /* do nothing, just don't pick Unix */
233
+ #elif defined(FREERTOS) || defined(FREERTOS_TCP) || defined(WOLFSSL_SAFERTOS)
234
+ /* do nothing */
235
+ #elif defined(RTTHREAD)
236
+ /* do nothing */
237
+ #elif defined(EBSNET)
238
+ /* do nothing */
239
+ #elif defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
240
+ /* do nothing */
241
+ #elif defined(FREESCALE_FREE_RTOS)
242
+ #include "fsl_os_abstraction.h"
243
+ #elif defined(WOLFSSL_VXWORKS)
244
+ #include <semLib.h>
245
+ #ifdef WOLFSSL_VXWORKS_6_x
246
+ #ifndef SEM_ID_NULL
247
+ #define SEM_ID_NULL ((SEM_ID)NULL)
248
+ #endif
249
+ #endif
250
+ #elif defined(WOLFSSL_uITRON4)
251
+ #include "stddef.h"
252
+ #include "kernel.h"
253
+ #elif defined(WOLFSSL_uTKERNEL2)
254
+ #include "tk/tkernel.h"
255
+ #elif defined(WOLFSSL_CMSIS_RTOS)
256
+ #include "cmsis_os.h"
257
+ #elif defined(WOLFSSL_CMSIS_RTOSv2)
258
+ #include "cmsis_os2.h"
259
+ #elif defined(WOLFSSL_MDK_ARM)
260
+ #if defined(WOLFSSL_MDK5)
261
+ #include "cmsis_os.h"
262
+ #else
263
+ #include <rtl.h>
264
+ #endif
265
+ #elif defined(WOLFSSL_CMSIS_RTOS)
266
+ #include "cmsis_os.h"
267
+ #elif defined(MBED)
268
+ /* do nothing */
269
+ #elif defined(WOLFSSL_TIRTOS)
270
+ #include <ti/sysbios/BIOS.h>
271
+ #include <ti/sysbios/knl/Task.h>
272
+ #include <ti/sysbios/knl/Semaphore.h>
273
+ #elif defined(WOLFSSL_FROSTED)
274
+ #include <semaphore.h>
275
+ #elif defined(INTIME_RTOS)
276
+ #include <rt.h>
277
+ #include <io.h>
278
+ #elif defined(WOLFSSL_NUCLEUS_1_2)
279
+ /* NU_DEBUG needed struct access in nucleus_realloc */
280
+ #define NU_DEBUG
281
+ #include "plus/nucleus.h"
282
+ #include "nucleus.h"
283
+ #elif defined(WOLFSSL_APACHE_MYNEWT)
284
+ /* do nothing */
285
+ #elif defined(WOLFSSL_ZEPHYR)
286
+ #include <version.h>
287
+ #ifndef SINGLE_THREADED
288
+ #if !defined(CONFIG_PTHREAD_IPC) && !defined(CONFIG_POSIX_THREADS)
289
+ #error "Threading needs CONFIG_PTHREAD_IPC / CONFIG_POSIX_THREADS"
290
+ #endif
291
+ #ifdef max
292
+ #undef max
293
+ #endif
294
+ #if KERNEL_VERSION_NUMBER >= 0x30100
295
+ #include <zephyr/kernel.h>
296
+ #include <zephyr/posix/posix_types.h>
297
+ #include <zephyr/posix/pthread.h>
298
+ #else
299
+ #include <kernel.h>
300
+ #include <posix/posix_types.h>
301
+ #include <posix/pthread.h>
302
+ #endif
303
+ #define max MAX
304
+ #endif
305
+ #elif defined(WOLFSSL_TELIT_M2MB)
306
+
307
+ /* Telit SDK uses C++ compile option (--cpp), which causes link issue
308
+ to API's if wrapped in extern "C" */
309
+ #ifdef __cplusplus
310
+ } /* extern "C" */
311
+ #endif
312
+
313
+ #include "m2mb_types.h"
314
+ #include "m2mb_os_types.h"
315
+ #include "m2mb_os_api.h"
316
+ #include "m2mb_os.h"
317
+ #include "m2mb_os_mtx.h"
318
+ #ifndef NO_ASN_TIME
319
+ #include "m2mb_rtc.h"
320
+ #endif
321
+ #ifndef NO_FILESYSTEM
322
+ #include "m2mb_fs_posix.h"
323
+ #endif
324
+
325
+ #undef kB /* eliminate conflict in asn.h */
326
+
327
+ #ifdef __cplusplus
328
+ extern "C" {
329
+ #endif
330
+ #elif defined(WOLFSSL_EMBOS)
331
+ /* do nothing */
332
+ #else
333
+ #ifndef SINGLE_THREADED
334
+ #ifndef WOLFSSL_USER_MUTEX
335
+ #if defined(WOLFSSL_LINUXKM)
336
+ /* definitions are in linuxkm/linuxkm_wc_port.h */
337
+ #elif defined(WOLFSSL_BSDKM)
338
+ /* definitions are in bsdkm/bsdkm_wc_port.h */
339
+ #else
340
+ #define WOLFSSL_PTHREADS
341
+ #include <pthread.h>
342
+ #endif
343
+ #endif
344
+ #endif
345
+ #if (defined(OPENSSL_EXTRA) || defined(GOAHEAD_WS)) && \
346
+ !defined(NO_FILESYSTEM)
347
+ #ifdef FUSION_RTOS
348
+ #include <fclunistd.h>
349
+ #else
350
+ #include <unistd.h> /* for close of BIO */
351
+ #endif
352
+ #endif
353
+ #endif
354
+
355
+ #ifdef WOLFSSL_API_PREFIX_MAP
356
+ #define InitMutex wc_InitMutex
357
+ #define FreeMutex wc_FreeMutex
358
+ #define LockMutex wc_LockMutex
359
+ #define UnLockMutex wc_UnLockMutex
360
+ #elif defined(HAVE_FIPS)
361
+ /* For FIPS keep the function names the same */
362
+ #define wc_InitMutex InitMutex
363
+ #define wc_FreeMutex FreeMutex
364
+ #define wc_LockMutex LockMutex
365
+ #define wc_UnLockMutex UnLockMutex
366
+ #endif /* HAVE_FIPS */
367
+
368
+ #ifdef SINGLE_THREADED
369
+ typedef int wolfSSL_Mutex;
370
+ #else /* MULTI_THREADED */
371
+ /* FREERTOS comes first to enable use of FreeRTOS Windows simulator only */
372
+ #if defined(FREERTOS)
373
+ #if defined(ESP_IDF_VERSION_MAJOR) && (ESP_IDF_VERSION_MAJOR >= 4)
374
+ typedef SemaphoreHandle_t wolfSSL_Mutex;
375
+ #else
376
+ typedef xSemaphoreHandle wolfSSL_Mutex;
377
+ #endif
378
+ #elif defined(FREERTOS_TCP)
379
+ #include "FreeRTOS.h"
380
+ #include "semphr.h"
381
+ typedef SemaphoreHandle_t wolfSSL_Mutex;
382
+ #elif defined (RTTHREAD)
383
+ #include "rtthread.h"
384
+ typedef rt_mutex_t wolfSSL_Mutex;
385
+ #elif defined(WOLFSSL_SAFERTOS)
386
+ typedef struct wolfSSL_Mutex {
387
+ signed char mutexBuffer[portQUEUE_OVERHEAD_BYTES];
388
+ xSemaphoreHandle mutex;
389
+ } wolfSSL_Mutex;
390
+ #elif defined(USE_WINDOWS_API) && !defined(WOLFSSL_PTHREADS)
391
+ typedef CRITICAL_SECTION wolfSSL_Mutex;
392
+ #elif defined(MAXQ10XX_MUTEX)
393
+ #include <sys/mman.h>
394
+ #include <fcntl.h>
395
+ #include <pthread.h>
396
+ typedef pthread_mutex_t wolfSSL_Mutex;
397
+ int maxq_CryptHwMutexTryLock(void);
398
+ #elif defined(WOLFSSL_PTHREADS)
399
+ #ifdef WOLFSSL_USE_RWLOCK
400
+ typedef pthread_rwlock_t wolfSSL_RwLock;
401
+ #endif
402
+ typedef pthread_mutex_t wolfSSL_Mutex;
403
+ #define WOLFSSL_MUTEX_INITIALIZER(lockname) PTHREAD_MUTEX_INITIALIZER
404
+ #elif defined(THREADX)
405
+ typedef TX_MUTEX wolfSSL_Mutex;
406
+ #elif defined(WOLFSSL_DEOS)
407
+ typedef mutex_handle_t wolfSSL_Mutex;
408
+ #elif defined(MICRIUM)
409
+ typedef OS_MUTEX wolfSSL_Mutex;
410
+ #elif defined(EBSNET)
411
+ #if (defined(RTPLATFORM) && (RTPLATFORM != 0))
412
+ typedef RTP_MUTEX wolfSSL_Mutex;
413
+ #else
414
+ typedef KS_RTIPSEM wolfSSL_Mutex;
415
+ #endif
416
+ #elif defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
417
+ typedef MUTEX_STRUCT wolfSSL_Mutex;
418
+ #elif defined(FREESCALE_FREE_RTOS)
419
+ typedef mutex_t wolfSSL_Mutex;
420
+ #elif defined(WOLFSSL_VXWORKS)
421
+ typedef SEM_ID wolfSSL_Mutex;
422
+ #elif defined(WOLFSSL_uITRON4)
423
+ typedef struct wolfSSL_Mutex {
424
+ T_CSEM sem ;
425
+ ID id ;
426
+ } wolfSSL_Mutex;
427
+ #elif defined(WOLFSSL_uTKERNEL2)
428
+ typedef struct wolfSSL_Mutex {
429
+ T_CSEM sem ;
430
+ ID id ;
431
+ } wolfSSL_Mutex;
432
+ #elif defined(WOLFSSL_MDK_ARM)
433
+ #if defined(WOLFSSL_CMSIS_RTOS)
434
+ typedef osMutexId wolfSSL_Mutex;
435
+ #else
436
+ typedef OS_MUT wolfSSL_Mutex;
437
+ #endif
438
+ #elif defined(WOLFSSL_CMSIS_RTOS)
439
+ typedef osMutexId wolfSSL_Mutex;
440
+ #elif defined(WOLFSSL_CMSIS_RTOSv2)
441
+ typedef osMutexId_t wolfSSL_Mutex;
442
+ #elif defined(WOLFSSL_TIRTOS)
443
+ typedef ti_sysbios_knl_Semaphore_Handle wolfSSL_Mutex;
444
+ #elif defined(WOLFSSL_FROSTED)
445
+ typedef mutex_t * wolfSSL_Mutex;
446
+ #elif defined(INTIME_RTOS)
447
+ typedef RTHANDLE wolfSSL_Mutex;
448
+ #elif defined(WOLFSSL_NUCLEUS_1_2)
449
+ typedef NU_SEMAPHORE wolfSSL_Mutex;
450
+ #elif defined(WOLFSSL_ZEPHYR)
451
+ typedef struct k_mutex wolfSSL_Mutex;
452
+ #elif defined(WOLFSSL_TELIT_M2MB)
453
+ typedef M2MB_OS_MTX_HANDLE wolfSSL_Mutex;
454
+ #elif defined(WOLFSSL_EMBOS)
455
+ typedef OS_MUTEX wolfSSL_Mutex;
456
+ #elif defined(WOLFSSL_USER_MUTEX)
457
+ /* typedef User_Mutex wolfSSL_Mutex; */
458
+ #elif defined(WOLFSSL_LINUXKM)
459
+ /* definitions are in linuxkm/linuxkm_wc_port.h */
460
+ #elif defined(WOLFSSL_BSDKM)
461
+ /* definitions are in bsdkm/bsdkm_wc_port.h */
462
+ #elif defined(__WATCOMC__)
463
+ /* OS/2 */
464
+ typedef ULONG wolfSSL_Mutex;
465
+ #else
466
+ #error Need a mutex type in multithreaded mode
467
+ #endif /* USE_WINDOWS_API */
468
+
469
+ #endif /* SINGLE_THREADED */
470
+
471
+ #ifdef WOLFSSL_TEST_NO_MUTEX_INITIALIZER
472
+ #undef WOLFSSL_MUTEX_INITIALIZER
473
+ #endif
474
+
475
+ #ifdef WOLFSSL_MUTEX_INITIALIZER
476
+ #define WOLFSSL_MUTEX_INITIALIZER_CLAUSE(lockname) = WOLFSSL_MUTEX_INITIALIZER(lockname)
477
+ #else
478
+ #define WOLFSSL_MUTEX_INITIALIZER_CLAUSE(lockname) /* null expansion */
479
+ #endif
480
+
481
+ #if !defined(WOLFSSL_USE_RWLOCK) || defined(SINGLE_THREADED) || \
482
+ (defined(WC_MUTEX_OPS_INLINE) && !defined(WC_RWLOCK_OPS_INLINE))
483
+ typedef wolfSSL_Mutex wolfSSL_RwLock;
484
+ #endif
485
+
486
+ #ifndef WOLFSSL_NO_ATOMICS
487
+ #if defined(WOLFSSL_USER_DEFINED_ATOMICS)
488
+ /* user-supplied bindings for wolfSSL_Atomic_Int etc. */
489
+ #if !defined(WOLFSSL_ATOMIC_INITIALIZER) || \
490
+ !defined(WOLFSSL_ATOMIC_LOAD) || \
491
+ !defined(WOLFSSL_ATOMIC_STORE)
492
+ #error WOLFSSL_USER_DEFINED_ATOMICS is set but macro(s) are missing.
493
+ #else
494
+ #define WOLFSSL_ATOMIC_OPS
495
+ #endif
496
+ #elif defined(SINGLE_THREADED)
497
+ typedef int wolfSSL_Atomic_Int;
498
+ typedef unsigned int wolfSSL_Atomic_Uint;
499
+ #define WOLFSSL_ATOMIC_INITIALIZER(x) (x)
500
+ #define WOLFSSL_ATOMIC_LOAD(x) (x)
501
+ #define WOLFSSL_ATOMIC_STORE(x, val) (x) = (val)
502
+ #define WOLFSSL_ATOMIC_OPS
503
+ #elif defined(WOLFSSL_BSDKM)
504
+ /* Note: <stdatomic.h> can be safely included in both linux kernel and
505
+ * userspace builds. In FreeBSD kernel however it does nothing and
506
+ * should not be included. Use FreeBSD <machine/atomic.h> instead.
507
+ * definitions are in bsdkm/bsdkm_wc_port.h */
508
+ #elif defined(HAVE_C___ATOMIC) && defined(WOLFSSL_HAVE_ATOMIC_H) && \
509
+ !defined(__cplusplus)
510
+ /* Default C Implementation */
511
+ #include <stdatomic.h>
512
+ typedef atomic_int wolfSSL_Atomic_Int;
513
+ typedef atomic_uint wolfSSL_Atomic_Uint;
514
+ #define WOLFSSL_ATOMIC_INITIALIZER(x) (x)
515
+ #define WOLFSSL_ATOMIC_LOAD(x) atomic_load(&(x))
516
+ #define WOLFSSL_ATOMIC_STORE(x, val) atomic_store(&(x), val)
517
+ #define WOLFSSL_ATOMIC_OPS
518
+ #elif defined(__GNUC__) && defined(__ATOMIC_CONSUME)
519
+ /* direct calls using gcc-style compiler built-ins */
520
+ typedef volatile int wolfSSL_Atomic_Int;
521
+ typedef volatile unsigned int wolfSSL_Atomic_Uint;
522
+ #define WOLFSSL_ATOMIC_INITIALIZER(x) (x)
523
+ #define WOLFSSL_ATOMIC_LOAD(x) __atomic_load_n(&(x), \
524
+ __ATOMIC_CONSUME)
525
+ #define WOLFSSL_ATOMIC_STORE(x, val) __atomic_store_n(&(x), \
526
+ val, __ATOMIC_RELEASE)
527
+ #define WOLFSSL_ATOMIC_OPS
528
+ #elif defined(_MSC_VER) && !defined(WOLFSSL_NOT_WINDOWS_API)
529
+ /* Use MSVC compiler intrinsics for atomic ops */
530
+ #ifdef _WIN32_WCE
531
+ #include <armintr.h>
532
+ #else
533
+ #include <intrin.h>
534
+ #endif
535
+ typedef volatile long wolfSSL_Atomic_Int;
536
+ typedef volatile unsigned long wolfSSL_Atomic_Uint;
537
+ #define WOLFSSL_ATOMIC_INITIALIZER(x) (x)
538
+ #define WOLFSSL_ATOMIC_LOAD(x) (x)
539
+ #define WOLFSSL_ATOMIC_STORE(x, val) (x) = (val)
540
+ #define WOLFSSL_ATOMIC_OPS
541
+ #endif
542
+
543
+ /* If we weren't able to implement atomics above, disable them here. */
544
+ #ifndef WOLFSSL_ATOMIC_OPS
545
+ #define WOLFSSL_NO_ATOMICS
546
+ #endif
547
+ #endif /* !WOLFSSL_NO_ATOMICS */
548
+
549
+ #ifdef WOLFSSL_NO_ATOMICS
550
+ #define WOLFSSL_ATOMIC_INITIALIZER(x) (x)
551
+ #define WOLFSSL_ATOMIC_LOAD(x) (x)
552
+ #define WOLFSSL_ATOMIC_STORE(x, val) (x) = (val)
553
+ #endif /* WOLFSSL_NO_ATOMICS */
554
+
555
+ /* WOLFSSL_ATOMIC_COERCE_INT() needs to accept either a regular int or an
556
+ * wolfSSL_Atomic_Int as its argument, and evaluate to a regular int.
557
+ * Allows a user-supplied override definition with type introspection.
558
+ */
559
+ #ifndef WOLFSSL_ATOMIC_COERCE_INT
560
+ #define WOLFSSL_ATOMIC_COERCE_INT(x) ((int)(x))
561
+ #endif
562
+ #ifndef WOLFSSL_ATOMIC_COERCE_UINT
563
+ #define WOLFSSL_ATOMIC_COERCE_UINT(x) ((unsigned int)(x))
564
+ #endif
565
+
566
+ #ifdef WOLFSSL_USER_DEFINED_ATOMICS
567
+ /* user-supplied bindings for wolfSSL_Atomic_Int_Init(),
568
+ * wolfSSL_Atomic_Int_FetchAdd(), etc.
569
+ */
570
+ #elif defined(WOLFSSL_ATOMIC_OPS) && !defined(SINGLE_THREADED)
571
+ WOLFSSL_API void wolfSSL_Atomic_Int_Init(wolfSSL_Atomic_Int* c, int i);
572
+ WOLFSSL_API void wolfSSL_Atomic_Uint_Init(
573
+ wolfSSL_Atomic_Uint* c, unsigned int i);
574
+ /* FetchOp functions return the value of the counter immediately preceding
575
+ * the effects of the operation.
576
+ * OpFetch functions return the value of the counter immediately after
577
+ * the effects of the operation.
578
+ */
579
+ WOLFSSL_API int wolfSSL_Atomic_Int_FetchAdd(wolfSSL_Atomic_Int* c, int i);
580
+ WOLFSSL_API int wolfSSL_Atomic_Int_FetchSub(wolfSSL_Atomic_Int* c, int i);
581
+ WOLFSSL_API int wolfSSL_Atomic_Int_AddFetch(wolfSSL_Atomic_Int* c, int i);
582
+ WOLFSSL_API int wolfSSL_Atomic_Int_SubFetch(wolfSSL_Atomic_Int* c, int i);
583
+ WOLFSSL_API int wolfSSL_Atomic_Int_CompareExchange(
584
+ wolfSSL_Atomic_Int* c, int *expected_i, int new_i);
585
+ WOLFSSL_API unsigned int wolfSSL_Atomic_Uint_FetchAdd(
586
+ wolfSSL_Atomic_Uint* c, unsigned int i);
587
+ WOLFSSL_API unsigned int wolfSSL_Atomic_Uint_FetchSub(
588
+ wolfSSL_Atomic_Uint* c, unsigned int i);
589
+ WOLFSSL_API unsigned int wolfSSL_Atomic_Uint_AddFetch(
590
+ wolfSSL_Atomic_Uint* c, unsigned int i);
591
+ WOLFSSL_API unsigned int wolfSSL_Atomic_Uint_SubFetch(
592
+ wolfSSL_Atomic_Uint* c, unsigned int i);
593
+ WOLFSSL_API int wolfSSL_Atomic_Uint_CompareExchange(
594
+ wolfSSL_Atomic_Uint* c, unsigned int *expected_i, unsigned int new_i);
595
+ WOLFSSL_API int wolfSSL_Atomic_Ptr_CompareExchange(
596
+ void** c, void **expected_ptr, void *new_ptr);
597
+ #else
598
+ /* Code using these fallback implementations in non-SINGLE_THREADED builds
599
+ * needs to arrange its own explicit fallback to int for wolfSSL_Atomic_Int
600
+ * and unsigned int for wolfSSL_Atomic_Uint, which is not defined if
601
+ * !defined(WOLFSSL_ATOMIC_OPS) && !defined(SINGLE_THREADED). This forces
602
+ * local awareness of thread-unsafe semantics.
603
+ */
604
+ #define wolfSSL_Atomic_Int_Init(c, i) (*(c) = (i))
605
+ #define wolfSSL_Atomic_Uint_Init(c, i) (*(c) = (i))
606
+ static WC_INLINE int wolfSSL_Atomic_Int_FetchAdd(int *c, int i) {
607
+ int ret = *c;
608
+ *c += i;
609
+ return ret;
610
+ }
611
+ static WC_INLINE int wolfSSL_Atomic_Int_FetchSub(int *c, int i) {
612
+ int ret = *c;
613
+ *c -= i;
614
+ return ret;
615
+ }
616
+ static WC_INLINE int wolfSSL_Atomic_Int_AddFetch(int *c, int i) {
617
+ return (*c += i);
618
+ }
619
+ static WC_INLINE int wolfSSL_Atomic_Int_SubFetch(int *c, int i) {
620
+ return (*c -= i);
621
+ }
622
+ static WC_INLINE int wolfSSL_Atomic_Int_CompareExchange(
623
+ int *c, int *expected_i, int new_i)
624
+ {
625
+ if (*c == *expected_i) {
626
+ *c = new_i;
627
+ return 1;
628
+ }
629
+ else {
630
+ *expected_i = *c;
631
+ return 0;
632
+ }
633
+ }
634
+ static WC_INLINE int wolfSSL_Atomic_Ptr_CompareExchange(
635
+ void **c, void *expected_ptr, void *new_ptr)
636
+ {
637
+ if (*(char **)c == *(char **)expected_ptr) {
638
+ *(char **)c = (char *)new_ptr;
639
+ return 1;
640
+ }
641
+ else {
642
+ *(char **)expected_ptr = *(char **)c;
643
+ return 0;
644
+ }
645
+ }
646
+ static WC_INLINE unsigned int wolfSSL_Atomic_Uint_FetchAdd(
647
+ unsigned int *c, unsigned int i)
648
+ {
649
+ unsigned int ret = *c;
650
+ *c += i;
651
+ return ret;
652
+ }
653
+ static WC_INLINE unsigned int wolfSSL_Atomic_Uint_FetchSub(
654
+ unsigned int *c, unsigned int i)
655
+ {
656
+ unsigned int ret = *c;
657
+ *c -= i;
658
+ return ret;
659
+ }
660
+ static WC_INLINE unsigned int wolfSSL_Atomic_Uint_AddFetch(
661
+ unsigned int *c, unsigned int i)
662
+ {
663
+ return (*c += i);
664
+ }
665
+ static WC_INLINE unsigned int wolfSSL_Atomic_Uint_SubFetch(
666
+ unsigned int *c, unsigned int i)
667
+ {
668
+ return (*c -= i);
669
+ }
670
+ static WC_INLINE int wolfSSL_Atomic_Uint_CompareExchange(
671
+ unsigned int *c, unsigned int *expected_i, unsigned int new_i)
672
+ {
673
+ if (*c == *expected_i) {
674
+ *c = new_i;
675
+ return 1;
676
+ }
677
+ else {
678
+ *expected_i = *c;
679
+ return 0;
680
+ }
681
+ }
682
+ #endif
683
+
684
+ /* Reference counting. */
685
+ typedef struct wolfSSL_RefWithMutex {
686
+ #if !defined(SINGLE_THREADED)
687
+ wolfSSL_Mutex mutex;
688
+ #endif
689
+ int count;
690
+ } wolfSSL_RefWithMutex;
691
+
692
+ #if defined(WOLFSSL_ATOMIC_OPS) && !defined(SINGLE_THREADED)
693
+ typedef struct wolfSSL_Ref {
694
+ wolfSSL_Atomic_Int count;
695
+ } wolfSSL_Ref;
696
+ #else
697
+ typedef struct wolfSSL_RefWithMutex wolfSSL_Ref;
698
+ #endif
699
+
700
+ #if defined(SINGLE_THREADED) || defined(WOLFSSL_ATOMIC_OPS)
701
+
702
+ #define wolfSSL_RefInit(ref, err) \
703
+ do { \
704
+ wolfSSL_Atomic_Int_Init(&(ref)->count, 1); \
705
+ *(err) = 0; \
706
+ } while(0)
707
+ #define wolfSSL_RefFree(ref) WC_DO_NOTHING
708
+ #define wolfSSL_RefInc(ref, err) \
709
+ do { \
710
+ (void)wolfSSL_Atomic_Int_FetchAdd(&(ref)->count, 1); \
711
+ *(err) = 0; \
712
+ } while(0)
713
+ #define wolfSSL_RefDec(ref, isZero, err) \
714
+ do { \
715
+ int __prev = wolfSSL_Atomic_Int_FetchSub(&(ref)->count, 1); \
716
+ /* __prev holds the value of count before subtracting 1 */ \
717
+ *(isZero) = (__prev == 1); \
718
+ *(err) = 0; \
719
+ } while(0)
720
+
721
+ #else
722
+
723
+ #define WOLFSSL_REFCNT_ERROR_RETURN
724
+
725
+ #define wolfSSL_RefInit wolfSSL_RefWithMutexInit
726
+ #define wolfSSL_RefFree wolfSSL_RefWithMutexFree
727
+ #define wolfSSL_RefInc wolfSSL_RefWithMutexInc
728
+ #define wolfSSL_RefDec wolfSSL_RefWithMutexDec
729
+
730
+ #endif
731
+
732
+ #if defined(SINGLE_THREADED)
733
+
734
+ #define wolfSSL_RefWithMutexInit wolfSSL_RefInit
735
+ #define wolfSSL_RefWithMutexFree wolfSSL_RefFree
736
+ #define wolfSSL_RefWithMutexInc wolfSSL_RefInc
737
+ #define wolfSSL_RefWithMutexLock(ref) 0
738
+ #define wolfSSL_RefWithMutexUnlock(ref) 0
739
+ #define wolfSSL_RefWithMutexDec wolfSSL_RefDec
740
+
741
+ #else
742
+
743
+ WOLFSSL_LOCAL void wolfSSL_RefWithMutexInit(wolfSSL_RefWithMutex* ref,
744
+ int* err);
745
+ WOLFSSL_LOCAL void wolfSSL_RefWithMutexFree(wolfSSL_RefWithMutex* ref);
746
+ WOLFSSL_LOCAL void wolfSSL_RefWithMutexInc(wolfSSL_RefWithMutex* ref,
747
+ int* err);
748
+ WOLFSSL_LOCAL int wolfSSL_RefWithMutexLock(wolfSSL_RefWithMutex* ref);
749
+ WOLFSSL_LOCAL int wolfSSL_RefWithMutexUnlock(wolfSSL_RefWithMutex* ref);
750
+ WOLFSSL_LOCAL void wolfSSL_RefWithMutexDec(wolfSSL_RefWithMutex* ref,
751
+ int* isZero, int* err);
752
+
753
+ #endif
754
+
755
+
756
+ /* Enable crypt HW mutex for Freescale MMCAU, PIC32MZ or STM32 */
757
+ #if defined(FREESCALE_MMCAU) || defined(WOLFSSL_MICROCHIP_PIC32MZ) || \
758
+ defined(STM32_CRYPTO) || defined(STM32_HASH) || defined(STM32_RNG) || \
759
+ defined(WOLFSSL_MAX3266X) || defined(WOLFSSL_MAX3266X_OLD)
760
+ #ifndef WOLFSSL_CRYPT_HW_MUTEX
761
+ #define WOLFSSL_CRYPT_HW_MUTEX 1
762
+ #endif
763
+ #endif /* FREESCALE_MMCAU */
764
+
765
+ #ifndef WOLFSSL_CRYPT_HW_MUTEX
766
+ #define WOLFSSL_CRYPT_HW_MUTEX 0
767
+ #endif
768
+
769
+ #if WOLFSSL_CRYPT_HW_MUTEX
770
+ /* wolfSSL_CryptHwMutexInit is called on first wolfSSL_CryptHwMutexLock,
771
+ however it's recommended to call this directly on Hw init to avoid possible
772
+ race condition where two calls to wolfSSL_CryptHwMutexLock are made at
773
+ the same time. */
774
+ WOLFSSL_LOCAL int wolfSSL_CryptHwMutexInit(void);
775
+ WOLFSSL_LOCAL int wolfSSL_CryptHwMutexLock(void);
776
+ WOLFSSL_LOCAL int wolfSSL_CryptHwMutexUnLock(void);
777
+ #else
778
+ /* Define stubs, since HW mutex is disabled */
779
+ #define wolfSSL_CryptHwMutexInit() 0 /* Success */
780
+ #define wolfSSL_CryptHwMutexLock() 0 /* Success */
781
+ #define wolfSSL_CryptHwMutexUnLock() (void)0 /* Success */
782
+ #endif /* WOLFSSL_CRYPT_HW_MUTEX */
783
+
784
+ #if defined(WOLFSSL_ALGO_HW_MUTEX) && (defined(NO_RNG_MUTEX) && \
785
+ defined(NO_AES_MUTEX) && defined(NO_HASH_MUTEX) && defined(NO_PK_MUTEX))
786
+ #error WOLFSSL_ALGO_HW_MUTEX does not support having all mutexes off
787
+ #endif
788
+ /* To support HW that can do different Crypto in parallel */
789
+ #if WOLFSSL_CRYPT_HW_MUTEX && defined(WOLFSSL_ALGO_HW_MUTEX)
790
+ typedef enum {
791
+ #ifndef NO_RNG_MUTEX
792
+ rng_mutex,
793
+ #endif
794
+ #ifndef NO_AES_MUTEX
795
+ aes_mutex,
796
+ #endif
797
+ #ifndef NO_HASH_MUTEX
798
+ hash_mutex,
799
+ #endif
800
+ #ifndef NO_PK_MUTEX
801
+ pk_mutex,
802
+ #endif
803
+ } hw_mutex_algo;
804
+ #endif
805
+
806
+ /* If algo mutex is off, or WOLFSSL_ALGO_HW_MUTEX is not define, default */
807
+ /* to using the generic wolfSSL_CryptHwMutex */
808
+ #if (!defined(NO_RNG_MUTEX) && defined(WOLFSSL_ALGO_HW_MUTEX)) && \
809
+ WOLFSSL_CRYPT_HW_MUTEX
810
+ WOLFSSL_LOCAL int wolfSSL_HwRngMutexInit(void);
811
+ WOLFSSL_LOCAL int wolfSSL_HwRngMutexLock(void);
812
+ WOLFSSL_LOCAL int wolfSSL_HwRngMutexUnLock(void);
813
+ #else
814
+ #define wolfSSL_HwRngMutexInit wolfSSL_CryptHwMutexInit
815
+ #define wolfSSL_HwRngMutexLock wolfSSL_CryptHwMutexLock
816
+ #define wolfSSL_HwRngMutexUnLock wolfSSL_CryptHwMutexUnLock
817
+ #endif /* !defined(NO_RNG_MUTEX) && defined(WOLFSSL_ALGO_HW_MUTEX) */
818
+
819
+ #if (!defined(NO_AES_MUTEX) && defined(WOLFSSL_ALGO_HW_MUTEX)) && \
820
+ WOLFSSL_CRYPT_HW_MUTEX
821
+ WOLFSSL_LOCAL int wolfSSL_HwAesMutexInit(void);
822
+ WOLFSSL_LOCAL int wolfSSL_HwAesMutexLock(void);
823
+ WOLFSSL_LOCAL int wolfSSL_HwAesMutexUnLock(void);
824
+ #else
825
+ #define wolfSSL_HwAesMutexInit wolfSSL_CryptHwMutexInit
826
+ #define wolfSSL_HwAesMutexLock wolfSSL_CryptHwMutexLock
827
+ #define wolfSSL_HwAesMutexUnLock wolfSSL_CryptHwMutexUnLock
828
+ #endif /* !defined(NO_AES_MUTEX) && defined(WOLFSSL_ALGO_HW_MUTEX) */
829
+
830
+ #if (!defined(NO_HASH_MUTEX) && defined(WOLFSSL_ALGO_HW_MUTEX)) && \
831
+ WOLFSSL_CRYPT_HW_MUTEX
832
+ WOLFSSL_LOCAL int wolfSSL_HwHashMutexInit(void);
833
+ WOLFSSL_LOCAL int wolfSSL_HwHashMutexLock(void);
834
+ WOLFSSL_LOCAL int wolfSSL_HwHashMutexUnLock(void);
835
+ #else
836
+ #define wolfSSL_HwHashMutexInit wolfSSL_CryptHwMutexInit
837
+ #define wolfSSL_HwHashMutexLock wolfSSL_CryptHwMutexLock
838
+ #define wolfSSL_HwHashMutexUnLock wolfSSL_CryptHwMutexUnLock
839
+ #endif /* !defined(NO_HASH_MUTEX) && defined(WOLFSSL_ALGO_HW_MUTEX) */
840
+
841
+ #if (!defined(NO_PK_MUTEX) && defined(WOLFSSL_ALGO_HW_MUTEX)) && \
842
+ WOLFSSL_CRYPT_HW_MUTEX
843
+ WOLFSSL_LOCAL int wolfSSL_HwPkMutexInit(void);
844
+ WOLFSSL_LOCAL int wolfSSL_HwPkMutexLock(void);
845
+ WOLFSSL_LOCAL int wolfSSL_HwPkMutexUnLock(void);
846
+ #else
847
+ #define wolfSSL_HwPkMutexInit wolfSSL_CryptHwMutexInit
848
+ #define wolfSSL_HwPkMutexLock wolfSSL_CryptHwMutexLock
849
+ #define wolfSSL_HwPkMutexUnLock wolfSSL_CryptHwMutexUnLock
850
+ #endif /* !defined(NO_PK_MUTEX) && defined(WOLFSSL_ALGO_HW_MUTEX) */
851
+
852
+ /* Mutex functions */
853
+ #ifndef WC_MUTEX_OPS_INLINE
854
+ WOLFSSL_API int wc_InitMutex(wolfSSL_Mutex* m);
855
+ WOLFSSL_API int wc_FreeMutex(wolfSSL_Mutex* m);
856
+ WOLFSSL_API int wc_LockMutex(wolfSSL_Mutex* m);
857
+ WOLFSSL_API int wc_UnLockMutex(wolfSSL_Mutex* m);
858
+ #endif
859
+ WOLFSSL_API wolfSSL_Mutex* wc_InitAndAllocMutex(void);
860
+ #ifndef WC_RWLOCK_OPS_INLINE
861
+ /* RwLock functions. Fallback to Mutex when not implemented explicitly. */
862
+ WOLFSSL_API int wc_InitRwLock(wolfSSL_RwLock* m);
863
+ WOLFSSL_API int wc_FreeRwLock(wolfSSL_RwLock* m);
864
+ WOLFSSL_API int wc_LockRwLock_Wr(wolfSSL_RwLock* m);
865
+ WOLFSSL_API int wc_LockRwLock_Rd(wolfSSL_RwLock* m);
866
+ WOLFSSL_API int wc_UnLockRwLock(wolfSSL_RwLock* m);
867
+ #endif
868
+ #if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER)
869
+ /* dynamically set which mutex to use. unlock / lock is controlled by flag */
870
+ typedef void (mutex_cb)(int flag, int type, const char* file, int line);
871
+
872
+ WOLFSSL_API int wc_LockMutex_ex(int flag, int type, const char* file, int line);
873
+ WOLFSSL_API int wc_SetMutexCb(mutex_cb* cb);
874
+ WOLFSSL_API mutex_cb* wc_GetMutexCb(void);
875
+ #endif
876
+
877
+ /* main crypto initialization function */
878
+ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Init(void);
879
+ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
880
+
881
+ #ifdef WOLFSSL_TRACK_MEMORY_VERBOSE
882
+ WOLFSSL_API long wolfCrypt_heap_peakAllocs_checkpoint(void);
883
+ WOLFSSL_API long wolfCrypt_heap_peakBytes_checkpoint(void);
884
+ #endif
885
+
886
+
887
+ /* FILESYSTEM SECTION */
888
+ /* filesystem abstraction layer, used by ssl.c */
889
+ #ifndef NO_FILESYSTEM
890
+
891
+ #if defined(EBSNET)
892
+ #include "vfapi.h"
893
+ #include "vfile.h"
894
+
895
+ int ebsnet_fseek(int a, long b, int c); /* Not prototyped in vfile.h per
896
+ * EBSnet feedback */
897
+
898
+ #define XFILE int
899
+ #define XFOPEN(NAME, MODE) vf_open((const char *)NAME, VO_RDONLY, 0)
900
+ #define XFSEEK ebsnet_fseek
901
+ #define XFTELL vf_tell
902
+ #define XFREAD(BUF, SZ, AMT, FD) vf_read(FD, BUF, SZ*AMT)
903
+ #define XFWRITE(BUF, SZ, AMT, FD) vf_write(FD, BUF, SZ*AMT)
904
+ #define XFCLOSE vf_close
905
+ #define XSEEK_SET VSEEK_SET
906
+ #define XSEEK_END VSEEK_END
907
+ #define XBADFILE -1
908
+ #define XFGETS(b,s,f) -2 /* Not ported yet */
909
+ #define XSNPRINTF rtp_snprintf
910
+ #define XFPRINTF fprintf
911
+
912
+ #elif defined(LSR_FS)
913
+ #include <fs.h>
914
+ #define XFILE struct fs_file*
915
+ #define XFOPEN(NAME, MODE) fs_open((char*)NAME)
916
+ #define XFSEEK(F, O, W) (void)F
917
+ #define XFTELL(F) (F)->len
918
+ #define XFREAD(BUF, SZ, AMT, F) fs_read(F, (char*)BUF, SZ*AMT)
919
+ #define XFWRITE(BUF, SZ, AMT, F) fs_write(F, (char*)BUF, SZ*AMT)
920
+ #define XFCLOSE fs_close
921
+ #define XSEEK_SET 0
922
+ #define XSEEK_END 0
923
+ #define XBADFILE NULL
924
+ #define XFGETS(b,s,f) -2 /* Not ported yet */
925
+
926
+ #elif defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
927
+ #define XFILE MQX_FILE_PTR
928
+ #define XFOPEN fopen
929
+ #define XFSEEK fseek
930
+ #define XFTELL ftell
931
+ #define XFREAD fread
932
+ #define XFWRITE fwrite
933
+ #define XFCLOSE fclose
934
+ #define XSEEK_SET IO_SEEK_SET
935
+ #define XSEEK_END IO_SEEK_END
936
+ #define XBADFILE NULL
937
+ #define XFGETS fgets
938
+
939
+ #elif defined(WOLFSSL_DEOS)
940
+ #define NO_FILESYSTEM
941
+ #warning "TODO - DDC-I Certifiable Fast File System for Deos is not integrated"
942
+ #elif defined(MICRIUM)
943
+ #include <fs_api.h>
944
+ #define XFILE FS_FILE*
945
+ #define XFOPEN fs_fopen
946
+ #define XFSEEK fs_fseek
947
+ #define XFTELL fs_ftell
948
+ #define XFREAD fs_fread
949
+ #define XFWRITE fs_fwrite
950
+ #define XFCLOSE fs_fclose
951
+ #define XSEEK_SET FS_SEEK_SET
952
+ #define XSEEK_END FS_SEEK_END
953
+ #define XBADFILE NULL
954
+ #define XFGETS(b,s,f) -2 /* Not ported yet */
955
+
956
+ #elif defined(WOLFSSL_NUCLEUS_1_2)
957
+ #include "fal/inc/fal.h"
958
+ #define XFILE FILE*
959
+ #define XFOPEN fopen
960
+ #define XFSEEK fseek
961
+ #define XFTELL ftell
962
+ #define XFREAD fread
963
+ #define XFWRITE fwrite
964
+ #define XFCLOSE fclose
965
+ #define XSEEK_SET PSEEK_SET
966
+ #define XSEEK_END PSEEK_END
967
+ #define XBADFILE NULL
968
+
969
+ #elif defined(WOLFSSL_APACHE_MYNEWT)
970
+ #include <fs/fs.h>
971
+ #define XFILE struct fs_file*
972
+
973
+ #define XFOPEN mynewt_fopen
974
+ #define XFSEEK mynewt_fseek
975
+ #define XFTELL mynewt_ftell
976
+ #define XFREAD mynewt_fread
977
+ #define XFWRITE mynewt_fwrite
978
+ #define XFCLOSE mynewt_fclose
979
+ #define XSEEK_SET 0
980
+ #define XSEEK_END 2
981
+ #define XBADFILE NULL
982
+ #define XFGETS(b,s,f) -2 /* Not ported yet */
983
+
984
+ #elif defined(WOLFSSL_ZEPHYR)
985
+ #include <zephyr/fs/fs.h>
986
+
987
+ #define XFILE struct fs_file_t*
988
+
989
+ /* These are our wrappers for opening and closing files to
990
+ * make the API more POSIX like. */
991
+ XFILE z_fs_open(const char* filename, const char* mode);
992
+ int z_fs_close(XFILE file);
993
+ int z_fs_rewind(XFILE file);
994
+
995
+ #define XFOPEN z_fs_open
996
+ #define XFCLOSE z_fs_close
997
+ #define XFFLUSH fs_sync
998
+ #define XFSEEK fs_seek
999
+ #define XFTELL fs_tell
1000
+ #define XFREWIND z_fs_rewind
1001
+ #define XFREAD(P,S,N,F) fs_read(F, P, S*N)
1002
+ #define XFWRITE(P,S,N,F) fs_write(F, P, S*N)
1003
+ #define XSEEK_SET FS_SEEK_SET
1004
+ #define XSEEK_END FS_SEEK_END
1005
+ #define XBADFILE NULL
1006
+ #define XFGETS(b,s,f) -2 /* Not ported yet */
1007
+
1008
+ #define XSTAT fs_stat
1009
+ #define XSTAT_TYPE struct fs_dirent
1010
+ #define XS_ISREG(s) (s == FS_DIR_ENTRY_FILE)
1011
+ #define SEPARATOR_CHAR ':'
1012
+
1013
+ #elif defined(WOLFSSL_TELIT_M2MB)
1014
+ #define XFILE INT32
1015
+ #define XFOPEN(NAME, MODE) m2mb_fs_open((NAME), 0, (MODE))
1016
+ #define XFSEEK(F, O, W) m2mb_fs_lseek((F), (O), (W))
1017
+ #define XFTELL(F) m2mb_fs_lseek((F), 0, M2MB_SEEK_END)
1018
+ #define XFREAD(BUF, SZ, AMT, F) m2mb_fs_read((F), (BUF), (SZ)*(AMT))
1019
+ #define XFWRITE(BUF, SZ, AMT, F) m2mb_fs_write((F), (BUF), (SZ)*(AMT))
1020
+ #define XFCLOSE m2mb_fs_close
1021
+ #define XSEEK_SET M2MB_SEEK_SET
1022
+ #define XSEEK_END M2MB_SEEK_END
1023
+ #define XBADFILE -1
1024
+ #define XFGETS(b,s,f) -2 /* Not ported yet */
1025
+
1026
+ #elif defined (WOLFSSL_XILINX)
1027
+ #include "xsdps.h"
1028
+ #include "ff.h"
1029
+
1030
+ /* workaround to declare variable and provide type */
1031
+ #define XFILE FIL curFile; FIL*
1032
+ #define XFOPEN(NAME, MODE) ({ FRESULT res; res = f_open(&curFile, (NAME), (FA_OPEN_ALWAYS | FA_WRITE | FA_READ)); (res == FR_OK) ? &curFile : NULL; })
1033
+ #define XFSEEK(F, O, W) f_lseek((F), (O))
1034
+ #define XFTELL(F) f_tell((F))
1035
+ #define XFREAD(BUF, SZ, AMT, F) ({ FRESULT res; UINT br; res = f_read((F), (BUF), (SZ)*(AMT), &br); (void)br; res; })
1036
+ #define XFWRITE(BUF, SZ, AMT, F) ({ FRESULT res; UINT written; res = f_write((F), (BUF), (SZ)*(AMT), &written); (void)written; res; })
1037
+ #define XFCLOSE(F) f_close((F))
1038
+ #define XSEEK_SET 0
1039
+ #define XSEEK_END 0
1040
+ #define XBADFILE NULL
1041
+ #define XFGETS(b,s,f) f_gets((b), (s), (f))
1042
+ #elif defined (_WIN32_WCE)
1043
+ /* stdio, WINCE case */
1044
+ #include <stdio.h>
1045
+ #define XFILE FILE*
1046
+ #define XFOPEN fopen
1047
+ #define XFDOPEN fdopen
1048
+ #define XFSEEK fseek
1049
+ #define XFTELL ftell
1050
+ #define XFREAD fread
1051
+ #define XFWRITE fwrite
1052
+ #define XFCLOSE fclose
1053
+ #define XSEEK_SET SEEK_SET
1054
+ #define XSEEK_END SEEK_END
1055
+ #define XBADFILE NULL
1056
+ #define XFGETS fgets
1057
+ #define XVSNPRINTF _vsnprintf
1058
+
1059
+ #elif defined(FUSION_RTOS)
1060
+ #include <fclstdio.h>
1061
+ #include <fclunistd.h>
1062
+ #include <fcldirent.h>
1063
+ #include <sys/fclstat.h>
1064
+ #include <fclstring.h>
1065
+ #include <fcl_os.h>
1066
+ #define XFILE FCL_FILE*
1067
+ #define XFOPEN FCL_FOPEN
1068
+ #define XFSEEK FCL_FSEEK
1069
+ #define XFTELL FCL_FTELL
1070
+ #define XFREAD FCL_FREAD
1071
+ #define XFWRITE FCL_FWRITE
1072
+ #define XFCLOSE FCL_FCLOSE
1073
+ #define XSEEK_SET SEEK_SET
1074
+ #define XSEEK_END SEEK_END
1075
+ #define XBADFILE NULL
1076
+ #define XFGETS FCL_FGETS
1077
+ #define XFPUTS FCL_FPUTS
1078
+ #define XFPRINTF FCL_FPRINTF
1079
+ #define XVFPRINTF FCL_VFPRINTF
1080
+ #define XVSNPRINTF FCL_VSNPRINTF
1081
+ #define XSNPRINTF FCL_SNPRINTF
1082
+ #define XSPRINTF FCL_SPRINTF
1083
+ #define DIR FCL_DIR
1084
+ #define stat FCL_STAT
1085
+ #define opendir FCL_OPENDIR
1086
+ #define closedir FCL_CLOSEDIR
1087
+ #define readdir FCL_READDIR
1088
+ #define dirent fclDirent
1089
+ #define strncasecmp FCL_STRNCASECMP
1090
+
1091
+ /* FUSION SPECIFIC ERROR CODE */
1092
+ #define FUSION_IO_SEND_E FCL_EWOULDBLOCK
1093
+
1094
+ #elif defined(WOLFSSL_USER_FILESYSTEM)
1095
+ /* To be defined in user_settings.h */
1096
+ #else
1097
+ /* stdio, default case */
1098
+ #include <stdio.h>
1099
+ #define XFILE FILE*
1100
+ #if defined(WOLFSSL_MDK_ARM)
1101
+ extern FILE * wolfSSL_fopen(const char *name, const char *mode) ;
1102
+ #define XFOPEN wolfSSL_fopen
1103
+ #else
1104
+ #define XFOPEN fopen
1105
+ #endif
1106
+ #define XFDOPEN fdopen
1107
+ #define XFSEEK fseek
1108
+ #define XFTELL ftell
1109
+ #define XFREAD fread
1110
+ #define XFWRITE fwrite
1111
+ #define XFCLOSE fclose
1112
+ #define XSEEK_SET SEEK_SET
1113
+ #define XSEEK_END SEEK_END
1114
+ #define XBADFILE NULL
1115
+ #define XFGETS fgets
1116
+ #define XFPRINTF fprintf
1117
+ #define XFFLUSH fflush
1118
+ #define XFEOF(fp) feof(fp)
1119
+ #define XFERROR(fp) ferror(fp)
1120
+ #define XCLEARERR(fp) clearerr(fp)
1121
+
1122
+ #if !defined(NO_WOLFSSL_DIR)\
1123
+ && !defined(WOLFSSL_NUCLEUS) && !defined(WOLFSSL_NUCLEUS_1_2)
1124
+ #if defined(__WATCOMC__)
1125
+ #include <unistd.h>
1126
+ #include <sys/stat.h>
1127
+ #define XWRITE write
1128
+ #define XREAD read
1129
+ #define XCLOSE close
1130
+ #define XSTAT stat
1131
+ #define XS_ISREG(s) S_ISREG(s)
1132
+ #if defined(__UNIX__)
1133
+ #include <dirent.h>
1134
+ #define SEPARATOR_CHAR ':'
1135
+ #else
1136
+ #include <direct.h>
1137
+ #define SEPARATOR_CHAR ';'
1138
+ #endif
1139
+ #if defined(__NT__)
1140
+ #define XALTHOMEVARNAME "USERPROFILE"
1141
+ #endif
1142
+ #elif defined(USE_WINDOWS_API)
1143
+ #include <io.h>
1144
+ #include <sys/stat.h>
1145
+ #ifndef XSTAT
1146
+ #define XSTAT _stat
1147
+ #endif
1148
+ #define XS_ISREG(s) (s & _S_IFREG)
1149
+ #define SEPARATOR_CHAR ';'
1150
+ #define XWRITE _write
1151
+ #define XREAD _read
1152
+ #define XALTHOMEVARNAME "USERPROFILE"
1153
+
1154
+ #elif defined(ARDUINO)
1155
+ #ifndef XSTAT
1156
+ #define XSTAT _stat
1157
+ #endif
1158
+ #define XS_ISREG(s) (s & _S_IFREG)
1159
+ #define SEPARATOR_CHAR ';'
1160
+
1161
+ #elif defined(INTIME_RTOS)
1162
+ #include <sys/stat.h>
1163
+ #ifndef XSTAT
1164
+ #define XSTAT _stat64
1165
+ #endif
1166
+ #define XS_ISREG(s) S_ISREG(s)
1167
+ #define SEPARATOR_CHAR ';'
1168
+ #define XWRITE write
1169
+ #define XREAD read
1170
+ #define XCLOSE close
1171
+
1172
+ #elif defined(WOLFSSL_TELIT_M2MB)
1173
+ #ifndef XSTAT
1174
+ #define XSTAT m2mb_fs_stat
1175
+ #endif
1176
+ #define XS_ISREG(s) (s & M2MB_S_IFREG)
1177
+ #define SEPARATOR_CHAR ':'
1178
+
1179
+ #else
1180
+ #include <dirent.h>
1181
+ #include <unistd.h>
1182
+ #include <sys/stat.h>
1183
+ #define XWRITE write
1184
+ #define XREAD read
1185
+ #define XCLOSE close
1186
+ #ifndef XSTAT
1187
+ #define XSTAT stat
1188
+ #endif
1189
+ #define XS_ISREG(s) S_ISREG(s)
1190
+ #define SEPARATOR_CHAR ':'
1191
+ #endif
1192
+
1193
+ #ifndef XSTAT_TYPE
1194
+ #define XSTAT_TYPE struct XSTAT
1195
+ #endif
1196
+ #endif /* !NO_WOLFSSL_DIR !WOLFSSL_NUCLEUS !WOLFSSL_NUCLEUS_1_2 */
1197
+ #endif
1198
+
1199
+ #ifndef MAX_FILENAME_SZ
1200
+ #define MAX_FILENAME_SZ (260 + 1) /* max file name length */
1201
+ #endif
1202
+ #ifndef MAX_PATH
1203
+ #define MAX_PATH (260 + 1)
1204
+ #endif
1205
+ #ifndef XFEOF
1206
+ #define XFEOF(fp) 0
1207
+ #endif
1208
+ #ifndef XFERROR
1209
+ #define XFERROR(fp) 0
1210
+ #endif
1211
+ #ifndef XCLEARERR
1212
+ #define XCLEARERR(fp) WC_DO_NOTHING
1213
+ #endif
1214
+
1215
+ WOLFSSL_API int wc_FileLoad(const char* fname, unsigned char** buf,
1216
+ size_t* bufLen, void* heap);
1217
+
1218
+ #if !defined(NO_WOLFSSL_DIR) && !defined(WOLFSSL_NUCLEUS) && \
1219
+ !defined(WOLFSSL_NUCLEUS_1_2)
1220
+ typedef struct ReadDirCtx {
1221
+ #ifdef USE_WINDOWS_API
1222
+ WIN32_FIND_DATAA FindFileData;
1223
+ HANDLE hFind;
1224
+ XSTAT_TYPE s;
1225
+ #elif defined(WOLFSSL_ZEPHYR)
1226
+ struct fs_dirent entry;
1227
+ struct fs_dir_t dir;
1228
+ struct fs_dirent s;
1229
+ struct fs_dir_t* dirp;
1230
+
1231
+ #elif defined(WOLFSSL_TELIT_M2MB)
1232
+ M2MB_DIR_T* dir;
1233
+ struct M2MB_DIRENT* entry;
1234
+ struct M2MB_STAT s;
1235
+ #elif defined(INTIME_RTOS)
1236
+ struct stat64 s;
1237
+ struct _find64 FindFileData;
1238
+ #define IntimeFindFirst(name, data) (0 == _findfirst64(name, data))
1239
+ #define IntimeFindNext(data) (0 == _findnext64(data))
1240
+ #define IntimeFindClose(data) (0 == _findclose64(data))
1241
+ #define IntimeFilename(ctx) ctx->FindFileData.f_filename
1242
+ #elif defined(ARDUINO)
1243
+ /* TODO: board specific features */
1244
+ #else
1245
+ struct dirent* entry;
1246
+ DIR* dir;
1247
+ XSTAT_TYPE s;
1248
+ #endif
1249
+ char name[MAX_FILENAME_SZ];
1250
+ } ReadDirCtx;
1251
+
1252
+ #define WC_READDIR_NOFILE (-1)
1253
+
1254
+ WOLFSSL_API int wc_ReadDirFirst(ReadDirCtx* ctx, const char* path, char** name);
1255
+ WOLFSSL_API int wc_ReadDirNext(ReadDirCtx* ctx, const char* path, char** name);
1256
+ WOLFSSL_API void wc_ReadDirClose(ReadDirCtx* ctx);
1257
+ #endif /* !NO_WOLFSSL_DIR */
1258
+ #define WC_ISFILEEXIST_NOFILE (-1)
1259
+
1260
+ WOLFSSL_API int wc_FileExists(const char* fname);
1261
+
1262
+ #endif /* !NO_FILESYSTEM */
1263
+
1264
+ /* Defaults, user may over-ride with user_settings.h or in a porting section
1265
+ * above
1266
+ */
1267
+ #ifndef XVFPRINTF
1268
+ #define XVFPRINTF vfprintf
1269
+ #endif
1270
+ #ifndef XVSNPRINTF
1271
+ #define XVSNPRINTF vsnprintf
1272
+ #endif
1273
+ #ifndef XFPUTS
1274
+ #define XFPUTS fputs
1275
+ #endif
1276
+ #ifndef XSPRINTF
1277
+ #define XSPRINTF sprintf
1278
+ #endif
1279
+
1280
+ #ifdef USE_WINDOWS_API
1281
+ #ifndef SOCKET_T
1282
+ #ifdef __MINGW64__
1283
+ typedef size_t SOCKET_T;
1284
+ #else
1285
+ typedef unsigned int SOCKET_T;
1286
+ #endif
1287
+ #endif
1288
+ #ifndef SOCKET_INVALID
1289
+ #define SOCKET_INVALID INVALID_SOCKET
1290
+ #endif
1291
+ #else
1292
+ #ifndef SOCKET_T
1293
+ typedef int SOCKET_T;
1294
+ #endif
1295
+ #ifndef SOCKET_INVALID
1296
+ #define SOCKET_INVALID (-1)
1297
+ #endif
1298
+ #endif
1299
+
1300
+ /* MIN/MAX MACRO SECTION */
1301
+ /* Windows API defines its own min() macro. */
1302
+ #if defined(USE_WINDOWS_API)
1303
+ #if defined(min) || defined(WOLFSSL_MYSQL_COMPATIBLE)
1304
+ #undef WOLFSSL_HAVE_MIN
1305
+ #define WOLFSSL_HAVE_MIN
1306
+ #endif /* min */
1307
+ #if defined(max) || defined(WOLFSSL_MYSQL_COMPATIBLE)
1308
+ #undef WOLFSSL_HAVE_MAX
1309
+ #define WOLFSSL_HAVE_MAX
1310
+ #endif /* max */
1311
+ #endif /* USE_WINDOWS_API */
1312
+
1313
+ #ifdef __QNXNTO__
1314
+ #define WOLFSSL_HAVE_MIN
1315
+ #define WOLFSSL_HAVE_MAX
1316
+ #endif
1317
+
1318
+ /* TIME SECTION */
1319
+ /* Time functions */
1320
+ #ifndef NO_ASN_TIME
1321
+ #if defined(USER_TIME)
1322
+ /* Use our gmtime and time_t/struct tm types.
1323
+ Only needs seconds since EPOCH using XTIME function.
1324
+ time_t XTIME(time_t * timer) {}
1325
+ */
1326
+ #define WOLFSSL_GMTIME
1327
+ #ifndef HAVE_TM_TYPE
1328
+ #define USE_WOLF_TM
1329
+ #endif
1330
+ #ifndef HAVE_TIME_T_TYPE
1331
+ #define USE_WOLF_TIME_T
1332
+ #endif
1333
+
1334
+ #elif defined(TIME_OVERRIDES)
1335
+ /* Override XTIME() and XGMTIME() functionality.
1336
+ Requires user to provide these functions:
1337
+ time_t XTIME(time_t * timer) {}
1338
+ struct tm* XGMTIME(const time_t* timer, struct tm* tmp) {}
1339
+ */
1340
+ #ifndef HAVE_TIME_T_TYPE
1341
+ #define USE_WOLF_TIME_T
1342
+ #endif
1343
+ #ifndef HAVE_TM_TYPE
1344
+ #define USE_WOLF_TM
1345
+ #endif
1346
+ #define NEED_TMP_TIME
1347
+
1348
+ #elif defined(WOLFSSL_XILINX)
1349
+ #ifndef XTIME
1350
+ #define XTIME(t1) xilinx_time((t1))
1351
+ #endif
1352
+ #include <time.h>
1353
+ time_t xilinx_time(time_t * timer);
1354
+
1355
+ #elif defined(HAVE_RTP_SYS)
1356
+ #include "os.h" /* dc_rtc_api needs */
1357
+ #include "dc_rtc_api.h" /* to get current time */
1358
+
1359
+ /* uses partial <time.h> structures */
1360
+ #define XTIME(tl) (0)
1361
+ #define XGMTIME(c, t) rtpsys_gmtime((c))
1362
+
1363
+ #elif defined(WOLFSSL_DEOS) || defined(WOLFSSL_DEOS_RTEMS)
1364
+ #include <time.h>
1365
+ #ifndef XTIME
1366
+ extern time_t deos_time(time_t* timer);
1367
+ #define XTIME(t1) deos_time((t1))
1368
+ #endif
1369
+ #elif defined(MICRIUM)
1370
+ #include <clk.h>
1371
+ #include <time.h>
1372
+ #define XTIME(t1) micrium_time((t1))
1373
+ #define WOLFSSL_GMTIME
1374
+
1375
+ #elif defined(MICROCHIP_TCPIP_V5) || defined(MICROCHIP_TCPIP)
1376
+ #include <time.h>
1377
+ extern time_t pic32_time(time_t* timer);
1378
+ #define XTIME(t1) pic32_time((t1))
1379
+ #define XGMTIME(c, t) gmtime((c))
1380
+
1381
+ #elif defined(FREESCALE_RTC)
1382
+ #include <time.h>
1383
+ #include "fsl_rtc.h"
1384
+ #ifndef XTIME
1385
+ #define XTIME(t1) fsl_time((t1))
1386
+ #endif
1387
+ #elif defined(FREESCALE_SNVS_RTC)
1388
+ #include <time.h>
1389
+ #include "fsl_snvs_hp.h"
1390
+ time_t fsl_time(time_t* t);
1391
+ #ifndef XTIME
1392
+ #define XTIME(t1) fsl_time((t1))
1393
+ #endif
1394
+ #elif defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
1395
+ #ifdef FREESCALE_MQX_4_0
1396
+ #include <time.h>
1397
+ extern time_t mqx_time(time_t* timer);
1398
+ #else
1399
+ #define HAVE_GMTIME_R
1400
+ #endif
1401
+ #define XTIME(t1) mqx_time((t1))
1402
+
1403
+ #elif defined(FREESCALE_KSDK_BM) || defined(FREESCALE_FREE_RTOS) || defined(FREESCALE_KSDK_FREERTOS)
1404
+ #include <time.h>
1405
+ #ifndef XTIME
1406
+ /*extern time_t ksdk_time(time_t* timer);*/
1407
+ #define XTIME(t1) ksdk_time((t1))
1408
+ #endif
1409
+ #define XGMTIME(c, t) gmtime((c))
1410
+
1411
+ #elif defined(WOLFSSL_ATMEL) && defined(WOLFSSL_ATMEL_TIME)
1412
+ #define XTIME(t1) atmel_get_curr_time_and_date((t1))
1413
+ #define WOLFSSL_GMTIME
1414
+ #define USE_WOLF_TM
1415
+ #define USE_WOLF_TIME_T
1416
+
1417
+ #elif defined(WOLFSSL_WICED)
1418
+ #include <time.h>
1419
+ time_t wiced_pseudo_unix_epoch_time(time_t * timer);
1420
+ #define XTIME(t1) wiced_pseudo_unix_epoch_time((t1))
1421
+ #define HAVE_GMTIME_R
1422
+
1423
+ #elif defined(IDIRECT_DEV_TIME)
1424
+ /*Gets the timestamp from cloak software owned by VT iDirect
1425
+ in place of time() from <time.h> */
1426
+ #include <time.h>
1427
+ #define XTIME(t1) idirect_time((t1))
1428
+ #define XGMTIME(c, t) gmtime((c))
1429
+
1430
+ #elif defined(_WIN32_WCE)
1431
+ #define _WINSOCKAPI_ /* block inclusion of winsock.h header file */
1432
+ #include <windows.h>
1433
+ #undef _WINSOCKAPI_ /* undefine it for MINGW winsock2.h header file */
1434
+ #include <stdlib.h> /* For file system */
1435
+
1436
+ time_t windows_time(time_t* timer);
1437
+
1438
+ #define FindNextFileA(h, d) FindNextFile(h, (LPWIN32_FIND_DATAW) d)
1439
+ #define FindFirstFileA(fn, d) FindFirstFile((LPCWSTR) fn, \
1440
+ (LPWIN32_FIND_DATAW) d)
1441
+ #define XTIME(t1) windows_time((t1))
1442
+ #define WOLFSSL_GMTIME
1443
+
1444
+ /* if struct tm is not defined in WINCE SDK */
1445
+ #ifndef _TM_DEFINED
1446
+ struct tm {
1447
+ int tm_sec; /* seconds */
1448
+ int tm_min; /* minutes */
1449
+ int tm_hour; /* hours */
1450
+ int tm_mday; /* day of month (month specific) */
1451
+ int tm_mon; /* month */
1452
+ int tm_year; /* year */
1453
+ int tm_wday; /* day of week (out of 1-7)*/
1454
+ int tm_yday; /* day of year (out of 365) */
1455
+ int tm_isdst; /* is it daylight savings */
1456
+ };
1457
+ #define _TM_DEFINED
1458
+ #endif
1459
+
1460
+ #elif defined(WOLFSSL_APACHE_MYNEWT)
1461
+ #include "os/os_time.h"
1462
+ typedef long time_t;
1463
+ extern time_t mynewt_time(time_t* timer);
1464
+ #define XTIME(t1) mynewt_time((t1))
1465
+ #define WOLFSSL_GMTIME
1466
+ #define USE_WOLF_TM
1467
+ #define USE_WOLF_TIME_T
1468
+
1469
+ #elif defined(WOLFSSL_ZEPHYR)
1470
+ #include <version.h>
1471
+ #ifndef _POSIX_C_SOURCE
1472
+ #if KERNEL_VERSION_NUMBER >= 0x30100
1473
+ #include <zephyr/posix/time.h>
1474
+ #else
1475
+ #include <posix/time.h>
1476
+ #endif
1477
+ #else
1478
+ #include <time.h>
1479
+ #endif
1480
+
1481
+ #if defined(CONFIG_RTC)
1482
+ #if defined(CONFIG_PICOLIBC) || defined(CONFIG_NEWLIB_LIBC)
1483
+ #include <zephyr/drivers/rtc.h>
1484
+ #else
1485
+ #warning "RTC support needs picolibc or newlib (nano)"
1486
+ #endif
1487
+ #endif
1488
+
1489
+ time_t z_time(time_t *timer);
1490
+
1491
+ #define XTIME(tl) z_time((tl))
1492
+ #define XGMTIME(c, t) gmtime((c))
1493
+
1494
+ #elif defined(WOLFSSL_TELIT_M2MB)
1495
+ typedef long time_t;
1496
+ extern time_t m2mb_xtime(time_t * timer);
1497
+ #define XTIME(tl) m2mb_xtime((tl))
1498
+ #ifdef WOLFSSL_TLS13
1499
+ extern time_t m2mb_xtime_ms(time_t * timer);
1500
+ #define XTIME_MS(tl) m2mb_xtime_ms((tl))
1501
+ #endif
1502
+ #ifndef NO_CRYPT_BENCHMARK
1503
+ extern double m2mb_xtime_bench(int reset);
1504
+ #define WOLFSSL_CURRTIME_REMAP m2mb_xtime_bench
1505
+ #endif
1506
+ #define XGMTIME(c, t) gmtime((c))
1507
+ #define WOLFSSL_GMTIME
1508
+ #define USE_WOLF_TM
1509
+
1510
+ #elif defined(WOLFSSL_LINUXKM)
1511
+
1512
+ /* definitions are in linuxkm/linuxkm_wc_port.h */
1513
+
1514
+ #elif defined(WOLFSSL_BSDKM)
1515
+
1516
+ /* definitions are in bsdkm/bsdkm_wc_port.h */
1517
+
1518
+ #elif defined(HAL_RTC_MODULE_ENABLED)
1519
+ #include <time.h>
1520
+ WOLFSSL_LOCAL time_t stm32_hal_time(time_t* t1);
1521
+ #define XTIME(t1) stm32_hal_time(t1)
1522
+ #define WOLFSSL_GMTIME
1523
+ #else
1524
+ /* default */
1525
+ /* uses complete <time.h> facility */
1526
+ #include <time.h>
1527
+ #if defined(HAVE_SYS_TIME_H)
1528
+ #include <sys/time.h>
1529
+ #endif
1530
+
1531
+ /* PowerPC time_t is int */
1532
+ #if defined(__PPC__) || defined(__ppc__)
1533
+ #define TIME_T_NOT_64BIT
1534
+ #endif
1535
+
1536
+ #define XMKTIME(tm) mktime(tm)
1537
+ #define XDIFFTIME(to, from) difftime(to, from)
1538
+ #endif
1539
+
1540
+ #ifdef SIZEOF_TIME_T
1541
+ /* check if size of time_t from autoconf is less than 8 bytes (64bits) */
1542
+ #if SIZEOF_TIME_T < 8
1543
+ #undef TIME_T_NOT_64BIT
1544
+ #define TIME_T_NOT_64BIT
1545
+ #endif
1546
+ #endif
1547
+ #ifdef TIME_T_NOT_LONG
1548
+ /* one old reference to TIME_T_NOT_LONG in GCC-ARM example README
1549
+ * this keeps support for the old macro name */
1550
+ #undef TIME_T_NOT_64BIT
1551
+ #define TIME_T_NOT_64BIT
1552
+ #endif
1553
+
1554
+ /* Map default time functions */
1555
+ #if !defined(XTIME) && !defined(TIME_OVERRIDES) && !defined(USER_TIME)
1556
+ #ifdef TEST_BEFORE_DATE
1557
+ #define XTIME(tl) (946681200UL) /* Jan 1, 2000 */
1558
+ #else
1559
+ #define XTIME(tl) time((tl))
1560
+ #endif
1561
+ #endif
1562
+
1563
+ #if defined(WOLFSSL_GMTIME) && !defined(HAVE_GMTIME_R)
1564
+ #define HAVE_GMTIME_R
1565
+ #endif
1566
+
1567
+ #if !defined(XGMTIME) && !defined(TIME_OVERRIDES)
1568
+ /* Always use gmtime_r if available. */
1569
+ #if defined(HAVE_GMTIME_S)
1570
+ /* reentrant version */
1571
+ #define XGMTIME(c, t) gmtime_s((c), (t))
1572
+ #define NEED_TMP_TIME
1573
+ #elif defined(HAVE_GMTIME_R)
1574
+ #define XGMTIME(c, t) gmtime_r((c), (t))
1575
+ #define NEED_TMP_TIME
1576
+ #else
1577
+ #define XGMTIME(c, t) gmtime((c))
1578
+ #endif
1579
+ #endif
1580
+ #if !defined(XVALIDATE_DATE) && !defined(HAVE_VALIDATE_DATE)
1581
+ #define USE_WOLF_VALIDDATE
1582
+ #define XVALIDATE_DATE(d, f, t) wc_ValidateDate((d), (f), (t))
1583
+ #endif
1584
+
1585
+ /* wolf struct tm and time_t */
1586
+ #if defined(USE_WOLF_TM)
1587
+ struct tm {
1588
+ int tm_sec; /* seconds after the minute [0-60] */
1589
+ int tm_min; /* minutes after the hour [0-59] */
1590
+ int tm_hour; /* hours since midnight [0-23] */
1591
+ int tm_mday; /* day of the month [1-31] */
1592
+ int tm_mon; /* months since January [0-11] */
1593
+ int tm_year; /* years since 1900 */
1594
+ int tm_wday; /* days since Sunday [0-6] */
1595
+ int tm_yday; /* days since January 1 [0-365] */
1596
+ int tm_isdst; /* Daylight Savings Time flag */
1597
+ long tm_gmtoff; /* offset from CUT in seconds */
1598
+ char *tm_zone; /* timezone abbreviation */
1599
+ };
1600
+ #endif /* USE_WOLF_TM */
1601
+ #if defined(USE_WOLF_TIME_T)
1602
+ typedef long time_t;
1603
+ #endif
1604
+ #if defined(USE_WOLF_SUSECONDS_T)
1605
+ typedef long suseconds_t;
1606
+ #endif
1607
+ #if defined(USE_WOLF_TIMEVAL_T)
1608
+ struct timeval
1609
+ {
1610
+ time_t tv_sec;
1611
+ suseconds_t tv_usec;
1612
+ };
1613
+ #endif
1614
+
1615
+ /* forward declarations */
1616
+ #if defined(USER_TIME)
1617
+ struct tm* gmtime(const time_t* timer);
1618
+ extern time_t XTIME(time_t * timer);
1619
+
1620
+ #ifdef STACK_TRAP
1621
+ /* for stack trap tracking, don't call os gmtime on OS X/linux,
1622
+ uses a lot of stack spce */
1623
+ extern time_t time(time_t * timer);
1624
+ #define XTIME(tl) time((tl))
1625
+ #endif /* STACK_TRAP */
1626
+
1627
+ #elif defined(TIME_OVERRIDES)
1628
+ extern time_t XTIME(time_t * timer);
1629
+ extern struct tm* XGMTIME(const time_t* timer, struct tm* tmp);
1630
+ #elif defined(WOLFSSL_GMTIME)
1631
+ struct tm* gmtime(const time_t* timer);
1632
+ struct tm* gmtime_r(const time_t* timer, struct tm *ret);
1633
+ #endif
1634
+ #endif /* !NO_ASN_TIME */
1635
+
1636
+
1637
+ #if (!defined(WOLFSSL_LEANPSK) && !defined(STRING_USER)) || \
1638
+ defined(USE_WOLF_STRNSTR)
1639
+ WOLFSSL_TEST_VIS char* wolfSSL_strnstr(const char* s1, const char* s2, unsigned int n);
1640
+ #endif
1641
+
1642
+ #ifndef FILE_BUFFER_SIZE
1643
+ /* default static file buffer size for input, will use dynamic buffer if
1644
+ * not big enough */
1645
+ #ifdef WOLFSSL_CERT_EXT
1646
+ #define FILE_BUFFER_SIZE (3*1024)
1647
+ #else
1648
+ #define FILE_BUFFER_SIZE (1*1024)
1649
+ #endif
1650
+ #endif
1651
+
1652
+ #ifdef HAVE_CAVIUM_OCTEON_SYNC
1653
+ /* By default, the OCTEON's global variables are all thread local. This
1654
+ * tag allows them to be shared between threads. */
1655
+ #include "cvmx-platform.h"
1656
+ #define WC_THREADSHARED CVMX_SHARED
1657
+ #else
1658
+ #define WC_THREADSHARED
1659
+ #endif
1660
+
1661
+ #ifdef WOLFSSL_DSP
1662
+ #include "wolfssl_dsp.h"
1663
+
1664
+ /* callbacks for setting handle */
1665
+ typedef int (*wolfSSL_DSP_Handle_cb)(remote_handle64 *handle, int finished,
1666
+ void *ctx);
1667
+ WOLFSSL_API int wolfSSL_GetHandleCbSet();
1668
+ WOLFSSL_API int wolfSSL_SetHandleCb(wolfSSL_DSP_Handle_cb in);
1669
+ WOLFSSL_LOCAL int wolfSSL_InitHandle();
1670
+ WOLFSSL_LOCAL void wolfSSL_CleanupHandle();
1671
+ #endif
1672
+
1673
+ #ifdef WOLFSSL_SCE
1674
+ #ifndef WOLFSSL_SCE_GSCE_HANDLE
1675
+ #define WOLFSSL_SCE_GSCE_HANDLE g_sce
1676
+ #endif
1677
+ #endif
1678
+
1679
+ #ifdef WOLF_C99
1680
+ /* use alternate keyword for compatibility with -std=c99 */
1681
+ #define XASM_VOLATILE(a) __asm__ volatile(a)
1682
+ #elif defined(__IAR_SYSTEMS_ICC__)
1683
+ #define XASM_VOLATILE(a) asm volatile(a)
1684
+ #elif defined(__KEIL__)
1685
+ #define XASM_VOLATILE(a) __asm volatile(a)
1686
+ #else
1687
+ #define XASM_VOLATILE(a) __asm__ __volatile__(a)
1688
+ #endif
1689
+
1690
+ #ifndef WOLFSSL_NO_FENCE
1691
+ #ifdef XFENCE
1692
+ /* use user-supplied XFENCE definition. */
1693
+ #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \
1694
+ !defined(__STDC_NO_ATOMICS__)
1695
+ #ifdef WOLFSSL_NO_ATOMIC
1696
+ #define XFENCE() WC_DO_NOTHING
1697
+ #else
1698
+ #include <stdatomic.h>
1699
+ #define XFENCE() atomic_thread_fence(memory_order_seq_cst)
1700
+ #endif
1701
+ #elif defined(__GNUC__) && (__GNUC__ == 4) && \
1702
+ defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 1)
1703
+ #define XFENCE() __sync_synchronize()
1704
+ #elif (defined(__GNUC__) && (__GNUC__ >= 5)) || defined (__clang__)
1705
+ #define XFENCE() __atomic_thread_fence(__ATOMIC_SEQ_CST)
1706
+ #elif defined(WOLFSSL_NO_ASM)
1707
+ #define XFENCE() WC_DO_NOTHING
1708
+ #elif defined (__i386__) || defined(__x86_64__)
1709
+ #define XFENCE() XASM_VOLATILE("lfence")
1710
+ #elif defined (__arm__) && (__ARM_ARCH > 6)
1711
+ #define XFENCE() XASM_VOLATILE("isb")
1712
+ #elif defined(__aarch64__)
1713
+ /* Change ".inst 0xd50330ff" to "sb" when compilers support it. */
1714
+ #ifdef WOLFSSL_ARMASM_BARRIER_SB
1715
+ #define XFENCE() XASM_VOLATILE(".inst 0xd50330ff")
1716
+ #elif defined(WOLFSSL_ARMASM_BARRIER_DETECT)
1717
+ extern int aarch64_use_sb;
1718
+ #define XFENCE() \
1719
+ do { \
1720
+ if (aarch64_use_sb) \
1721
+ XASM_VOLATILE(".inst 0xd50330ff"); \
1722
+ else \
1723
+ XASM_VOLATILE("isb"); \
1724
+ } while (0)
1725
+ #else
1726
+ #define XFENCE() XASM_VOLATILE("isb")
1727
+ #endif
1728
+ #elif defined(__riscv)
1729
+ #define XFENCE() XASM_VOLATILE("fence")
1730
+ #elif defined(__PPC__) || defined(__POWERPC__)
1731
+ #define XFENCE() XASM_VOLATILE("isync; sync")
1732
+ #else
1733
+ #define XFENCE() WC_DO_NOTHING
1734
+ #endif
1735
+ #else
1736
+ #define XFENCE() WC_DO_NOTHING
1737
+ #endif
1738
+
1739
+
1740
+ /* AFTER user_settings.h is loaded,
1741
+ ** determine if POSIX multi-threaded: HAVE_PTHREAD */
1742
+ #if defined(SINGLE_THREADED) || defined(__MINGW32__)
1743
+ /* Never HAVE_PTHREAD in single thread, or non-POSIX mode.
1744
+ ** Reminder: MING32 is win32 threads, not POSIX threads */
1745
+ #undef HAVE_PTHREAD
1746
+ #else
1747
+ /* _POSIX_THREADS is defined by unistd.h so this check needs to happen
1748
+ * after we include all the platform relevant libs. */
1749
+ #ifdef _POSIX_THREADS
1750
+ /* HAVE_PTHREAD == POSIX threads capable and enabled. */
1751
+ #undef HAVE_PTHREAD
1752
+ #define HAVE_PTHREAD 1
1753
+ #endif
1754
+ #endif
1755
+
1756
+ #if defined(WC_RNG_SEED_CB) && !defined(WC_GENERATE_SEED_DEFAULT)
1757
+ #define WC_GENERATE_SEED_DEFAULT wc_GenerateSeed
1758
+ #endif
1759
+
1760
+ #ifdef __cplusplus
1761
+ } /* extern "C" */
1762
+ #endif
1763
+
1764
+ #endif /* WOLF_CRYPT_PORT_H */