@crossbind/port-openssl-linuxmusl 0.0.0-bootstrap.0 → 2.0.0-beta.63

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 (328) hide show
  1. package/LICENSE +177 -0
  2. package/README.md +11 -3
  3. package/assets/90-wasi.conf +18 -0
  4. package/assets/cacert.pem +3480 -0
  5. package/crossbind.build.js +1 -0
  6. package/crossbind.config.js +5 -0
  7. package/dist/prebuilt/CMakeLists.txt +58 -0
  8. package/dist/prebuilt/linuxmusl-arm64-mt-release/crossbind-emccflags.fingerprint +1 -0
  9. package/dist/prebuilt/linuxmusl-arm64-mt-release/crossbind-source.fingerprint +1 -0
  10. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/aes.h +109 -0
  11. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/asn1.h +1096 -0
  12. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/asn1err.h +140 -0
  13. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/asn1t.h +935 -0
  14. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/async.h +102 -0
  15. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/asyncerr.h +27 -0
  16. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/bio.h +1039 -0
  17. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/bioerr.h +70 -0
  18. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/blowfish.h +78 -0
  19. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/bn.h +588 -0
  20. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/bnerr.h +45 -0
  21. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/buffer.h +60 -0
  22. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/buffererr.h +23 -0
  23. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/byteorder.h +339 -0
  24. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/camellia.h +117 -0
  25. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/cast.h +71 -0
  26. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/cmac.h +53 -0
  27. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/cmp.h +742 -0
  28. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/cmp_util.h +56 -0
  29. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/cmperr.h +132 -0
  30. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/cms.h +522 -0
  31. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/cmserr.h +128 -0
  32. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/comp.h +101 -0
  33. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/comperr.h +36 -0
  34. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/conf.h +219 -0
  35. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/conf_api.h +46 -0
  36. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/conferr.h +50 -0
  37. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/configuration.h +223 -0
  38. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/conftypes.h +44 -0
  39. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/core.h +235 -0
  40. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/core_dispatch.h +1069 -0
  41. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/core_names.h +601 -0
  42. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/core_object.h +42 -0
  43. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/crmf.h +279 -0
  44. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/crmferr.h +56 -0
  45. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/crypto.h +620 -0
  46. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/cryptoerr.h +54 -0
  47. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/cryptoerr_legacy.h +1502 -0
  48. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ct.h +574 -0
  49. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/cterr.h +43 -0
  50. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/decoder.h +133 -0
  51. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/decodererr.h +26 -0
  52. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/des.h +211 -0
  53. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/dh.h +332 -0
  54. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/dherr.h +57 -0
  55. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/dsa.h +272 -0
  56. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/dsaerr.h +42 -0
  57. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/dtls1.h +57 -0
  58. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/e_os2.h +293 -0
  59. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/e_ostime.h +38 -0
  60. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ebcdic.h +39 -0
  61. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ec.h +1571 -0
  62. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ecdh.h +10 -0
  63. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ecdsa.h +10 -0
  64. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ecerr.h +102 -0
  65. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ech.h +134 -0
  66. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/encoder.h +126 -0
  67. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/encodererr.h +28 -0
  68. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/engine.h +1211 -0
  69. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/engineerr.h +19 -0
  70. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/err.h +461 -0
  71. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ess.h +136 -0
  72. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/esserr.h +32 -0
  73. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/evp.h +1948 -0
  74. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/evperr.h +148 -0
  75. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/fips_names.h +56 -0
  76. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/fipskey.h +47 -0
  77. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/hmac.h +63 -0
  78. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/hpke.h +169 -0
  79. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/http.h +117 -0
  80. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/httperr.h +55 -0
  81. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/idea.h +82 -0
  82. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/indicator.h +31 -0
  83. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/kdf.h +141 -0
  84. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/kdferr.h +16 -0
  85. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/lhash.h +417 -0
  86. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/macros.h +392 -0
  87. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/md2.h +56 -0
  88. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/md4.h +63 -0
  89. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/md5.h +62 -0
  90. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/mdc2.h +55 -0
  91. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ml_kem.h +31 -0
  92. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/modes.h +219 -0
  93. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/obj_mac.h +6699 -0
  94. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/objects.h +186 -0
  95. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/objectserr.h +26 -0
  96. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ocsp.h +487 -0
  97. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ocsperr.h +51 -0
  98. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/opensslconf.h +17 -0
  99. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/opensslv.h +131 -0
  100. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ossl_typ.h +16 -0
  101. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/param_build.h +63 -0
  102. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/params.h +167 -0
  103. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/pem.h +549 -0
  104. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/pem2.h +19 -0
  105. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/pemerr.h +57 -0
  106. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/pkcs12.h +376 -0
  107. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/pkcs12err.h +45 -0
  108. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/pkcs7.h +432 -0
  109. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/pkcs7err.h +61 -0
  110. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/posix_time.h +46 -0
  111. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/prov_ssl.h +38 -0
  112. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/proverr.h +176 -0
  113. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/provider.h +94 -0
  114. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/quic.h +80 -0
  115. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/rand.h +130 -0
  116. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/randerr.h +68 -0
  117. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/rc2.h +68 -0
  118. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/rc4.h +47 -0
  119. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/rc5.h +79 -0
  120. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ripemd.h +59 -0
  121. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/rsa.h +613 -0
  122. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/rsaerr.h +104 -0
  123. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/safestack.h +350 -0
  124. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/seed.h +112 -0
  125. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/self_test.h +119 -0
  126. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/sha.h +140 -0
  127. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/srp.h +291 -0
  128. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/srtp.h +68 -0
  129. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ssl.h +2943 -0
  130. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ssl2.h +30 -0
  131. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ssl3.h +357 -0
  132. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/sslerr.h +381 -0
  133. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/sslerr_legacy.h +487 -0
  134. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/stack.h +93 -0
  135. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/store.h +373 -0
  136. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/storeerr.h +48 -0
  137. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/symhacks.h +39 -0
  138. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/thread.h +31 -0
  139. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/tls1.h +1241 -0
  140. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/trace.h +323 -0
  141. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ts.h +516 -0
  142. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/tserr.h +65 -0
  143. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/txt_db.h +63 -0
  144. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/types.h +249 -0
  145. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/ui.h +409 -0
  146. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/uierr.h +36 -0
  147. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/whrlpool.h +62 -0
  148. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/x509.h +1305 -0
  149. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/x509_acert.h +312 -0
  150. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/x509_vfy.h +949 -0
  151. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/x509err.h +70 -0
  152. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/x509v3.h +2019 -0
  153. package/dist/prebuilt/linuxmusl-arm64-mt-release/include/openssl/x509v3err.h +95 -0
  154. package/dist/prebuilt/linuxmusl-arm64-mt-release/lib/cmake/OpenSSL/OpenSSLConfig.cmake +128 -0
  155. package/dist/prebuilt/linuxmusl-arm64-mt-release/lib/cmake/OpenSSL/OpenSSLConfigVersion.cmake +18 -0
  156. package/dist/prebuilt/linuxmusl-arm64-mt-release/lib/libcrypto.a +0 -0
  157. package/dist/prebuilt/linuxmusl-arm64-mt-release/lib/libssl.a +0 -0
  158. package/dist/prebuilt/linuxmusl-arm64-mt-release/lib/ossl-modules/legacy.so +0 -0
  159. package/dist/prebuilt/linuxmusl-arm64-mt-release/lib/pkgconfig/libcrypto.pc +13 -0
  160. package/dist/prebuilt/linuxmusl-arm64-mt-release/lib/pkgconfig/libssl.pc +12 -0
  161. package/dist/prebuilt/linuxmusl-arm64-mt-release/lib/pkgconfig/openssl.pc +10 -0
  162. package/dist/prebuilt/linuxmusl-arm64-mt-release/lib.sources +1 -0
  163. package/dist/prebuilt/linuxmusl-arm64-mt-release/ssl/certs/cacert.pem +3480 -0
  164. package/dist/prebuilt/linuxmusl-arm64-mt-release/ssl/ct_log_list.cnf +9 -0
  165. package/dist/prebuilt/linuxmusl-arm64-mt-release/ssl/ct_log_list.cnf.dist +9 -0
  166. package/dist/prebuilt/linuxmusl-arm64-mt-release/ssl/openssl.cnf +395 -0
  167. package/dist/prebuilt/linuxmusl-arm64-mt-release/ssl/openssl.cnf.dist +395 -0
  168. package/dist/prebuilt/linuxmusl-x64-mt-release/crossbind-emccflags.fingerprint +1 -0
  169. package/dist/prebuilt/linuxmusl-x64-mt-release/crossbind-source.fingerprint +1 -0
  170. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/aes.h +109 -0
  171. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/asn1.h +1096 -0
  172. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/asn1err.h +140 -0
  173. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/asn1t.h +935 -0
  174. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/async.h +102 -0
  175. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/asyncerr.h +27 -0
  176. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/bio.h +1039 -0
  177. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/bioerr.h +70 -0
  178. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/blowfish.h +78 -0
  179. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/bn.h +588 -0
  180. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/bnerr.h +45 -0
  181. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/buffer.h +60 -0
  182. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/buffererr.h +23 -0
  183. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/byteorder.h +339 -0
  184. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/camellia.h +117 -0
  185. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/cast.h +71 -0
  186. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/cmac.h +53 -0
  187. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/cmp.h +742 -0
  188. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/cmp_util.h +56 -0
  189. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/cmperr.h +132 -0
  190. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/cms.h +522 -0
  191. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/cmserr.h +128 -0
  192. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/comp.h +101 -0
  193. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/comperr.h +36 -0
  194. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/conf.h +219 -0
  195. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/conf_api.h +46 -0
  196. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/conferr.h +50 -0
  197. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/configuration.h +223 -0
  198. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/conftypes.h +44 -0
  199. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/core.h +235 -0
  200. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/core_dispatch.h +1069 -0
  201. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/core_names.h +601 -0
  202. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/core_object.h +42 -0
  203. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/crmf.h +279 -0
  204. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/crmferr.h +56 -0
  205. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/crypto.h +620 -0
  206. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/cryptoerr.h +54 -0
  207. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/cryptoerr_legacy.h +1502 -0
  208. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ct.h +574 -0
  209. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/cterr.h +43 -0
  210. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/decoder.h +133 -0
  211. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/decodererr.h +26 -0
  212. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/des.h +211 -0
  213. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/dh.h +332 -0
  214. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/dherr.h +57 -0
  215. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/dsa.h +272 -0
  216. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/dsaerr.h +42 -0
  217. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/dtls1.h +57 -0
  218. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/e_os2.h +293 -0
  219. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/e_ostime.h +38 -0
  220. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ebcdic.h +39 -0
  221. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ec.h +1571 -0
  222. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ecdh.h +10 -0
  223. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ecdsa.h +10 -0
  224. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ecerr.h +102 -0
  225. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ech.h +134 -0
  226. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/encoder.h +126 -0
  227. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/encodererr.h +28 -0
  228. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/engine.h +1211 -0
  229. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/engineerr.h +19 -0
  230. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/err.h +461 -0
  231. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ess.h +136 -0
  232. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/esserr.h +32 -0
  233. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/evp.h +1948 -0
  234. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/evperr.h +148 -0
  235. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/fips_names.h +56 -0
  236. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/fipskey.h +47 -0
  237. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/hmac.h +63 -0
  238. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/hpke.h +169 -0
  239. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/http.h +117 -0
  240. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/httperr.h +55 -0
  241. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/idea.h +82 -0
  242. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/indicator.h +31 -0
  243. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/kdf.h +141 -0
  244. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/kdferr.h +16 -0
  245. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/lhash.h +417 -0
  246. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/macros.h +392 -0
  247. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/md2.h +56 -0
  248. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/md4.h +63 -0
  249. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/md5.h +62 -0
  250. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/mdc2.h +55 -0
  251. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ml_kem.h +31 -0
  252. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/modes.h +219 -0
  253. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/obj_mac.h +6699 -0
  254. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/objects.h +186 -0
  255. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/objectserr.h +26 -0
  256. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ocsp.h +487 -0
  257. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ocsperr.h +51 -0
  258. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/opensslconf.h +17 -0
  259. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/opensslv.h +131 -0
  260. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ossl_typ.h +16 -0
  261. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/param_build.h +63 -0
  262. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/params.h +167 -0
  263. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/pem.h +549 -0
  264. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/pem2.h +19 -0
  265. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/pemerr.h +57 -0
  266. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/pkcs12.h +376 -0
  267. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/pkcs12err.h +45 -0
  268. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/pkcs7.h +432 -0
  269. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/pkcs7err.h +61 -0
  270. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/posix_time.h +46 -0
  271. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/prov_ssl.h +38 -0
  272. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/proverr.h +176 -0
  273. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/provider.h +94 -0
  274. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/quic.h +80 -0
  275. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/rand.h +130 -0
  276. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/randerr.h +68 -0
  277. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/rc2.h +68 -0
  278. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/rc4.h +47 -0
  279. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/rc5.h +79 -0
  280. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ripemd.h +59 -0
  281. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/rsa.h +613 -0
  282. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/rsaerr.h +104 -0
  283. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/safestack.h +350 -0
  284. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/seed.h +112 -0
  285. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/self_test.h +119 -0
  286. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/sha.h +140 -0
  287. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/srp.h +291 -0
  288. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/srtp.h +68 -0
  289. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ssl.h +2943 -0
  290. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ssl2.h +30 -0
  291. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ssl3.h +357 -0
  292. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/sslerr.h +381 -0
  293. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/sslerr_legacy.h +487 -0
  294. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/stack.h +93 -0
  295. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/store.h +373 -0
  296. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/storeerr.h +48 -0
  297. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/symhacks.h +39 -0
  298. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/thread.h +31 -0
  299. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/tls1.h +1241 -0
  300. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/trace.h +323 -0
  301. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ts.h +516 -0
  302. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/tserr.h +65 -0
  303. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/txt_db.h +63 -0
  304. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/types.h +249 -0
  305. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/ui.h +409 -0
  306. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/uierr.h +36 -0
  307. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/whrlpool.h +62 -0
  308. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/x509.h +1305 -0
  309. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/x509_acert.h +312 -0
  310. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/x509_vfy.h +949 -0
  311. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/x509err.h +70 -0
  312. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/x509v3.h +2019 -0
  313. package/dist/prebuilt/linuxmusl-x64-mt-release/include/openssl/x509v3err.h +95 -0
  314. package/dist/prebuilt/linuxmusl-x64-mt-release/lib/cmake/OpenSSL/OpenSSLConfig.cmake +128 -0
  315. package/dist/prebuilt/linuxmusl-x64-mt-release/lib/cmake/OpenSSL/OpenSSLConfigVersion.cmake +18 -0
  316. package/dist/prebuilt/linuxmusl-x64-mt-release/lib/libcrypto.a +0 -0
  317. package/dist/prebuilt/linuxmusl-x64-mt-release/lib/libssl.a +0 -0
  318. package/dist/prebuilt/linuxmusl-x64-mt-release/lib/ossl-modules/legacy.so +0 -0
  319. package/dist/prebuilt/linuxmusl-x64-mt-release/lib/pkgconfig/libcrypto.pc +13 -0
  320. package/dist/prebuilt/linuxmusl-x64-mt-release/lib/pkgconfig/libssl.pc +12 -0
  321. package/dist/prebuilt/linuxmusl-x64-mt-release/lib/pkgconfig/openssl.pc +10 -0
  322. package/dist/prebuilt/linuxmusl-x64-mt-release/lib.sources +1 -0
  323. package/dist/prebuilt/linuxmusl-x64-mt-release/ssl/certs/cacert.pem +3480 -0
  324. package/dist/prebuilt/linuxmusl-x64-mt-release/ssl/ct_log_list.cnf +9 -0
  325. package/dist/prebuilt/linuxmusl-x64-mt-release/ssl/ct_log_list.cnf.dist +9 -0
  326. package/dist/prebuilt/linuxmusl-x64-mt-release/ssl/openssl.cnf +395 -0
  327. package/dist/prebuilt/linuxmusl-x64-mt-release/ssl/openssl.cnf.dist +395 -0
  328. package/package.json +36 -6
