1
0

module_exports.c.template 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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. #include <wolfssl/wolfcrypt/memory.h>
  45. #include <wolfssl/wolfcrypt/wc_port.h>
  46. #include <wolfssl/wolfcrypt/logging.h>
  47. #include <wolfssl/wolfcrypt/types.h>
  48. #include <wolfssl/wolfcrypt/wolfmath.h>
  49. #include <wolfssl/wolfcrypt/asn.h>
  50. #include <wolfssl/wolfcrypt/md2.h>
  51. #include <wolfssl/wolfcrypt/md5.h>
  52. #include <wolfssl/wolfcrypt/md4.h>
  53. #include <wolfssl/wolfcrypt/sha.h>
  54. #include <wolfssl/wolfcrypt/sha256.h>
  55. #include <wolfssl/wolfcrypt/sha512.h>
  56. #ifdef WOLFSSL_SIPHASH
  57. #include <wolfssl/wolfcrypt/siphash.h>
  58. #endif
  59. #include <wolfssl/wolfcrypt/arc4.h>
  60. #if defined(WC_NO_RNG)
  61. #include <wolfssl/wolfcrypt/integer.h>
  62. #else
  63. #include <wolfssl/wolfcrypt/random.h>
  64. #endif
  65. #include <wolfssl/wolfcrypt/coding.h>
  66. #include <wolfssl/wolfcrypt/signature.h>
  67. #include <wolfssl/wolfcrypt/rsa.h>
  68. #include <wolfssl/wolfcrypt/des3.h>
  69. #include <wolfssl/wolfcrypt/aes.h>
  70. #include <wolfssl/wolfcrypt/wc_encrypt.h>
  71. #include <wolfssl/wolfcrypt/cmac.h>
  72. #include <wolfssl/wolfcrypt/poly1305.h>
  73. #include <wolfssl/wolfcrypt/camellia.h>
  74. #include <wolfssl/wolfcrypt/hmac.h>
  75. #include <wolfssl/wolfcrypt/dh.h>
  76. #include <wolfssl/wolfcrypt/dsa.h>
  77. #include <wolfssl/wolfcrypt/srp.h>
  78. #include <wolfssl/wolfcrypt/chacha.h>
  79. #include <wolfssl/wolfcrypt/chacha20_poly1305.h>
  80. #include <wolfssl/wolfcrypt/pwdbased.h>
  81. #include <wolfssl/wolfcrypt/ripemd.h>
  82. #include <wolfssl/wolfcrypt/error-crypt.h>
  83. #ifdef HAVE_ECC
  84. #include <wolfssl/wolfcrypt/ecc.h>
  85. #endif
  86. #ifdef HAVE_HPKE
  87. #include <wolfssl/wolfcrypt/hpke.h>
  88. #endif
  89. #ifdef HAVE_CURVE25519
  90. #include <wolfssl/wolfcrypt/curve25519.h>
  91. #endif
  92. #ifdef HAVE_ED25519
  93. #include <wolfssl/wolfcrypt/ed25519.h>
  94. #endif
  95. #ifdef HAVE_CURVE448
  96. #include <wolfssl/wolfcrypt/curve448.h>
  97. #endif
  98. #ifdef HAVE_ED448
  99. #include <wolfssl/wolfcrypt/ed448.h>
  100. #endif
  101. #if defined(HAVE_BLAKE2) || defined(HAVE_BLAKE2S)
  102. #include <wolfssl/wolfcrypt/blake2.h>
  103. #endif
  104. #ifdef WOLFSSL_SHA3
  105. #include <wolfssl/wolfcrypt/sha3.h>
  106. #endif
  107. #ifdef HAVE_LIBZ
  108. #include <wolfssl/wolfcrypt/compress.h>
  109. #endif
  110. #ifdef HAVE_PKCS7
  111. #include <wolfssl/wolfcrypt/pkcs7.h>
  112. #endif
  113. #ifdef HAVE_PKCS12
  114. #include <wolfssl/wolfcrypt/pkcs12.h>
  115. #endif
  116. #ifdef HAVE_FIPS
  117. #include <wolfssl/wolfcrypt/fips.h>
  118. #include <wolfssl/wolfcrypt/fips_test.h>
  119. #endif
  120. #ifdef HAVE_SELFTEST
  121. #include <wolfssl/wolfcrypt/selftest.h>
  122. #endif
  123. #ifdef WOLFSSL_ASYNC_CRYPT
  124. #include <wolfssl/wolfcrypt/async.h>
  125. #endif
  126. #if defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE)
  127. #include <wolfssl/wolfcrypt/logging.h>
  128. #endif
  129. #ifdef WOLFSSL_IMX6_CAAM_BLOB
  130. #include <wolfssl/wolfcrypt/port/caam/wolfcaam.h>
  131. #endif
  132. #ifdef WOLF_CRYPTO_CB
  133. #include <wolfssl/wolfcrypt/cryptocb.h>
  134. #ifdef HAVE_INTEL_QA_SYNC
  135. #include <wolfssl/wolfcrypt/port/intel/quickassist_sync.h>
  136. #endif
  137. #ifdef HAVE_CAVIUM_OCTEON_SYNC
  138. #include <wolfssl/wolfcrypt/port/cavium/cavium_octeon_sync.h>
  139. #endif
  140. #endif
  141. #ifndef NO_KDF
  142. #include <wolfssl/wolfcrypt/kdf.h>
  143. #endif
  144. #ifdef WOLFSSL_HAVE_KYBER
  145. #include <wolfssl/wolfcrypt/kyber.h>
  146. #ifdef WOLFSSL_WC_KYBER
  147. #include <wolfssl/wolfcrypt/wc_kyber.h>
  148. #endif
  149. #endif
  150. #if defined(WOLFSSL_HAVE_XMSS)
  151. #include <wolfssl/wolfcrypt/xmss.h>
  152. #ifdef HAVE_LIBXMSS
  153. #include <wolfssl/wolfcrypt/ext_xmss.h>
  154. #else
  155. #include <wolfssl/wolfcrypt/wc_xmss.h>
  156. #endif
  157. #endif
  158. #if defined(WOLFSSL_HAVE_LMS)
  159. #include <wolfssl/wolfcrypt/lms.h>
  160. #ifdef HAVE_LIBLMS
  161. #include <wolfssl/wolfcrypt/ext_lms.h>
  162. #else
  163. #include <wolfssl/wolfcrypt/wc_lms.h>
  164. #endif
  165. #endif
  166. #ifdef HAVE_DILITHIUM
  167. #include <wolfssl/wolfcrypt/dilithium.h>
  168. #endif
  169. #ifdef OPENSSL_EXTRA
  170. #ifndef WOLFCRYPT_ONLY
  171. #include <wolfssl/openssl/evp.h>
  172. #endif
  173. #include <wolfssl/openssl/rand.h>
  174. #include <wolfssl/openssl/hmac.h>
  175. #include <wolfssl/openssl/aes.h>
  176. #include <wolfssl/openssl/des.h>
  177. #include <wolfssl/openssl/modes.h>
  178. #include <wolfssl/openssl/rc4.h>
  179. #endif
  180. #if defined(NO_FILESYSTEM)
  181. #if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \
  182. !defined(USE_CERT_BUFFERS_3072) && !defined(USE_CERT_BUFFERS_4096)
  183. #define USE_CERT_BUFFERS_2048
  184. #endif
  185. #if !defined(USE_CERT_BUFFERS_256)
  186. #define USE_CERT_BUFFERS_256
  187. #endif
  188. #endif
  189. #if defined(WOLFSSL_CERT_GEN) && (defined(HAVE_ECC384) || defined(HAVE_ALL_CURVES))
  190. #define ENABLE_ECC384_CERT_GEN_TEST
  191. #endif
  192. #include <wolfssl/certs_test.h>
  193. #ifdef OPENSSL_EXTRA
  194. #include <wolfssl/openssl/x509_vfy.h>
  195. #include <wolfssl/openssl/buffer.h>
  196. #include <wolfssl/openssl/ec25519.h>
  197. #include <wolfssl/openssl/ed25519.h>
  198. #include <wolfssl/openssl/ec448.h>
  199. #include <wolfssl/openssl/ed448.h>
  200. #include <wolfssl/openssl/ecdsa.h>
  201. #include <wolfssl/openssl/ecdh.h>
  202. #include <wolfssl/openssl/pem.h>
  203. #endif
  204. #if defined(OPENSSL_EXTRA) && !defined(WC_NO_RNG) && defined(HAVE_HASHDRBG)
  205. #include <wolfssl/openssl/fips_rand.h>
  206. #endif