module_exports.c.template 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. /* module_exports.c.template -- static preamble for dynamically generated
  2. * module_exports.c (see Kbuild)
  3. *
  4. * Copyright (C) 2006-2021 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/asn.h>
  49. #include <wolfssl/wolfcrypt/md2.h>
  50. #include <wolfssl/wolfcrypt/md5.h>
  51. #include <wolfssl/wolfcrypt/md4.h>
  52. #include <wolfssl/wolfcrypt/sha.h>
  53. #include <wolfssl/wolfcrypt/sha256.h>
  54. #include <wolfssl/wolfcrypt/sha512.h>
  55. #ifdef WOLFSSL_SIPHASH
  56. #include <wolfssl/wolfcrypt/siphash.h>
  57. #endif
  58. #include <wolfssl/wolfcrypt/arc4.h>
  59. #if defined(WC_NO_RNG)
  60. #include <wolfssl/wolfcrypt/integer.h>
  61. #else
  62. #include <wolfssl/wolfcrypt/random.h>
  63. #endif
  64. #include <wolfssl/wolfcrypt/coding.h>
  65. #include <wolfssl/wolfcrypt/signature.h>
  66. #include <wolfssl/wolfcrypt/rsa.h>
  67. #include <wolfssl/wolfcrypt/des3.h>
  68. #include <wolfssl/wolfcrypt/aes.h>
  69. #include <wolfssl/wolfcrypt/wc_encrypt.h>
  70. #include <wolfssl/wolfcrypt/cmac.h>
  71. #include <wolfssl/wolfcrypt/poly1305.h>
  72. #include <wolfssl/wolfcrypt/camellia.h>
  73. #include <wolfssl/wolfcrypt/hmac.h>
  74. #include <wolfssl/wolfcrypt/dh.h>
  75. #include <wolfssl/wolfcrypt/dsa.h>
  76. #include <wolfssl/wolfcrypt/srp.h>
  77. #include <wolfssl/wolfcrypt/chacha.h>
  78. #include <wolfssl/wolfcrypt/chacha20_poly1305.h>
  79. #include <wolfssl/wolfcrypt/pwdbased.h>
  80. #include <wolfssl/wolfcrypt/ripemd.h>
  81. #include <wolfssl/wolfcrypt/error-crypt.h>
  82. #ifdef HAVE_ECC
  83. #include <wolfssl/wolfcrypt/ecc.h>
  84. #endif
  85. #ifdef HAVE_CURVE25519
  86. #include <wolfssl/wolfcrypt/curve25519.h>
  87. #endif
  88. #ifdef HAVE_ED25519
  89. #include <wolfssl/wolfcrypt/ed25519.h>
  90. #endif
  91. #ifdef HAVE_CURVE448
  92. #include <wolfssl/wolfcrypt/curve448.h>
  93. #endif
  94. #ifdef HAVE_ED448
  95. #include <wolfssl/wolfcrypt/ed448.h>
  96. #endif
  97. #if defined(HAVE_BLAKE2) || defined(HAVE_BLAKE2S)
  98. #include <wolfssl/wolfcrypt/blake2.h>
  99. #endif
  100. #ifdef WOLFSSL_SHA3
  101. #include <wolfssl/wolfcrypt/sha3.h>
  102. #endif
  103. #ifdef HAVE_LIBZ
  104. #include <wolfssl/wolfcrypt/compress.h>
  105. #endif
  106. #ifdef HAVE_PKCS7
  107. #include <wolfssl/wolfcrypt/pkcs7.h>
  108. #endif
  109. #ifdef HAVE_PKCS12
  110. #include <wolfssl/wolfcrypt/pkcs12.h>
  111. #endif
  112. #ifdef HAVE_FIPS
  113. #include <wolfssl/wolfcrypt/fips.h>
  114. #include <wolfssl/wolfcrypt/fips_test.h>
  115. #endif
  116. #ifdef HAVE_SELFTEST
  117. #include <wolfssl/wolfcrypt/selftest.h>
  118. #endif
  119. #ifdef WOLFSSL_ASYNC_CRYPT
  120. #include <wolfssl/wolfcrypt/async.h>
  121. #endif
  122. #if defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE)
  123. #include <wolfssl/wolfcrypt/logging.h>
  124. #endif
  125. #ifdef WOLFSSL_IMX6_CAAM_BLOB
  126. #include <wolfssl/wolfcrypt/port/caam/wolfcaam.h>
  127. #endif
  128. #ifdef WOLF_CRYPTO_CB
  129. #include <wolfssl/wolfcrypt/cryptocb.h>
  130. #ifdef HAVE_INTEL_QA_SYNC
  131. #include <wolfssl/wolfcrypt/port/intel/quickassist_sync.h>
  132. #endif
  133. #ifdef HAVE_CAVIUM_OCTEON_SYNC
  134. #include <wolfssl/wolfcrypt/port/cavium/cavium_octeon_sync.h>
  135. #endif
  136. #endif
  137. #ifndef NO_KDF
  138. #include <wolfssl/wolfcrypt/kdf.h>
  139. #endif
  140. #ifdef OPENSSL_EXTRA
  141. #ifndef WOLFCRYPT_ONLY
  142. #include <wolfssl/openssl/evp.h>
  143. #endif
  144. #include <wolfssl/openssl/rand.h>
  145. #include <wolfssl/openssl/hmac.h>
  146. #include <wolfssl/openssl/aes.h>
  147. #include <wolfssl/openssl/des.h>
  148. #endif
  149. #if defined(NO_FILESYSTEM)
  150. #if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \
  151. !defined(USE_CERT_BUFFERS_3072) && !defined(USE_CERT_BUFFERS_4096)
  152. #define USE_CERT_BUFFERS_2048
  153. #endif
  154. #if !defined(USE_CERT_BUFFERS_256)
  155. #define USE_CERT_BUFFERS_256
  156. #endif
  157. #endif
  158. #if defined(WOLFSSL_CERT_GEN) && (defined(HAVE_ECC384) || defined(HAVE_ALL_CURVES))
  159. #define ENABLE_ECC384_CERT_GEN_TEST
  160. #endif
  161. #include <wolfssl/certs_test.h>
  162. #ifdef OPENSSL_EXTRA
  163. #include <wolfssl/openssl/x509_vfy.h>
  164. #include <wolfssl/openssl/buffer.h>
  165. #include <wolfssl/openssl/ec25519.h>
  166. #include <wolfssl/openssl/ed25519.h>
  167. #include <wolfssl/openssl/ec448.h>
  168. #include <wolfssl/openssl/ed448.h>
  169. #include <wolfssl/openssl/ecdsa.h>
  170. #include <wolfssl/openssl/ecdh.h>
  171. #include <wolfssl/openssl/pem.h>
  172. #endif