@@ -0,0 +1,1211 @@
1
+ /*
2
+ * Copyright 2000-2026 The OpenSSL Project Authors. All Rights Reserved.
3
+ * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
4
+ *
5
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
6
+ * this file except in compliance with the License. You can obtain a copy
7
+ * in the file LICENSE in the source distribution or at
8
+ * https://www.openssl.org/source/license.html
9
+ */
10
+
11
+ #ifndef OPENSSL_ENGINE_H
12
+ #define OPENSSL_ENGINE_H
13
+ #pragma once
14
+
15
+ #include <openssl/macros.h>
16
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
17
+ #define HEADER_ENGINE_H
18
+ #endif
19
+
20
+ #include <openssl/opensslconf.h>
21
+
22
+ /*
23
+ * Engine support is gone. Definitions here are provided for the source code
24
+ * compatibility only. They are meant to keep compilation working for legacy
25
+ * projects that, for whatever reason, cannot remove/disable old legacy code.
26
+ *
27
+ * We deliberately keep the OPENSSL_NO_ENGINE macro around as it is supplied
28
+ * when the build is configured with the `no-engine` option. OpenSSL 4.0 keeps
29
+ * the `no-engine` option around.
30
+ *
31
+ * Note, we have to use a compile-time message to warn only if the API is really
32
+ * used. To avoid complex macros, we kind of abuse the existing OSSL_DEPRECATED
33
+ * macros.
34
+ */
35
+
36
+ #ifdef OPENSSL_ENGINE_STUBS
37
+ #define ENGINE_INFO_MSG \
38
+ " API symbol is replaced with stub to avoid linker error."
39
+
40
+ #define ENGINE_FUNC(ret_type, name, args, default_val) \
41
+ OSSL_DEPRECATED_MESSAGE(#name ENGINE_INFO_MSG) \
42
+ static ossl_inline ret_type name args \
43
+ { \
44
+ return default_val; /* stub return */ \
45
+ }
46
+
47
+ #define ENGINE_FUNC_NOARGS(ret_type, name, default_val) \
48
+ OSSL_DEPRECATED_MESSAGE(#name ENGINE_INFO_MSG) \
49
+ static ossl_inline ret_type name(void) \
50
+ { \
51
+ return default_val; /* stub return */ \
52
+ }
53
+
54
+ #define ENGINE_VOID_FUNC(name, args) \
55
+ OSSL_DEPRECATED_MESSAGE(#name ENGINE_INFO_MSG) \
56
+ static ossl_inline void name args \
57
+ { \
58
+ }
59
+
60
+ #define ENGINE_VOID_FUNC_NOARGS(name) \
61
+ OSSL_DEPRECATED_MESSAGE(#name ENGINE_INFO_MSG) \
62
+ static ossl_inline void name(void) \
63
+ { \
64
+ }
65
+ #else /* OPENSSL_ENGINE_STUBS */
66
+ #define ENGINE_INFO_MSG \
67
+ " API symbol is removed. Define OPENSSL_ENGINE_STUBS to mask linker errors."
68
+
69
+ #define ENGINE_FUNC(ret_type, name, args, default_val) \
70
+ OSSL_DEPRECATED_MESSAGE(#name ENGINE_INFO_MSG) \
71
+ ret_type name args;
72
+
73
+ #define ENGINE_FUNC_NOARGS(ret_type, name, default_val) \
74
+ OSSL_DEPRECATED_MESSAGE(#name ENGINE_INFO_MSG) \
75
+ ret_type name(void);
76
+
77
+ #define ENGINE_VOID_FUNC(name, args) \
78
+ OSSL_DEPRECATED_MESSAGE(#name ENGINE_INFO_MSG) \
79
+ void name args;
80
+
81
+ #define ENGINE_VOID_FUNC_NOARGS(name) \
82
+ OSSL_DEPRECATED_MESSAGE(#name ENGINE_INFO_MSG) \
83
+ void name(void);
84
+ #endif /* OPENSSL_ENGINE_STUBS */
85
+
86
+ #ifdef ENGINE_FUNC
87
+
88
+ #ifndef OPENSSL_NO_DEPRECATED_1_1_0
89
+ #include <openssl/bn.h>
90
+ #include <openssl/rsa.h>
91
+ #include <openssl/dsa.h>
92
+ #include <openssl/dh.h>
93
+ #include <openssl/ec.h>
94
+ #include <openssl/rand.h>
95
+ #include <openssl/ui.h>
96
+ #include <openssl/err.h>
97
+ #endif
98
+ #include <openssl/types.h>
99
+ #include <openssl/symhacks.h>
100
+ #include <openssl/x509.h>
101
+ #include <openssl/engineerr.h>
102
+ #ifdef __cplusplus
103
+ extern "C" {
104
+ #endif
105
+
106
+ /* Ignore stubs unused arguments */
107
+ #if defined(__GNUC__)
108
+ #pragma GCC diagnostic push
109
+ #pragma GCC diagnostic ignored "-Wunused-value"
110
+ #elif defined(__clang__)
111
+ #pragma clang diagnostic push
112
+ #pragma clang diagnostic ignored "-Wunused-value"
113
+ #endif
114
+
115
+ /*
116
+ * These flags are used to control combinations of algorithm (methods) by
117
+ * bitwise "OR"ing.
118
+ */
119
+ #define ENGINE_METHOD_RSA (unsigned int)0x0001
120
+ #define ENGINE_METHOD_DSA (unsigned int)0x0002
121
+ #define ENGINE_METHOD_DH (unsigned int)0x0004
122
+ #define ENGINE_METHOD_RAND (unsigned int)0x0008
123
+ #define ENGINE_METHOD_CIPHERS (unsigned int)0x0040
124
+ #define ENGINE_METHOD_DIGESTS (unsigned int)0x0080
125
+ #define ENGINE_METHOD_PKEY_METHS (unsigned int)0x0200
126
+ #define ENGINE_METHOD_PKEY_ASN1_METHS (unsigned int)0x0400
127
+ #define ENGINE_METHOD_EC (unsigned int)0x0800
128
+ /* Obvious all-or-nothing cases. */
129
+ #define ENGINE_METHOD_ALL (unsigned int)0xFFFF
130
+ #define ENGINE_METHOD_NONE (unsigned int)0x0000
131
+
132
+ /*
133
+ * This(ese) flag(s) controls behaviour of the ENGINE_TABLE mechanism used
134
+ * internally to control registration of ENGINE implementations, and can be
135
+ * set by ENGINE_set_table_flags(). The "NOINIT" flag prevents attempts to
136
+ * initialise registered ENGINEs if they are not already initialised.
137
+ */
138
+ #define ENGINE_TABLE_FLAG_NOINIT (unsigned int)0x0001
139
+
140
+ /* ENGINE flags that can be set by ENGINE_set_flags(). */
141
+ /* Not used */
142
+ /* #define ENGINE_FLAGS_MALLOCED 0x0001 */
143
+
144
+ /*
145
+ * This flag is for ENGINEs that wish to handle the various 'CMD'-related
146
+ * control commands on their own. Without this flag, ENGINE_ctrl() handles
147
+ * these control commands on behalf of the ENGINE using their "cmd_defns"
148
+ * data.
149
+ */
150
+ #define ENGINE_FLAGS_MANUAL_CMD_CTRL (int)0x0002
151
+
152
+ /*
153
+ * This flag is for ENGINEs who return new duplicate structures when found
154
+ * via "ENGINE_by_id()". When an ENGINE must store state (eg. if
155
+ * ENGINE_ctrl() commands are called in sequence as part of some stateful
156
+ * process like key-generation setup and execution), it can set this flag -
157
+ * then each attempt to obtain the ENGINE will result in it being copied into
158
+ * a new structure. Normally, ENGINEs don't declare this flag so
159
+ * ENGINE_by_id() just increments the existing ENGINE's structural reference
160
+ * count.
161
+ */
162
+ #define ENGINE_FLAGS_BY_ID_COPY (int)0x0004
163
+
164
+ /*
165
+ * This flag is for an ENGINE that does not want its methods registered as
166
+ * part of ENGINE_register_all_complete() for example if the methods are not
167
+ * usable as default methods.
168
+ */
169
+
170
+ #define ENGINE_FLAGS_NO_REGISTER_ALL (int)0x0008
171
+
172
+ /*
173
+ * ENGINEs can support their own command types, and these flags are used in
174
+ * ENGINE_CTRL_GET_CMD_FLAGS to indicate to the caller what kind of input
175
+ * each command expects. Currently only numeric and string input is
176
+ * supported. If a control command supports none of the _NUMERIC, _STRING, or
177
+ * _NO_INPUT options, then it is regarded as an "internal" control command -
178
+ * and not for use in config setting situations. As such, they're not
179
+ * available to the ENGINE_ctrl_cmd_string() function, only raw ENGINE_ctrl()
180
+ * access. Changes to this list of 'command types' should be reflected
181
+ * carefully in ENGINE_cmd_is_executable() and ENGINE_ctrl_cmd_string().
182
+ */
183
+
184
+ /* accepts a 'long' input value (3rd parameter to ENGINE_ctrl) */
185
+ #define ENGINE_CMD_FLAG_NUMERIC (unsigned int)0x0001
186
+ /*
187
+ * accepts string input (cast from 'void*' to 'const char *', 4th parameter
188
+ * to ENGINE_ctrl)
189
+ */
190
+ #define ENGINE_CMD_FLAG_STRING (unsigned int)0x0002
191
+ /*
192
+ * Indicates that the control command takes *no* input. Ie. the control
193
+ * command is unparameterised.
194
+ */
195
+ #define ENGINE_CMD_FLAG_NO_INPUT (unsigned int)0x0004
196
+ /*
197
+ * Indicates that the control command is internal. This control command won't
198
+ * be shown in any output, and is only usable through the ENGINE_ctrl_cmd()
199
+ * function.
200
+ */
201
+ #define ENGINE_CMD_FLAG_INTERNAL (unsigned int)0x0008
202
+
203
+ /*
204
+ * NB: These 3 control commands are deprecated and should not be used.
205
+ * ENGINEs relying on these commands should compile conditional support for
206
+ * compatibility (eg. if these symbols are defined) but should also migrate
207
+ * the same functionality to their own ENGINE-specific control functions that
208
+ * can be "discovered" by calling applications. The fact these control
209
+ * commands wouldn't be "executable" (ie. usable by text-based config)
210
+ * doesn't change the fact that application code can find and use them
211
+ * without requiring per-ENGINE hacking.
212
+ */
213
+
214
+ /*
215
+ * These flags are used to tell the ctrl function what should be done. All
216
+ * command numbers are shared between all engines, even if some don't make
217
+ * sense to some engines. In such a case, they do nothing but return the
218
+ * error ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED.
219
+ */
220
+ #define ENGINE_CTRL_SET_LOGSTREAM 1
221
+ #define ENGINE_CTRL_SET_PASSWORD_CALLBACK 2
222
+ #define ENGINE_CTRL_HUP 3 /* Close and reinitialise \
223
+ * any handles/connections \
224
+ * etc. */
225
+ #define ENGINE_CTRL_SET_USER_INTERFACE 4 /* Alternative to callback */
226
+ #define ENGINE_CTRL_SET_CALLBACK_DATA 5 /* User-specific data, used \
227
+ * when calling the password \
228
+ * callback and the user \
229
+ * interface */
230
+ #define ENGINE_CTRL_LOAD_CONFIGURATION 6 /* Load a configuration, \
231
+ * given a string that \
232
+ * represents a file name \
233
+ * or so */
234
+ #define ENGINE_CTRL_LOAD_SECTION 7 /* Load data from a given \
235
+ * section in the already \
236
+ * loaded configuration */
237
+
238
+ /*
239
+ * These control commands allow an application to deal with an arbitrary
240
+ * engine in a dynamic way. Warn: Negative return values indicate errors FOR
241
+ * THESE COMMANDS because zero is used to indicate 'end-of-list'. Other
242
+ * commands, including ENGINE-specific command types, return zero for an
243
+ * error. An ENGINE can choose to implement these ctrl functions, and can
244
+ * internally manage things however it chooses - it does so by setting the
245
+ * ENGINE_FLAGS_MANUAL_CMD_CTRL flag (using ENGINE_set_flags()). Otherwise
246
+ * the ENGINE_ctrl() code handles this on the ENGINE's behalf using the
247
+ * cmd_defns data (set using ENGINE_set_cmd_defns()). This means an ENGINE's
248
+ * ctrl() handler need only implement its own commands - the above "meta"
249
+ * commands will be taken care of.
250
+ */
251
+
252
+ /*
253
+ * Returns non-zero if the supplied ENGINE has a ctrl() handler. If "not",
254
+ * then all the remaining control commands will return failure, so it is
255
+ * worth checking this first if the caller is trying to "discover" the
256
+ * engine's capabilities and doesn't want errors generated unnecessarily.
257
+ */
258
+ #define ENGINE_CTRL_HAS_CTRL_FUNCTION 10
259
+ /*
260
+ * Returns a positive command number for the first command supported by the
261
+ * engine. Returns zero if no ctrl commands are supported.
262
+ */
263
+ #define ENGINE_CTRL_GET_FIRST_CMD_TYPE 11
264
+ /*
265
+ * The 'long' argument specifies a command implemented by the engine, and the
266
+ * return value is the next command supported, or zero if there are no more.
267
+ */
268
+ #define ENGINE_CTRL_GET_NEXT_CMD_TYPE 12
269
+ /*
270
+ * The 'void*' argument is a command name (cast from 'const char *'), and the
271
+ * return value is the command that corresponds to it.
272
+ */
273
+ #define ENGINE_CTRL_GET_CMD_FROM_NAME 13
274
+ /*
275
+ * The next two allow a command to be converted into its corresponding string
276
+ * form. In each case, the 'long' argument supplies the command. In the
277
+ * NAME_LEN case, the return value is the length of the command name (not
278
+ * counting a trailing EOL). In the NAME case, the 'void*' argument must be a
279
+ * string buffer large enough, and it will be populated with the name of the
280
+ * command (WITH a trailing EOL).
281
+ */
282
+ #define ENGINE_CTRL_GET_NAME_LEN_FROM_CMD 14
283
+ #define ENGINE_CTRL_GET_NAME_FROM_CMD 15
284
+ /* The next two are similar but give a "short description" of a command. */
285
+ #define ENGINE_CTRL_GET_DESC_LEN_FROM_CMD 16
286
+ #define ENGINE_CTRL_GET_DESC_FROM_CMD 17
287
+ /*
288
+ * With this command, the return value is the OR'd combination of
289
+ * ENGINE_CMD_FLAG_*** values that indicate what kind of input a given
290
+ * engine-specific ctrl command expects.
291
+ */
292
+ #define ENGINE_CTRL_GET_CMD_FLAGS 18
293
+
294
+ /*
295
+ * ENGINE implementations should start the numbering of their own control
296
+ * commands from this value. (ie. ENGINE_CMD_BASE, ENGINE_CMD_BASE + 1, etc).
297
+ */
298
+ #define ENGINE_CMD_BASE 200
299
+
300
+ /*
301
+ * NB: These 2 nCipher "chil" control commands are deprecated, and their
302
+ * functionality is now available through ENGINE-specific control commands
303
+ * (exposed through the above-mentioned 'CMD'-handling). Code using these 2
304
+ * commands should be migrated to the more general command handling before
305
+ * these are removed.
306
+ */
307
+
308
+ /* Flags specific to the nCipher "chil" engine */
309
+ #define ENGINE_CTRL_CHIL_SET_FORKCHECK 100
310
+ /*
311
+ * Depending on the value of the (long)i argument, this sets or
312
+ * unsets the SimpleForkCheck flag in the CHIL API to enable or
313
+ * disable checking and workarounds for applications that fork().
314
+ */
315
+ #define ENGINE_CTRL_CHIL_NO_LOCKING 101
316
+ /*
317
+ * This prevents the initialisation function from providing mutex
318
+ * callbacks to the nCipher library.
319
+ */
320
+
321
+ /*
322
+ * If an ENGINE supports its own specific control commands and wishes the
323
+ * framework to handle the above 'ENGINE_CMD_***'-manipulation commands on
324
+ * its behalf, it should supply a null-terminated array of ENGINE_CMD_DEFN
325
+ * entries to ENGINE_set_cmd_defns(). It should also implement a ctrl()
326
+ * handler that supports the stated commands (ie. the "cmd_num" entries as
327
+ * described by the array). NB: The array must be ordered in increasing order
328
+ * of cmd_num. "null-terminated" means that the last ENGINE_CMD_DEFN element
329
+ * has cmd_num set to zero and/or cmd_name set to NULL.
330
+ */
331
+ typedef struct ENGINE_CMD_DEFN_st {
332
+ unsigned int cmd_num; /* The command number */
333
+ const char *cmd_name; /* The command name itself */
334
+ const char *cmd_desc; /* A short description of the command */
335
+ unsigned int cmd_flags; /* The input the command expects */
336
+ } ENGINE_CMD_DEFN;
337
+
338
+ /* Generic function pointer */
339
+ typedef int (*ENGINE_GEN_FUNC_PTR)(void);
340
+ /* Generic function pointer taking no arguments */
341
+ typedef int (*ENGINE_GEN_INT_FUNC_PTR)(ENGINE *);
342
+ /* Specific control function pointer */
343
+ typedef int (*ENGINE_CTRL_FUNC_PTR)(ENGINE *, int, long, void *,
344
+ void (*f)(void));
345
+ /* Generic load_key function pointer */
346
+ typedef EVP_PKEY *(*ENGINE_LOAD_KEY_PTR)(ENGINE *, const char *,
347
+ UI_METHOD *ui_method,
348
+ void *callback_data);
349
+ typedef int (*ENGINE_SSL_CLIENT_CERT_PTR)(ENGINE *, SSL *ssl,
350
+ STACK_OF(X509_NAME) *ca_dn,
351
+ X509 **pcert, EVP_PKEY **pkey,
352
+ STACK_OF(X509) **pother,
353
+ UI_METHOD *ui_method,
354
+ void *callback_data);
355
+ /*-
356
+ * These callback types are for an ENGINE's handler for cipher and digest logic.
357
+ * These handlers have these prototypes;
358
+ * int foo(ENGINE *e, const EVP_CIPHER **cipher, const int **nids, int nid);
359
+ * int foo(ENGINE *e, const EVP_MD **digest, const int **nids, int nid);
360
+ * Looking at how to implement these handlers in the case of cipher support, if
361
+ * the framework wants the EVP_CIPHER for 'nid', it will call;
362
+ * foo(e, &p_evp_cipher, NULL, nid); (return zero for failure)
363
+ * If the framework wants a list of supported 'nid's, it will call;
364
+ * foo(e, NULL, &p_nids, 0); (returns number of 'nids' or -1 for error)
365
+ */
366
+ /*
367
+ * Returns to a pointer to the array of supported cipher 'nid's. If the
368
+ * second parameter is non-NULL it is set to the size of the returned array.
369
+ */
370
+ typedef int (*ENGINE_CIPHERS_PTR)(ENGINE *, const EVP_CIPHER **,
371
+ const int **, int);
372
+ typedef int (*ENGINE_DIGESTS_PTR)(ENGINE *, const EVP_MD **, const int **,
373
+ int);
374
+ typedef int (*ENGINE_PKEY_METHS_PTR)(ENGINE *, EVP_PKEY_METHOD **,
375
+ const int **, int);
376
+ typedef int (*ENGINE_PKEY_ASN1_METHS_PTR)(ENGINE *, EVP_PKEY_ASN1_METHOD **,
377
+ const int **, int);
378
+ /*
379
+ * STRUCTURE functions ... all of these functions deal with pointers to
380
+ * ENGINE structures where the pointers have a "structural reference". This
381
+ * means that their reference is to allowed access to the structure but it
382
+ * does not imply that the structure is functional. To simply increment or
383
+ * decrement the structural reference count, use ENGINE_by_id and
384
+ * ENGINE_free. NB: This is not required when iterating using ENGINE_get_next
385
+ * as it will automatically decrement the structural reference count of the
386
+ * "current" ENGINE and increment the structural reference count of the
387
+ * ENGINE it returns (unless it is NULL).
388
+ */
389
+
390
+ /* Get the first/last "ENGINE" type available. */
391
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
392
+ /* OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_first(void); */
393
+ ENGINE_FUNC_NOARGS(ENGINE *, ENGINE_get_first, NULL)
394
+
395
+ /* OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_last(void); */
396
+ ENGINE_FUNC_NOARGS(ENGINE *, ENGINE_get_last, NULL)
397
+
398
+ #endif
399
+ /* Iterate to the next/previous "ENGINE" type (NULL = end of the list). */
400
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
401
+ /* OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_next(ENGINE *e); */
402
+ ENGINE_FUNC(ENGINE *, ENGINE_get_next, (ENGINE *e), NULL)
403
+
404
+ /* OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_prev(ENGINE *e); */
405
+ ENGINE_FUNC(ENGINE *, ENGINE_get_prev, (ENGINE *e), NULL)
406
+
407
+ #endif
408
+ /* Add another "ENGINE" type into the array. */
409
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
410
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_add(ENGINE *e); */
411
+ ENGINE_FUNC(int, ENGINE_add, (ENGINE *e), 0)
412
+ #endif
413
+ /* Remove an existing "ENGINE" type from the array. */
414
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
415
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_remove(ENGINE *e); */
416
+ ENGINE_FUNC(int, ENGINE_remove, (ENGINE *e), 0)
417
+ #endif
418
+ /* Retrieve an engine from the list by its unique "id" value. */
419
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
420
+ /* OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id); */
421
+ ENGINE_FUNC(ENGINE *, ENGINE_by_id, (const char *id), NULL)
422
+ #endif
423
+
424
+ #ifndef OPENSSL_NO_DEPRECATED_1_1_0
425
+ ENGINE_FUNC_NOARGS(int, ENGINE_load_openssl, 0)
426
+ ENGINE_FUNC_NOARGS(int, ENGINE_load_dynamic, 0)
427
+ ENGINE_FUNC_NOARGS(int, ENGINE_load_cryptodev, 0)
428
+ ENGINE_FUNC_NOARGS(int, ENGINE_load_rdrand, 0)
429
+ #ifndef OPENSSL_NO_STATIC_ENGINE
430
+ ENGINE_FUNC_NOARGS(int, ENGINE_load_padlock, 0)
431
+ ENGINE_FUNC_NOARGS(int, ENGINE_load_capi, 0)
432
+ ENGINE_FUNC_NOARGS(int, ENGINE_load_afalg, 0)
433
+ #endif
434
+ #endif
435
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
436
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void); */
437
+ ENGINE_VOID_FUNC_NOARGS(ENGINE_load_builtin_engines)
438
+ #endif
439
+
440
+ /*
441
+ * Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation
442
+ * "registry" handling.
443
+ */
444
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
445
+ /* OSSL_DEPRECATEDIN_3_0 unsigned int ENGINE_get_table_flags(void); */
446
+ ENGINE_FUNC_NOARGS(unsigned int, ENGINE_get_table_flags, 0)
447
+
448
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_set_table_flags(unsigned int flags); */
449
+ ENGINE_VOID_FUNC(ENGINE_set_table_flags, (unsigned int flags))
450
+ #endif
451
+
452
+ /*- Manage registration of ENGINEs per "table". For each type, there are 3
453
+ * functions;
454
+ * ENGINE_register_***(e) - registers the implementation from 'e' (if it has one)
455
+ * ENGINE_unregister_***(e) - unregister the implementation from 'e'
456
+ * ENGINE_register_all_***() - call ENGINE_register_***() for each 'e' in the list
457
+ * Cleanup is automatically registered from each table when required.
458
+ */
459
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
460
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_register_RSA(ENGINE *e); */
461
+ ENGINE_FUNC(int, ENGINE_register_RSA, (ENGINE *e), 0)
462
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_RSA(ENGINE *e); */
463
+ ENGINE_VOID_FUNC(ENGINE_unregister_RSA, (ENGINE *e))
464
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_RSA(void); */
465
+ ENGINE_VOID_FUNC_NOARGS(ENGINE_register_all_RSA)
466
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_register_DSA(ENGINE *e); */
467
+ ENGINE_FUNC(int, ENGINE_register_DSA, (ENGINE *e), 0)
468
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_DSA(ENGINE *e); */
469
+ ENGINE_VOID_FUNC(ENGINE_unregister_DSA, (ENGINE *e))
470
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_DSA(void); */
471
+ ENGINE_VOID_FUNC_NOARGS(ENGINE_register_all_DSA)
472
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_register_EC(ENGINE *e); */
473
+ ENGINE_FUNC(int, ENGINE_register_EC, (ENGINE *e), 0)
474
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_EC(ENGINE *e); */
475
+ ENGINE_VOID_FUNC(ENGINE_unregister_EC, (ENGINE *e))
476
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_EC(void); */
477
+ ENGINE_VOID_FUNC_NOARGS(ENGINE_register_all_EC)
478
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_register_DH(ENGINE *e); */
479
+ ENGINE_FUNC(int, ENGINE_register_DH, (ENGINE *e), 0)
480
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_DH(ENGINE *e); */
481
+ ENGINE_VOID_FUNC(ENGINE_unregister_DH, (ENGINE *e))
482
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_DH(void); */
483
+ ENGINE_VOID_FUNC_NOARGS(ENGINE_register_all_DH)
484
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_register_RAND(ENGINE *e); */
485
+ ENGINE_FUNC(int, ENGINE_register_RAND, (ENGINE *e), 0)
486
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_RAND(ENGINE *e); */
487
+ ENGINE_VOID_FUNC(ENGINE_unregister_RAND, (ENGINE *e))
488
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_RAND(void); */
489
+ ENGINE_VOID_FUNC_NOARGS(ENGINE_register_all_RAND)
490
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_register_ciphers(ENGINE *e); */
491
+ ENGINE_FUNC(int, ENGINE_register_ciphers, (ENGINE *e), 0)
492
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_ciphers(ENGINE *e); */
493
+ ENGINE_VOID_FUNC(ENGINE_unregister_ciphers, (ENGINE *e))
494
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_ciphers(void); */
495
+ ENGINE_VOID_FUNC_NOARGS(ENGINE_register_all_ciphers)
496
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_register_digests(ENGINE *e); */
497
+ ENGINE_FUNC(int, ENGINE_register_digests, (ENGINE *e), 0)
498
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_digests(ENGINE *e); */
499
+ ENGINE_VOID_FUNC(ENGINE_unregister_digests, (ENGINE *e))
500
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_digests(void); */
501
+ ENGINE_VOID_FUNC_NOARGS(ENGINE_register_all_digests)
502
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_register_pkey_meths(ENGINE *e); */
503
+ ENGINE_FUNC(int, ENGINE_register_pkey_meths, (ENGINE *e), 0)
504
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_pkey_meths(ENGINE *e); */
505
+ ENGINE_VOID_FUNC(ENGINE_unregister_pkey_meths, (ENGINE *e))
506
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_pkey_meths(void); */
507
+ ENGINE_VOID_FUNC_NOARGS(ENGINE_register_all_pkey_meths)
508
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_register_pkey_asn1_meths(ENGINE *e); */
509
+ ENGINE_FUNC(int, ENGINE_register_pkey_asn1_meths, (ENGINE *e), 0)
510
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_pkey_asn1_meths(ENGINE *e); */
511
+ ENGINE_VOID_FUNC(ENGINE_unregister_pkey_asn1_meths, (ENGINE *e))
512
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_pkey_asn1_meths(void); */
513
+ ENGINE_VOID_FUNC_NOARGS(ENGINE_register_all_pkey_asn1_meths)
514
+ #endif
515
+
516
+ /*
517
+ * These functions register all support from the above categories. Note, use
518
+ * of these functions can result in static linkage of code your application
519
+ * may not need. If you only need a subset of functionality, consider using
520
+ * more selective initialisation.
521
+ */
522
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
523
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_register_complete(ENGINE *e); */
524
+ ENGINE_FUNC(int, ENGINE_register_complete, (ENGINE *e), 0)
525
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_register_all_complete(void); */
526
+ ENGINE_FUNC_NOARGS(int, ENGINE_register_all_complete, 0)
527
+ #endif
528
+
529
+ /*
530
+ * Send parameterised control commands to the engine. The possibilities to
531
+ * send down an integer, a pointer to data or a function pointer are
532
+ * provided. Any of the parameters may or may not be NULL, depending on the
533
+ * command number. In actuality, this function only requires a structural
534
+ * (rather than functional) reference to an engine, but many control commands
535
+ * may require the engine be functional. The caller should be aware of trying
536
+ * commands that require an operational ENGINE, and only use functional
537
+ * references in such situations.
538
+ */
539
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
540
+ /*
541
+ * OSSL_DEPRECATEDIN_3_0 int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p,
542
+ * void (*f) (void));
543
+ */
544
+ ENGINE_FUNC(int, ENGINE_ctrl, (ENGINE *e, int cmd, long i, void *p, void (*f)(void)), 0)
545
+ #endif
546
+
547
+ /*
548
+ * This function tests if an ENGINE-specific command is usable as a
549
+ * "setting". Eg. in an application's config file that gets processed through
550
+ * ENGINE_ctrl_cmd_string(). If this returns zero, it is not available to
551
+ * ENGINE_ctrl_cmd_string(), only ENGINE_ctrl().
552
+ */
553
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
554
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_cmd_is_executable(ENGINE *e, int cmd); */
555
+ ENGINE_FUNC(int, ENGINE_cmd_is_executable, (ENGINE *e, int cmd), 0)
556
+ #endif
557
+
558
+ /*
559
+ * This function works like ENGINE_ctrl() with the exception of taking a
560
+ * command name instead of a command number, and can handle optional
561
+ * commands. See the comment on ENGINE_ctrl_cmd_string() for an explanation
562
+ * on how to use the cmd_name and cmd_optional.
563
+ */
564
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
565
+ /*
566
+ * OSSL_DEPRECATEDIN_3_0 int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
567
+ * long i, void *p, void (*f) (void),
568
+ * int cmd_optional);
569
+ */
570
+ ENGINE_FUNC(int, ENGINE_ctrl_cmd, (ENGINE *e, const char *cmd_name, long i, void *p, void (*f)(void), int cmd_optional), 0)
571
+ #endif
572
+
573
+ /*
574
+ * This function passes a command-name and argument to an ENGINE. The
575
+ * cmd_name is converted to a command number and the control command is
576
+ * called using 'arg' as an argument (unless the ENGINE doesn't support such
577
+ * a command, in which case no control command is called). The command is
578
+ * checked for input flags, and if necessary the argument will be converted
579
+ * to a numeric value. If cmd_optional is non-zero, then if the ENGINE
580
+ * doesn't support the given cmd_name the return value will be success
581
+ * anyway. This function is intended for applications to use so that users
582
+ * (or config files) can supply engine-specific config data to the ENGINE at
583
+ * run-time to control behaviour of specific engines. As such, it shouldn't
584
+ * be used for calling ENGINE_ctrl() functions that return data, deal with
585
+ * binary data, or that are otherwise supposed to be used directly through
586
+ * ENGINE_ctrl() in application code. Any "return" data from an ENGINE_ctrl()
587
+ * operation in this function will be lost - the return value is interpreted
588
+ * as failure if the return value is zero, success otherwise, and this
589
+ * function returns a boolean value as a result. In other words, vendors of
590
+ * 'ENGINE'-enabled devices should write ENGINE implementations with
591
+ * parameterisations that work in this scheme, so that compliant ENGINE-based
592
+ * applications can work consistently with the same configuration for the
593
+ * same ENGINE-enabled devices, across applications.
594
+ */
595
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
596
+ /*
597
+ * OSSL_DEPRECATEDIN_3_0
598
+ * int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
599
+ * int cmd_optional);
600
+ */
601
+ ENGINE_FUNC(int, ENGINE_ctrl_cmd_string,
602
+ (ENGINE *e, const char *cmd_name, const char *arg, int cmd_optional), 0)
603
+ #endif
604
+
605
+ /*
606
+ * These functions are useful for manufacturing new ENGINE structures. They
607
+ * don't address reference counting at all - one uses them to populate an
608
+ * ENGINE structure with personalised implementations of things prior to
609
+ * using it directly or adding it to the builtin ENGINE list in OpenSSL.
610
+ * These are also here so that the ENGINE structure doesn't have to be
611
+ * exposed and break binary compatibility!
612
+ */
613
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
614
+ /* OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_new(void); */
615
+ ENGINE_FUNC_NOARGS(ENGINE *, ENGINE_new, NULL)
616
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_free(ENGINE *e); */
617
+ ENGINE_FUNC(int, ENGINE_free, (ENGINE *e), 0)
618
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_up_ref(ENGINE *e); */
619
+ ENGINE_FUNC(int, ENGINE_up_ref, (ENGINE *e), 0)
620
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_set_id(ENGINE *e, const char *id); */
621
+ ENGINE_FUNC(int, ENGINE_set_id, (ENGINE *e, const char *id), 0)
622
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_set_name(ENGINE *e, const char *name); */
623
+ ENGINE_FUNC(int, ENGINE_set_name, (ENGINE *e, const char *name), 0)
624
+ /*
625
+ * OSSL_DEPRECATEDIN_3_0
626
+ * int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth);
627
+ */
628
+ ENGINE_FUNC(int, ENGINE_set_RSA, (ENGINE *e, const RSA_METHOD *rsa_meth), 0)
629
+ /*
630
+ * OSSL_DEPRECATEDIN_3_0
631
+ * int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth);
632
+ */
633
+ ENGINE_FUNC(int, ENGINE_set_DSA, (ENGINE *e, const DSA_METHOD *dsa_meth), 0)
634
+ /*
635
+ * OSSL_DEPRECATEDIN_3_0
636
+ * int ENGINE_set_EC(ENGINE *e, const EC_KEY_METHOD *ecdsa_meth);
637
+ */
638
+ ENGINE_FUNC(int, ENGINE_set_EC, (ENGINE *e, const EC_KEY_METHOD *ecdsa_meth), 0)
639
+ /*
640
+ * OSSL_DEPRECATEDIN_3_0
641
+ * int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth);
642
+ */
643
+ ENGINE_FUNC(int, ENGINE_set_DH, (ENGINE *e, const DH_METHOD *dh_meth), 0)
644
+ /*
645
+ * OSSL_DEPRECATEDIN_3_0
646
+ * int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth);
647
+ */
648
+ ENGINE_FUNC(int, ENGINE_set_RAND, (ENGINE *e, const RAND_METHOD *rand_meth), 0)
649
+ /*
650
+ * OSSL_DEPRECATEDIN_3_0
651
+ * int ENGINE_set_destroy_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR destroy_f);
652
+ */
653
+ ENGINE_FUNC(int, ENGINE_set_destroy_function,
654
+ (ENGINE *e, ENGINE_GEN_INT_FUNC_PTR destroy_f), 0)
655
+ /*
656
+ * OSSL_DEPRECATEDIN_3_0
657
+ * int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f);
658
+ */
659
+ ENGINE_FUNC(int, ENGINE_set_init_function,
660
+ (ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f), 0)
661
+ /*
662
+ * OSSL_DEPRECATEDIN_3_0
663
+ * int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f);
664
+ */
665
+ ENGINE_FUNC(int, ENGINE_set_finish_function,
666
+ (ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f), 0)
667
+ /*
668
+ * OSSL_DEPRECATEDIN_3_0
669
+ * int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f);
670
+ */
671
+ ENGINE_FUNC(int, ENGINE_set_ctrl_function,
672
+ (ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f), 0)
673
+ /*
674
+ * OSSL_DEPRECATEDIN_3_0
675
+ * int ENGINE_set_load_privkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpriv_f);
676
+ */
677
+ ENGINE_FUNC(int, ENGINE_set_load_privkey_function,
678
+ (ENGINE *e, ENGINE_LOAD_KEY_PTR loadpriv_f), 0)
679
+ /*
680
+ * OSSL_DEPRECATEDIN_3_0
681
+ * int ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f);
682
+ */
683
+ ENGINE_FUNC(int, ENGINE_set_load_pubkey_function,
684
+ (ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f), 0)
685
+ /*
686
+ * OSSL_DEPRECATEDIN_3_0
687
+ * int ENGINE_set_load_ssl_client_cert_function(ENGINE *e,
688
+ * ENGINE_SSL_CLIENT_CERT_PTR loadssl_f);
689
+ */
690
+ ENGINE_FUNC(int, ENGINE_set_load_ssl_client_cert_function,
691
+ (ENGINE *e, ENGINE_SSL_CLIENT_CERT_PTR loadssl_f), 0)
692
+ /*
693
+ * OSSL_DEPRECATEDIN_3_0
694
+ * int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f);
695
+ */
696
+ ENGINE_FUNC(int, ENGINE_set_ciphers, (ENGINE *e, ENGINE_CIPHERS_PTR f), 0)
697
+ /*
698
+ * OSSL_DEPRECATEDIN_3_0
699
+ * int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f);
700
+ */
701
+ ENGINE_FUNC(int, ENGINE_set_digests, (ENGINE *e, ENGINE_DIGESTS_PTR f), 0)
702
+ /*
703
+ * OSSL_DEPRECATEDIN_3_0
704
+ * int ENGINE_set_pkey_meths(ENGINE *e, ENGINE_PKEY_METHS_PTR f);
705
+ */
706
+ ENGINE_FUNC(int, ENGINE_set_pkey_meths, (ENGINE *e, ENGINE_PKEY_METHS_PTR f), 0)
707
+ /*
708
+ * OSSL_DEPRECATEDIN_3_0
709
+ * int ENGINE_set_pkey_asn1_meths(ENGINE *e, ENGINE_PKEY_ASN1_METHS_PTR f);
710
+ */
711
+ ENGINE_FUNC(int, ENGINE_set_pkey_asn1_meths, (ENGINE *e, ENGINE_PKEY_ASN1_METHS_PTR f),
712
+ 0)
713
+ /*
714
+ * OSSL_DEPRECATEDIN_3_0 int ENGINE_set_flags(ENGINE *e, int flags);
715
+ */
716
+ ENGINE_FUNC(int, ENGINE_set_flags, (ENGINE *e, int flags), 0)
717
+ /*
718
+ * OSSL_DEPRECATEDIN_3_0
719
+ * int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns);
720
+ */
721
+ ENGINE_FUNC(int, ENGINE_set_cmd_defns, (ENGINE *e, const ENGINE_CMD_DEFN *defns), 0)
722
+ #endif
723
+ /* These functions allow control over any per-structure ENGINE data. */
724
+ #ifndef OPENSSL_ENGINE_STUBS
725
+ #define ENGINE_get_ex_new_index(l, p, newf, dupf, freef) \
726
+ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_ENGINE, l, p, newf, dupf, freef)
727
+ #else
728
+ ENGINE_FUNC(int, ENGINE_get_ex_new_index, (long l, void *p, CRYPTO_EX_new *newf, CRYPTO_EX_dup *dupf, CRYPTO_EX_free *freef), 0)
729
+ #endif
730
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
731
+ /*
732
+ * OSSL_DEPRECATEDIN_3_0
733
+ * int ENGINE_set_ex_data(ENGINE *e, int idx, void *arg);
734
+ */
735
+ ENGINE_FUNC(int, ENGINE_set_ex_data, (ENGINE *e, int idx, void *arg), 0)
736
+ /* OSSL_DEPRECATEDIN_3_0 void *ENGINE_get_ex_data(const ENGINE *e, int idx); */
737
+ ENGINE_FUNC(void *, ENGINE_get_ex_data, (ENGINE *e, int idx), NULL)
738
+ #endif
739
+
740
+ #ifndef OPENSSL_NO_DEPRECATED_1_1_0
741
+ /*
742
+ * This function previously cleaned up anything that needs it. Auto-deinit will
743
+ * now take care of it so it is no longer required to call this function.
744
+ */
745
+ #define ENGINE_cleanup() \
746
+ while (0) \
747
+ continue
748
+ #endif
749
+
750
+ /*
751
+ * These return values from within the ENGINE structure. These can be useful
752
+ * with functional references as well as structural references - it depends
753
+ * which you obtained. Using the result for functional purposes if you only
754
+ * obtained a structural reference may be problematic!
755
+ */
756
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
757
+ /* OSSL_DEPRECATEDIN_3_0 const char *ENGINE_get_id(const ENGINE *e); */
758
+ ENGINE_FUNC(const char *, ENGINE_get_id, (const ENGINE *e), NULL)
759
+ /* OSSL_DEPRECATEDIN_3_0 const char *ENGINE_get_name(const ENGINE *e); */
760
+ ENGINE_FUNC(const char *, ENGINE_get_name, (const ENGINE *e), NULL)
761
+ /* OSSL_DEPRECATEDIN_3_0 const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e); */
762
+ ENGINE_FUNC(const RSA_METHOD *, ENGINE_get_RSA, (const ENGINE *e), NULL)
763
+ /* OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e); */
764
+ ENGINE_FUNC(const DSA_METHOD *, ENGINE_get_DSA, (const ENGINE *e), NULL)
765
+ /* OSSL_DEPRECATEDIN_3_0 const EC_KEY_METHOD *ENGINE_get_EC(const ENGINE *e); */
766
+ ENGINE_FUNC(const EC_KEY_METHOD *, ENGINE_get_EC, (const ENGINE *e), NULL)
767
+ /* OSSL_DEPRECATEDIN_3_0 const DH_METHOD *ENGINE_get_DH(const ENGINE *e); */
768
+ ENGINE_FUNC(const DH_METHOD *, ENGINE_get_DH, (const ENGINE *e), NULL)
769
+ /* OSSL_DEPRECATEDIN_3_0 const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e); */
770
+ ENGINE_FUNC(const RAND_METHOD *, ENGINE_get_RAND, (const ENGINE *e), NULL)
771
+ /*
772
+ * OSSL_DEPRECATEDIN_3_0
773
+ * ENGINE_GEN_INT_FUNC_PTR ENGINE_get_destroy_function(const ENGINE *e);
774
+ */
775
+ ENGINE_FUNC(ENGINE_GEN_INT_FUNC_PTR, ENGINE_get_destroy_function,
776
+ (const ENGINE *e), NULL)
777
+ /*
778
+ * OSSL_DEPRECATEDIN_3_0
779
+ * ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(const ENGINE *e);
780
+ */
781
+ ENGINE_FUNC(ENGINE_GEN_INT_FUNC_PTR, ENGINE_get_init_function,
782
+ (const ENGINE *e), NULL)
783
+ /*
784
+ * OSSL_DEPRECATEDIN_3_0
785
+ * ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(const ENGINE *e);
786
+ */
787
+ ENGINE_FUNC(ENGINE_GEN_INT_FUNC_PTR, ENGINE_get_finish_function,
788
+ (const ENGINE *e), NULL)
789
+ /*
790
+ * OSSL_DEPRECATEDIN_3_0
791
+ * ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(const ENGINE *e);
792
+ */
793
+ ENGINE_FUNC(ENGINE_CTRL_FUNC_PTR, ENGINE_get_ctrl_function,
794
+ (const ENGINE *e), NULL)
795
+ /*
796
+ * OSSL_DEPRECATEDIN_3_0
797
+ * ENGINE_LOAD_KEY_PTR ENGINE_get_load_privkey_function(const ENGINE *e);
798
+ */
799
+ ENGINE_FUNC(ENGINE_LOAD_KEY_PTR, ENGINE_get_load_privkey_function,
800
+ (const ENGINE *e), NULL)
801
+ /*
802
+ * OSSL_DEPRECATEDIN_3_0
803
+ * ENGINE_LOAD_KEY_PTR ENGINE_get_load_pubkey_function(const ENGINE *e);
804
+ */
805
+ ENGINE_FUNC(ENGINE_LOAD_KEY_PTR, ENGINE_get_load_pubkey_function,
806
+ (const ENGINE *e), NULL)
807
+ /*
808
+ * OSSL_DEPRECATEDIN_3_0 ENGINE_SSL_CLIENT_CERT_PTR
809
+ * ENGINE_get_ssl_client_cert_function(const ENGINE *e);
810
+ */
811
+ ENGINE_FUNC(ENGINE_SSL_CLIENT_CERT_PTR, ENGINE_get_ssl_client_cert_function,
812
+ (const ENGINE *e), NULL)
813
+ /*
814
+ * OSSL_DEPRECATEDIN_3_0
815
+ * ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e);
816
+ */
817
+ ENGINE_FUNC(ENGINE_CIPHERS_PTR, ENGINE_get_ciphers,
818
+ (const ENGINE *e), NULL)
819
+ /*
820
+ * OSSL_DEPRECATEDIN_3_0
821
+ * ENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e);
822
+ */
823
+ ENGINE_FUNC(ENGINE_DIGESTS_PTR, ENGINE_get_digests,
824
+ (const ENGINE *e), NULL)
825
+ /*
826
+ * OSSL_DEPRECATEDIN_3_0
827
+ * ENGINE_PKEY_METHS_PTR ENGINE_get_pkey_meths(const ENGINE *e);
828
+ */
829
+ ENGINE_FUNC(ENGINE_PKEY_METHS_PTR, ENGINE_get_pkey_meths,
830
+ (const ENGINE *e), NULL)
831
+ /*
832
+ * OSSL_DEPRECATEDIN_3_0
833
+ * ENGINE_PKEY_ASN1_METHS_PTR ENGINE_get_pkey_asn1_meths(const ENGINE *e);
834
+ */
835
+ ENGINE_FUNC(ENGINE_PKEY_ASN1_METHS_PTR, ENGINE_get_pkey_asn1_meths,
836
+ (const ENGINE *e), NULL)
837
+ /*
838
+ * OSSL_DEPRECATEDIN_3_0
839
+ * const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid);
840
+ */
841
+ ENGINE_FUNC(const EVP_CIPHER *, ENGINE_get_cipher,
842
+ (ENGINE *e, int nid), NULL)
843
+ /*
844
+ * OSSL_DEPRECATEDIN_3_0
845
+ * const EVP_MD *ENGINE_get_digest(ENGINE *e, int nid);
846
+ */
847
+ ENGINE_FUNC(const EVP_MD *, ENGINE_get_digest,
848
+ (ENGINE *e, int nid), NULL)
849
+ /*
850
+ * OSSL_DEPRECATEDIN_3_0
851
+ * const EVP_PKEY_METHOD *ENGINE_get_pkey_meth(ENGINE *e, int nid);
852
+ */
853
+ ENGINE_FUNC(const EVP_PKEY_METHOD *, ENGINE_get_pkey_meth,
854
+ (ENGINE *e, int nid), NULL)
855
+ /*
856
+ * OSSL_DEPRECATEDIN_3_0
857
+ * const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth(ENGINE *e, int nid);
858
+ */
859
+ ENGINE_FUNC(const EVP_PKEY_ASN1_METHOD *, ENGINE_get_pkey_asn1_meth,
860
+ (ENGINE *e, int nid), NULL)
861
+ /*
862
+ * OSSL_DEPRECATEDIN_3_0
863
+ * const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e,
864
+ * const char *str, int len);
865
+ */
866
+ ENGINE_FUNC(const EVP_PKEY_ASN1_METHOD *, ENGINE_get_pkey_asn1_meth_str,
867
+ (ENGINE *e, const char *str, int len), NULL)
868
+ /*
869
+ * OSSL_DEPRECATEDIN_3_0
870
+ * const EVP_PKEY_ASN1_METHOD *ENGINE_pkey_asn1_find_str(ENGINE **pe,
871
+ * const char *str, int len);
872
+ */
873
+ ENGINE_FUNC(const EVP_PKEY_ASN1_METHOD *, ENGINE_pkey_asn1_find_str,
874
+ (ENGINE **pe, const char *str, int len), NULL)
875
+ /*
876
+ * OSSL_DEPRECATEDIN_3_0
877
+ * const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e);
878
+ */
879
+ ENGINE_FUNC(const ENGINE_CMD_DEFN *, ENGINE_get_cmd_defns,
880
+ (const ENGINE *e), NULL)
881
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_get_flags(const ENGINE *e); */
882
+ ENGINE_FUNC(int, ENGINE_get_flags, (const ENGINE *e), 0)
883
+ #endif
884
+
885
+ /*
886
+ * FUNCTIONAL functions. These functions deal with ENGINE structures that
887
+ * have (or will) be initialised for use. Broadly speaking, the structural
888
+ * functions are useful for iterating the list of available engine types,
889
+ * creating new engine types, and other "list" operations. These functions
890
+ * actually deal with ENGINEs that are to be used. As such these functions
891
+ * can fail (if applicable) when particular engines are unavailable - eg. if
892
+ * a hardware accelerator is not attached or not functioning correctly. Each
893
+ * ENGINE has 2 reference counts; structural and functional. Every time a
894
+ * functional reference is obtained or released, a corresponding structural
895
+ * reference is automatically obtained or released too.
896
+ */
897
+
898
+ /*
899
+ * Initialise an engine type for use (or up its reference count if it's
900
+ * already in use). This will fail if the engine is not currently operational
901
+ * and cannot initialise.
902
+ */
903
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
904
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e); */
905
+ ENGINE_FUNC(int, ENGINE_init, (ENGINE *e), 0)
906
+ #endif
907
+ /*
908
+ * Free a functional reference to an engine type. This does not require a
909
+ * corresponding call to ENGINE_free as it also releases a structural
910
+ * reference.
911
+ */
912
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
913
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_finish(ENGINE *e); */
914
+ ENGINE_FUNC(int, ENGINE_finish, (ENGINE *e), 0)
915
+ #endif
916
+
917
+ /*
918
+ * The following functions handle keys that are stored in some secondary
919
+ * location, handled by the engine. The storage may be on a card or
920
+ * whatever.
921
+ */
922
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
923
+ /*
924
+ * OSSL_DEPRECATEDIN_3_0
925
+ * EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
926
+ * UI_METHOD *ui_method, void *callback_data);
927
+ */
928
+ ENGINE_FUNC(EVP_PKEY *, ENGINE_load_private_key,
929
+ (ENGINE *e, const char *key_id, UI_METHOD *ui_method,
930
+ void *callback_data),
931
+ NULL)
932
+ /*
933
+ * OSSL_DEPRECATEDIN_3_0
934
+ * EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id,
935
+ * UI_METHOD *ui_method, void *callback_data);
936
+ */
937
+ ENGINE_FUNC(EVP_PKEY *, ENGINE_load_public_key,
938
+ (ENGINE *e, const char *key_id, UI_METHOD *ui_method,
939
+ void *callback_data),
940
+ NULL)
941
+ /*
942
+ * OSSL_DEPRECATEDIN_3_0
943
+ * int ENGINE_load_ssl_client_cert(ENGINE *e, SSL *s, STACK_OF(X509_NAME) *ca_dn,
944
+ * X509 **pcert, EVP_PKEY **ppkey,
945
+ * STACK_OF(X509) **pother,
946
+ * UI_METHOD *ui_method, void *callback_data);
947
+ */
948
+ ENGINE_FUNC(int, ENGINE_load_ssl_client_cert,
949
+ (ENGINE *e, SSL *s, STACK_OF(X509_NAME) *ca_dn, X509 **pcert,
950
+ EVP_PKEY **ppkey, STACK_OF(X509) **pother, UI_METHOD *ui_method,
951
+ void *callback_data),
952
+ 0)
953
+ #endif
954
+
955
+ /*
956
+ * This returns a pointer for the current ENGINE structure that is (by
957
+ * default) performing any RSA operations. The value returned is an
958
+ * incremented reference, so it should be free'd (ENGINE_finish) before it is
959
+ * discarded.
960
+ */
961
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
962
+ /* OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_default_RSA(void); */
963
+ ENGINE_FUNC_NOARGS(ENGINE *, ENGINE_get_default_RSA, NULL)
964
+ #endif
965
+ /* Same for the other "methods" */
966
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
967
+ /* OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_default_DSA(void); */
968
+ ENGINE_FUNC_NOARGS(ENGINE *, ENGINE_get_default_DSA, NULL)
969
+ /* OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_default_EC(void); */
970
+ ENGINE_FUNC_NOARGS(ENGINE *, ENGINE_get_default_EC, NULL)
971
+ /* OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_default_DH(void); */
972
+ ENGINE_FUNC_NOARGS(ENGINE *, ENGINE_get_default_DH, NULL)
973
+ /* OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_default_RAND(void); */
974
+ ENGINE_FUNC_NOARGS(ENGINE *, ENGINE_get_default_RAND, NULL)
975
+ #endif
976
+ /*
977
+ * These functions can be used to get a functional reference to perform
978
+ * ciphering or digesting corresponding to "nid".
979
+ */
980
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
981
+ /* OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_cipher_engine(int nid); */
982
+ ENGINE_FUNC(ENGINE *, ENGINE_get_cipher_engine, (int nid), NULL)
983
+ /* OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_digest_engine(int nid); */
984
+ ENGINE_FUNC(ENGINE *, ENGINE_get_digest_engine, (int nid), NULL)
985
+ /* OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_pkey_meth_engine(int nid); */
986
+ ENGINE_FUNC(ENGINE *, ENGINE_get_pkey_meth_engine, (int nid), NULL)
987
+ /* OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_pkey_asn1_meth_engine(int nid); */
988
+ ENGINE_FUNC(ENGINE *, ENGINE_get_pkey_asn1_meth_engine, (int nid), NULL)
989
+ #endif
990
+
991
+ /*
992
+ * This sets a new default ENGINE structure for performing RSA operations. If
993
+ * the result is non-zero (success) then the ENGINE structure will have had
994
+ * its reference count up'd so the caller should still free their own
995
+ * reference 'e'.
996
+ */
997
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
998
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_RSA(ENGINE *e); */
999
+ ENGINE_FUNC(int, ENGINE_set_default_RSA, (ENGINE *e), 0)
1000
+ /*
1001
+ * OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_string(ENGINE *e,
1002
+ * const char *def_list);
1003
+ */
1004
+ ENGINE_FUNC(int, ENGINE_set_default_string, (ENGINE *e, const char *def_list), 0)
1005
+ #endif
1006
+ /* Same for the other "methods" */
1007
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
1008
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_DSA(ENGINE *e); */
1009
+ ENGINE_FUNC(int, ENGINE_set_default_DSA, (ENGINE *e), 0)
1010
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_EC(ENGINE *e); */
1011
+ ENGINE_FUNC(int, ENGINE_set_default_EC, (ENGINE *e), 0)
1012
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_DH(ENGINE *e); */
1013
+ ENGINE_FUNC(int, ENGINE_set_default_DH, (ENGINE *e), 0)
1014
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_RAND(ENGINE *e); */
1015
+ ENGINE_FUNC(int, ENGINE_set_default_RAND, (ENGINE *e), 0)
1016
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_ciphers(ENGINE *e); */
1017
+ ENGINE_FUNC(int, ENGINE_set_default_ciphers, (ENGINE *e), 0)
1018
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_digests(ENGINE *e); */
1019
+ ENGINE_FUNC(int, ENGINE_set_default_digests, (ENGINE *e), 0)
1020
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_pkey_meths(ENGINE *e); */
1021
+ ENGINE_FUNC(int, ENGINE_set_default_pkey_meths, (ENGINE *e), 0)
1022
+ /* OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_pkey_asn1_meths(ENGINE *e); */
1023
+ ENGINE_FUNC(int, ENGINE_set_default_pkey_asn1_meths, (ENGINE *e), 0)
1024
+ #endif
1025
+
1026
+ /*
1027
+ * The combination "set" - the flags are bitwise "OR"d from the
1028
+ * ENGINE_METHOD_*** defines above. As with the "ENGINE_register_complete()"
1029
+ * function, this function can result in unnecessary static linkage. If your
1030
+ * application requires only specific functionality, consider using more
1031
+ * selective functions.
1032
+ */
1033
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
1034
+ /*
1035
+ * OSSL_DEPRECATEDIN_3_0
1036
+ * int ENGINE_set_default(ENGINE *e, unsigned int flags);
1037
+ */
1038
+ ENGINE_FUNC(int, ENGINE_set_default, (ENGINE *e, unsigned int flags), 0)
1039
+ /* OSSL_DEPRECATEDIN_3_0 void ENGINE_add_conf_module(void); */
1040
+ ENGINE_VOID_FUNC_NOARGS(ENGINE_add_conf_module)
1041
+ #endif
1042
+
1043
+ /* Deprecated functions ... */
1044
+ /* int ENGINE_clear_defaults(void); */
1045
+
1046
+ /**************************/
1047
+ /* DYNAMIC ENGINE SUPPORT */
1048
+ /**************************/
1049
+
1050
+ /* Binary/behaviour compatibility levels */
1051
+ #define OSSL_DYNAMIC_VERSION (unsigned long)0x00030000
1052
+ /*
1053
+ * Binary versions older than this are too old for us (whether we're a loader
1054
+ * or a loadee)
1055
+ */
1056
+ #define OSSL_DYNAMIC_OLDEST (unsigned long)0x00030000
1057
+
1058
+ /*
1059
+ * When compiling an ENGINE entirely as an external shared library, loadable
1060
+ * by the "dynamic" ENGINE, these types are needed. The 'dynamic_fns'
1061
+ * structure type provides the calling application's (or library's) error
1062
+ * functionality and memory management function pointers to the loaded
1063
+ * library. These should be used/set in the loaded library code so that the
1064
+ * loading application's 'state' will be used/changed in all operations. The
1065
+ * 'static_state' pointer allows the loaded library to know if it shares the
1066
+ * same static data as the calling application (or library), and thus whether
1067
+ * these callbacks need to be set or not.
1068
+ */
1069
+ typedef void *(*dyn_MEM_malloc_fn)(size_t, const char *, int);
1070
+ typedef void *(*dyn_MEM_realloc_fn)(void *, size_t, const char *, int);
1071
+ typedef void (*dyn_MEM_free_fn)(void *, const char *, int);
1072
+ typedef struct st_dynamic_MEM_fns {
1073
+ dyn_MEM_malloc_fn malloc_fn;
1074
+ dyn_MEM_realloc_fn realloc_fn;
1075
+ dyn_MEM_free_fn free_fn;
1076
+ } dynamic_MEM_fns;
1077
+ /*
1078
+ * FIXME: Perhaps the memory and locking code (crypto.h) should declare and
1079
+ * use these types so we (and any other dependent code) can simplify a bit??
1080
+ */
1081
+ /* The top-level structure */
1082
+ typedef struct st_dynamic_fns {
1083
+ void *static_state;
1084
+ dynamic_MEM_fns mem_fns;
1085
+ } dynamic_fns;
1086
+
1087
+ /*
1088
+ * The version checking function should be of this prototype.
1089
+ * As a stub, this function returns zero, it indicates a (potential) version
1090
+ * incompatibility and the loaded library doesn't believe it can proceed.
1091
+ * The function is expected to be implemented with the symbol name "v_check",
1092
+ * and a default implementation can be fully instantiated with
1093
+ * IMPLEMENT_DYNAMIC_CHECK_FN().
1094
+ */
1095
+ typedef unsigned long (*dynamic_v_check_fn)(unsigned long ossl_version);
1096
+ #define IMPLEMENT_DYNAMIC_CHECK_FN() \
1097
+ OPENSSL_EXPORT unsigned long v_check(unsigned long v); \
1098
+ OPENSSL_EXPORT unsigned long v_check(unsigned long v) \
1099
+ { \
1100
+ return 0; \
1101
+ }
1102
+
1103
+ /*
1104
+ * This function is passed the ENGINE structure to initialise with its own
1105
+ * function and command settings. It should not adjust the structural or
1106
+ * functional reference counts. As a stub, this function returns zero, the load
1107
+ * will be aborted. The function is expected to be implemented with the symbol
1108
+ * name "bind_engine". A standard implementation
1109
+ * can be instantiated with IMPLEMENT_DYNAMIC_BIND_FN(fn) where the parameter
1110
+ * 'fn' is a callback function that populates the ENGINE structure and
1111
+ * returns an int value (zero for failure). 'fn' should have prototype;
1112
+ * [static] int fn(ENGINE *e, const char *id);
1113
+ */
1114
+ typedef int (*dynamic_bind_engine)(ENGINE *e, const char *id,
1115
+ const dynamic_fns *fns);
1116
+ #define IMPLEMENT_DYNAMIC_BIND_FN(fn) \
1117
+ OPENSSL_EXPORT \
1118
+ int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns); \
1119
+ OPENSSL_EXPORT \
1120
+ int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) \
1121
+ { \
1122
+ return 0; \
1123
+ }
1124
+
1125
+ /*
1126
+ * If the loading application (or library) and the loaded ENGINE library
1127
+ * share the same static data (eg. they're both dynamically linked to the
1128
+ * same libcrypto.so) we need a way to avoid trying to set system callbacks -
1129
+ * this would fail, and for the same reason that it's unnecessary to try. If
1130
+ * the loaded ENGINE has (or gets from through the loader) its own copy of
1131
+ * the libcrypto static data, we will need to set the callbacks. The easiest
1132
+ * way to detect this is to have a function that returns a pointer to some
1133
+ * static data and let the loading application and loaded ENGINE compare
1134
+ * their respective values.
1135
+ */
1136
+ /* void *ENGINE_get_static_state(void); */
1137
+ ENGINE_FUNC_NOARGS(void *, ENGINE_get_static_state, NULL)
1138
+
1139
+ #if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
1140
+ #ifndef OPENSSL_NO_DEPRECATED_1_1_0
1141
+ /* OSSL_DEPRECATEDIN_1_1_0 void ENGINE_setup_bsd_cryptodev(void); */
1142
+ ENGINE_VOID_FUNC_NOARGS(ENGINE_setup_bsd_cryptodev)
1143
+ #endif
1144
+ #endif
1145
+
1146
+ /*
1147
+ * Stubs for ENGINE-related API functions that were removed
1148
+ * from other headers.
1149
+ */
1150
+
1151
+ #ifndef OPENSSL_NO_DEPRECATED_3_0
1152
+ /* int EVP_PKEY_set1_engine(EVP_PKEY *pkey, ENGINE *e); */
1153
+ ENGINE_FUNC(int, EVP_PKEY_set1_engine, (EVP_PKEY *pkey, ENGINE *e), 0)
1154
+
1155
+ /* ENGINE *EVP_PKEY_get0_engine(const EVP_PKEY *pkey); */
1156
+ ENGINE_FUNC(ENGINE *, EVP_PKEY_get0_engine, (const EVP_PKEY *pkey), NULL)
1157
+
1158
+ /* ENGINE *DH_get0_engine(DH *d); */
1159
+ ENGINE_FUNC(ENGINE *, DH_get0_engine, (DH *d), NULL)
1160
+
1161
+ /* ENGINE *RSA_get0_engine(const RSA *r); */
1162
+ ENGINE_FUNC(ENGINE *, RSA_get0_engine, (const RSA *r), NULL)
1163
+
1164
+ /* ENGINE *DSA_get0_engine(DSA *d); */
1165
+ ENGINE_FUNC(ENGINE *, DSA_get0_engine, (DSA *d), NULL)
1166
+
1167
+ /* ENGINE *EC_KEY_get0_engine(const EC_KEY *eckey); */
1168
+ ENGINE_FUNC(ENGINE *, EC_KEY_get0_engine, (const EC_KEY *eckey), NULL)
1169
+
1170
+ /* const ENGINE *OSSL_STORE_LOADER_get0_engine(const OSSL_STORE_LOADER *loader); */
1171
+ ENGINE_FUNC(const ENGINE *, OSSL_STORE_LOADER_get0_engine, (const OSSL_STORE_LOADER *loader),
1172
+ NULL)
1173
+
1174
+ /* int RAND_set_rand_engine(ENGINE *engine); */
1175
+ ENGINE_FUNC(int, RAND_set_rand_engine, (ENGINE *engine), 0)
1176
+
1177
+ /* int ERR_load_ENGINE_strings(void); */
1178
+ ENGINE_FUNC_NOARGS(int, ERR_load_ENGINE_strings, 1)
1179
+ #endif
1180
+
1181
+ /*
1182
+ * int TS_CONF_set_crypto_device(CONF *conf, const char *section,
1183
+ * const char *device);
1184
+ */
1185
+ ENGINE_FUNC(int, TS_CONF_set_crypto_device,
1186
+ (CONF *conf, const char *section, const char *device), 0)
1187
+
1188
+ /* int TS_CONF_set_default_engine(const char *name); */
1189
+ ENGINE_FUNC(int, TS_CONF_set_default_engine, (const char *name), 0)
1190
+
1191
+ /* int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e); */
1192
+ ENGINE_FUNC(int, SSL_CTX_set_client_cert_engine, (SSL_CTX *ctx, ENGINE *e), 0)
1193
+
1194
+ #ifdef __cplusplus
1195
+ }
1196
+ #endif
1197
+
1198
+ #undef ENGINE_INFO_MSG
1199
+ #undef ENGINE_FUNC
1200
+ #undef ENGINE_VOID_FUNC
1201
+ #undef ENGINE_FUNC_NOARGS
1202
+ #undef ENGINE_VOID_FUNC_NOARGS
1203
+
1204
+ #if defined(__GNUC__)
1205
+ #pragma GCC diagnostic pop
1206
+ #elif defined(__clang__)
1207
+ #pragma clang diagnostic pop
1208
+ #endif
1209
+
1210
+ #endif
1211
+ #endif /* OPENSSL_ENGINE_H */