module_exports.c.template 5.1 KB

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