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. #include <wolfssl/ssl.h>
  31. #include <wolfssl/internal.h>
  32. #ifndef NO_CRYPT_TEST
  33. #include <wolfcrypt/test/test.h>
  34. #include <linux/delay.h>
  35. #endif
  36. #ifndef EXPORT_SYMBOL_NS
  37. #define EXPORT_SYMBOL_NS(sym, ns) EXPORT_SYMBOL(sym)
  38. #endif
  39. #ifndef EXPORT_SYMBOL_NS_GPL
  40. #define EXPORT_SYMBOL_NS_GPL(sym, ns) EXPORT_SYMBOL_GPL(sym)
  41. #endif
  42. #include <wolfssl/wolfcrypt/memory.h>
  43. #include <wolfssl/wolfcrypt/wc_port.h>
  44. #include <wolfssl/wolfcrypt/logging.h>
  45. #include <wolfssl/wolfcrypt/types.h>
  46. #include <wolfssl/wolfcrypt/asn.h>
  47. #include <wolfssl/wolfcrypt/md2.h>
  48. #include <wolfssl/wolfcrypt/md5.h>
  49. #include <wolfssl/wolfcrypt/md4.h>
  50. #include <wolfssl/wolfcrypt/sha.h>
  51. #include <wolfssl/wolfcrypt/sha256.h>
  52. #include <wolfssl/wolfcrypt/sha512.h>
  53. #include <wolfssl/wolfcrypt/arc4.h>
  54. #if defined(WC_NO_RNG)
  55. #include <wolfssl/wolfcrypt/integer.h>
  56. #else
  57. #include <wolfssl/wolfcrypt/random.h>
  58. #endif
  59. #include <wolfssl/wolfcrypt/coding.h>
  60. #include <wolfssl/wolfcrypt/signature.h>
  61. #include <wolfssl/wolfcrypt/rsa.h>
  62. #include <wolfssl/wolfcrypt/des3.h>
  63. #include <wolfssl/wolfcrypt/aes.h>
  64. #include <wolfssl/wolfcrypt/wc_encrypt.h>
  65. #include <wolfssl/wolfcrypt/cmac.h>
  66. #include <wolfssl/wolfcrypt/poly1305.h>
  67. #include <wolfssl/wolfcrypt/camellia.h>
  68. #include <wolfssl/wolfcrypt/hmac.h>
  69. #include <wolfssl/wolfcrypt/dh.h>
  70. #include <wolfssl/wolfcrypt/dsa.h>
  71. #include <wolfssl/wolfcrypt/srp.h>
  72. #include <wolfssl/wolfcrypt/idea.h>
  73. #include <wolfssl/wolfcrypt/hc128.h>
  74. #include <wolfssl/wolfcrypt/rabbit.h>
  75. #include <wolfssl/wolfcrypt/chacha.h>
  76. #include <wolfssl/wolfcrypt/chacha20_poly1305.h>
  77. #include <wolfssl/wolfcrypt/pwdbased.h>
  78. #include <wolfssl/wolfcrypt/ripemd.h>
  79. #include <wolfssl/wolfcrypt/error-crypt.h>
  80. #ifdef HAVE_ECC
  81. #include <wolfssl/wolfcrypt/ecc.h>
  82. #endif
  83. #ifdef HAVE_CURVE25519
  84. #include <wolfssl/wolfcrypt/curve25519.h>
  85. #endif
  86. #ifdef HAVE_ED25519
  87. #include <wolfssl/wolfcrypt/ed25519.h>
  88. #endif
  89. #ifdef HAVE_CURVE448
  90. #include <wolfssl/wolfcrypt/curve448.h>
  91. #endif
  92. #ifdef HAVE_ED448
  93. #include <wolfssl/wolfcrypt/ed448.h>
  94. #endif
  95. #if defined(HAVE_BLAKE2) || defined(HAVE_BLAKE2S)
  96. #include <wolfssl/wolfcrypt/blake2.h>
  97. #endif
  98. #ifdef WOLFSSL_SHA3
  99. #include <wolfssl/wolfcrypt/sha3.h>
  100. #endif
  101. #ifdef HAVE_LIBZ
  102. #include <wolfssl/wolfcrypt/compress.h>
  103. #endif
  104. #ifdef HAVE_PKCS7
  105. #include <wolfssl/wolfcrypt/pkcs7.h>
  106. #endif
  107. #ifdef HAVE_FIPS
  108. #include <wolfssl/wolfcrypt/fips.h>
  109. #include <wolfssl/wolfcrypt/fips_test.h>
  110. #endif
  111. #ifdef HAVE_SELFTEST
  112. #include <wolfssl/wolfcrypt/selftest.h>
  113. #endif
  114. #ifdef WOLFSSL_ASYNC_CRYPT
  115. #include <wolfssl/wolfcrypt/async.h>
  116. #endif
  117. #if defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE)
  118. #include <wolfssl/wolfcrypt/logging.h>
  119. #endif
  120. #ifdef WOLFSSL_IMX6_CAAM_BLOB
  121. #include <wolfssl/wolfcrypt/port/caam/wolfcaam.h>
  122. #endif
  123. #ifdef WOLF_CRYPTO_CB
  124. #include <wolfssl/wolfcrypt/cryptocb.h>
  125. #ifdef HAVE_INTEL_QA_SYNC
  126. #include <wolfssl/wolfcrypt/port/intel/quickassist_sync.h>
  127. #endif
  128. #ifdef HAVE_CAVIUM_OCTEON_SYNC
  129. #include <wolfssl/wolfcrypt/port/cavium/cavium_octeon_sync.h>
  130. #endif
  131. #endif
  132. #ifndef NO_KDF
  133. #include <wolfssl/wolfcrypt/kdf.h>
  134. #endif
  135. #ifdef _MSC_VER
  136. /* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */
  137. #pragma warning(disable: 4996)
  138. #endif
  139. #ifdef OPENSSL_EXTRA
  140. #ifndef WOLFCRYPT_ONLY
  141. #include <wolfssl/openssl/evp.h>
  142. #endif
  143. #include <wolfssl/openssl/rand.h>
  144. #include <wolfssl/openssl/hmac.h>
  145. #include <wolfssl/openssl/aes.h>
  146. #include <wolfssl/openssl/des.h>
  147. #endif
  148. #if defined(NO_FILESYSTEM)
  149. #if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && \
  150. !defined(USE_CERT_BUFFERS_3072) && !defined(USE_CERT_BUFFERS_4096)
  151. #define USE_CERT_BUFFERS_2048
  152. #endif
  153. #if !defined(USE_CERT_BUFFERS_256)
  154. #define USE_CERT_BUFFERS_256
  155. #endif
  156. #endif
  157. #if defined(WOLFSSL_CERT_GEN) && (defined(HAVE_ECC384) || defined(HAVE_ALL_CURVES))
  158. #define ENABLE_ECC384_CERT_GEN_TEST
  159. #endif
  160. #include <wolfssl/certs_test.h>
  161. #ifdef OPENSSL_EXTRA
  162. #include <wolfssl/openssl/x509_vfy.h>
  163. #include <wolfssl/openssl/buffer.h>
  164. #include <wolfssl/openssl/ec25519.h>
  165. #include <wolfssl/openssl/ed25519.h>
  166. #include <wolfssl/openssl/ec448.h>
  167. #include <wolfssl/openssl/ed448.h>
  168. #include <wolfssl/openssl/ecdsa.h>
  169. #include <wolfssl/openssl/ecdh.h>
  170. #include <wolfssl/openssl/pem.h>
  171. #endif