module_exports.c.template 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. /* module_exports.c.template -- static preamble for dynamically generated
  2. * module_exports.c (see Kbuild)
  3. *
  4. * Copyright (C) 2006-2023 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 OPENSSL_EXTRA
  145. #ifndef WOLFCRYPT_ONLY
  146. #include <wolfssl/openssl/evp.h>
  147. #endif
  148. #include <wolfssl/openssl/rand.h>
  149. #include <wolfssl/openssl/hmac.h>
  150. #include <wolfssl/openssl/aes.h>
  151. #include <wolfssl/openssl/des.h>
  152. #include <wolfssl/openssl/modes.h>
  153. #include <wolfssl/openssl/rc4.h>
  154. #endif
  155. #if defined(NO_FILESYSTEM)
  156. #if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \
  157. !defined(USE_CERT_BUFFERS_3072) && !defined(USE_CERT_BUFFERS_4096)
  158. #define USE_CERT_BUFFERS_2048
  159. #endif
  160. #if !defined(USE_CERT_BUFFERS_256)
  161. #define USE_CERT_BUFFERS_256
  162. #endif
  163. #endif
  164. #if defined(WOLFSSL_CERT_GEN) && (defined(HAVE_ECC384) || defined(HAVE_ALL_CURVES))
  165. #define ENABLE_ECC384_CERT_GEN_TEST
  166. #endif
  167. #include <wolfssl/certs_test.h>
  168. #ifdef OPENSSL_EXTRA
  169. #include <wolfssl/openssl/x509_vfy.h>
  170. #include <wolfssl/openssl/buffer.h>
  171. #include <wolfssl/openssl/ec25519.h>
  172. #include <wolfssl/openssl/ed25519.h>
  173. #include <wolfssl/openssl/ec448.h>
  174. #include <wolfssl/openssl/ed448.h>
  175. #include <wolfssl/openssl/ecdsa.h>
  176. #include <wolfssl/openssl/ecdh.h>
  177. #include <wolfssl/openssl/pem.h>
  178. #endif