2
0

module_exports.c.template 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. /* module_exports.c.template -- static preamble for dynamically generated
  2. * module_exports.c (see Kbuild)
  3. *
  4. * Copyright (C) 2006-2024 wolfSSL Inc.
  5. *
  6. * This file is part of wolfSSL.
  7. *
  8. * wolfSSL is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * wolfSSL is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  21. */
  22. #ifdef HAVE_CONFIG_H
  23. #include <config.h>
  24. #endif
  25. #include <wolfssl/wolfcrypt/settings.h>
  26. #ifdef HAVE_FIPS
  27. #define FIPS_NO_WRAPPERS
  28. #endif
  29. #include <wolfssl/wolfcrypt/error-crypt.h>
  30. #ifndef WOLFCRYPT_ONLY
  31. #include <wolfssl/ssl.h>
  32. #include <wolfssl/internal.h>
  33. #endif
  34. #ifndef NO_CRYPT_TEST
  35. #include <wolfcrypt/test/test.h>
  36. #include <linux/delay.h>
  37. #endif
  38. #ifndef EXPORT_SYMBOL_NS
  39. #define EXPORT_SYMBOL_NS(sym, ns) EXPORT_SYMBOL(sym)
  40. #endif
  41. #ifndef EXPORT_SYMBOL_NS_GPL
  42. #define EXPORT_SYMBOL_NS_GPL(sym, ns) EXPORT_SYMBOL_GPL(sym)
  43. #endif
  44. #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0))
  45. #define EXPORT_SYMBOL_NS_Q(x) #x
  46. #else
  47. #define EXPORT_SYMBOL_NS_Q(x) x
  48. #endif
  49. #include <wolfssl/wolfcrypt/memory.h>
  50. #include <wolfssl/wolfcrypt/wc_port.h>
  51. #include <wolfssl/wolfcrypt/logging.h>
  52. #include <wolfssl/wolfcrypt/types.h>
  53. #include <wolfssl/wolfcrypt/wolfmath.h>
  54. #include <wolfssl/wolfcrypt/asn.h>
  55. #include <wolfssl/wolfcrypt/md2.h>
  56. #include <wolfssl/wolfcrypt/md5.h>
  57. #include <wolfssl/wolfcrypt/md4.h>
  58. #include <wolfssl/wolfcrypt/sha.h>
  59. #include <wolfssl/wolfcrypt/sha256.h>
  60. #include <wolfssl/wolfcrypt/sha512.h>
  61. #ifdef WOLFSSL_SIPHASH
  62. #include <wolfssl/wolfcrypt/siphash.h>
  63. #endif
  64. #include <wolfssl/wolfcrypt/arc4.h>
  65. #if defined(WC_NO_RNG)
  66. #include <wolfssl/wolfcrypt/integer.h>
  67. #else
  68. #include <wolfssl/wolfcrypt/random.h>
  69. #endif
  70. #include <wolfssl/wolfcrypt/coding.h>
  71. #include <wolfssl/wolfcrypt/signature.h>
  72. #include <wolfssl/wolfcrypt/rsa.h>
  73. #include <wolfssl/wolfcrypt/des3.h>
  74. #include <wolfssl/wolfcrypt/aes.h>
  75. #include <wolfssl/wolfcrypt/wc_encrypt.h>
  76. #include <wolfssl/wolfcrypt/cmac.h>
  77. #include <wolfssl/wolfcrypt/poly1305.h>
  78. #include <wolfssl/wolfcrypt/camellia.h>
  79. #include <wolfssl/wolfcrypt/hmac.h>
  80. #include <wolfssl/wolfcrypt/dh.h>
  81. #include <wolfssl/wolfcrypt/dsa.h>
  82. #include <wolfssl/wolfcrypt/srp.h>
  83. #include <wolfssl/wolfcrypt/chacha.h>
  84. #include <wolfssl/wolfcrypt/chacha20_poly1305.h>
  85. #include <wolfssl/wolfcrypt/pwdbased.h>
  86. #include <wolfssl/wolfcrypt/ripemd.h>
  87. #include <wolfssl/wolfcrypt/error-crypt.h>
  88. #ifdef HAVE_ECC
  89. #include <wolfssl/wolfcrypt/ecc.h>
  90. #endif
  91. #ifdef HAVE_HPKE
  92. #include <wolfssl/wolfcrypt/hpke.h>
  93. #endif
  94. #ifdef HAVE_CURVE25519
  95. #include <wolfssl/wolfcrypt/curve25519.h>
  96. #endif
  97. #ifdef HAVE_ED25519
  98. #include <wolfssl/wolfcrypt/ed25519.h>
  99. #endif
  100. #ifdef HAVE_CURVE448
  101. #include <wolfssl/wolfcrypt/curve448.h>
  102. #endif
  103. #ifdef HAVE_ED448
  104. #include <wolfssl/wolfcrypt/ed448.h>
  105. #endif
  106. #if defined(HAVE_BLAKE2) || defined(HAVE_BLAKE2S)
  107. #include <wolfssl/wolfcrypt/blake2.h>
  108. #endif
  109. #ifdef WOLFSSL_SHA3
  110. #include <wolfssl/wolfcrypt/sha3.h>
  111. #endif
  112. #ifdef HAVE_LIBZ
  113. #include <wolfssl/wolfcrypt/compress.h>
  114. #endif
  115. #ifdef HAVE_PKCS7
  116. #include <wolfssl/wolfcrypt/pkcs7.h>
  117. #endif
  118. #ifdef HAVE_PKCS12
  119. #include <wolfssl/wolfcrypt/pkcs12.h>
  120. #endif
  121. #ifdef HAVE_FIPS
  122. #include <wolfssl/wolfcrypt/fips.h>
  123. #include <wolfssl/wolfcrypt/fips_test.h>
  124. #endif
  125. #ifdef HAVE_SELFTEST
  126. #include <wolfssl/wolfcrypt/selftest.h>
  127. #endif
  128. #ifdef WOLFSSL_ASYNC_CRYPT
  129. #include <wolfssl/wolfcrypt/async.h>
  130. #endif
  131. #if defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE)
  132. #include <wolfssl/wolfcrypt/logging.h>
  133. #endif
  134. #ifdef WOLFSSL_IMX6_CAAM_BLOB
  135. #include <wolfssl/wolfcrypt/port/caam/wolfcaam.h>
  136. #endif
  137. #ifdef WOLF_CRYPTO_CB
  138. #include <wolfssl/wolfcrypt/cryptocb.h>
  139. #ifdef HAVE_INTEL_QA_SYNC
  140. #include <wolfssl/wolfcrypt/port/intel/quickassist_sync.h>
  141. #endif
  142. #ifdef HAVE_CAVIUM_OCTEON_SYNC
  143. #include <wolfssl/wolfcrypt/port/cavium/cavium_octeon_sync.h>
  144. #endif
  145. #endif
  146. #ifndef NO_KDF
  147. #include <wolfssl/wolfcrypt/kdf.h>
  148. #endif
  149. #ifdef WOLFSSL_HAVE_KYBER
  150. #include <wolfssl/wolfcrypt/kyber.h>
  151. #ifdef WOLFSSL_WC_KYBER
  152. #include <wolfssl/wolfcrypt/wc_kyber.h>
  153. #endif
  154. #endif
  155. #if defined(WOLFSSL_HAVE_XMSS)
  156. #include <wolfssl/wolfcrypt/xmss.h>
  157. #ifdef HAVE_LIBXMSS
  158. #include <wolfssl/wolfcrypt/ext_xmss.h>
  159. #else
  160. #include <wolfssl/wolfcrypt/wc_xmss.h>
  161. #endif
  162. #endif
  163. #if defined(WOLFSSL_HAVE_LMS)
  164. #include <wolfssl/wolfcrypt/lms.h>
  165. #ifdef HAVE_LIBLMS
  166. #include <wolfssl/wolfcrypt/ext_lms.h>
  167. #else
  168. #include <wolfssl/wolfcrypt/wc_lms.h>
  169. #endif
  170. #endif
  171. #ifdef HAVE_DILITHIUM
  172. #include <wolfssl/wolfcrypt/dilithium.h>
  173. #endif
  174. #ifdef OPENSSL_EXTRA
  175. #ifndef WOLFCRYPT_ONLY
  176. #include <wolfssl/openssl/evp.h>
  177. #endif
  178. #include <wolfssl/openssl/rand.h>
  179. #include <wolfssl/openssl/hmac.h>
  180. #include <wolfssl/openssl/aes.h>
  181. #include <wolfssl/openssl/des.h>
  182. #include <wolfssl/openssl/modes.h>
  183. #include <wolfssl/openssl/rc4.h>
  184. #endif
  185. #if defined(NO_FILESYSTEM)
  186. #if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \
  187. !defined(USE_CERT_BUFFERS_3072) && !defined(USE_CERT_BUFFERS_4096)
  188. #define USE_CERT_BUFFERS_2048
  189. #endif
  190. #if !defined(USE_CERT_BUFFERS_256)
  191. #define USE_CERT_BUFFERS_256
  192. #endif
  193. #endif
  194. #if defined(WOLFSSL_CERT_GEN) && (defined(HAVE_ECC384) || defined(HAVE_ALL_CURVES))
  195. #define ENABLE_ECC384_CERT_GEN_TEST
  196. #endif
  197. #include <wolfssl/certs_test.h>
  198. #ifdef OPENSSL_EXTRA
  199. #include <wolfssl/openssl/x509_vfy.h>
  200. #include <wolfssl/openssl/buffer.h>
  201. #include <wolfssl/openssl/ec25519.h>
  202. #include <wolfssl/openssl/ed25519.h>
  203. #include <wolfssl/openssl/ec448.h>
  204. #include <wolfssl/openssl/ed448.h>
  205. #include <wolfssl/openssl/ecdsa.h>
  206. #include <wolfssl/openssl/ecdh.h>
  207. #include <wolfssl/openssl/pem.h>
  208. #endif
  209. #if defined(OPENSSL_EXTRA) && !defined(WC_NO_RNG) && defined(HAVE_HASHDRBG)
  210. #include <wolfssl/openssl/fips_rand.h>
  211. #endif