user_settings_wolftpm.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /* user_settings_wolftpm.h
  2. *
  3. * Copyright (C) 2006-2023 wolfSSL Inc.
  4. *
  5. * This file is part of wolfSSL.
  6. *
  7. * wolfSSL is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * wolfSSL is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  20. */
  21. /* should be renamed to user_settings.h for customer use
  22. * generated from configure and wolfssl/options.h using:
  23. * ./configure --enable-wolftpm --disable-dh --disable-oldtls \
  24. * --disable-sha3 --disable-sha512 --disable-sha384 --disable-sha224 \
  25. * --disable-pkcs12 --disable-chacha --disable-poly1305 \
  26. * --disable-sys-ca-certs --disable-examples
  27. *
  28. * Cleaned up by David Garske
  29. */
  30. #ifndef WOLF_USER_SETTINGS_TPM_H
  31. #define WOLF_USER_SETTINGS_TPM_H
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35. #if 1
  36. /* wolfTPM with TLS example (v1.3 only) */
  37. #define WOLFSSL_TLS13
  38. #define WOLFSSL_NO_TLS12
  39. #define NO_OLD_TLS
  40. #define HAVE_TLS_EXTENSIONS
  41. #define HAVE_SUPPORTED_CURVES
  42. #define HAVE_SERVER_RENEGOTIATION_INFO
  43. #define HAVE_ENCRYPT_THEN_MAC
  44. #define HAVE_HKDF
  45. #define WC_RSA_PSS
  46. #define WOLFSSL_PSS_LONG_SALT
  47. #else
  48. /* wolfCrypt only (no SSL/TLS) */
  49. #define WOLFCRYPT_ONLY
  50. #endif
  51. /* No threading or file system */
  52. #define SINGLE_THREADED
  53. /* File system disable */
  54. #if 0
  55. #define NO_FILESYSTEM
  56. #endif
  57. /* Enable crypto callbacks */
  58. #define WOLF_CRYPTO_CB
  59. /* Enable PRNG (SHA2-256) */
  60. #define HAVE_HASHDRBG
  61. /* Enable SP math all (sp_int.c) with multi-precision support */
  62. #define WOLFSSL_SP_MATH_ALL
  63. /* Enable hardening (timing resistance) */
  64. #define TFM_TIMING_RESISTANT
  65. #define ECC_TIMING_RESISTANT
  66. #define WC_RSA_BLINDING
  67. /* Asymmetric */
  68. #define HAVE_ECC
  69. #undef NO_RSA
  70. #define NO_DH
  71. #ifndef NO_DH
  72. #define HAVE_FFDHE_2048
  73. #define HAVE_DH_DEFAULT_PARAMS
  74. #endif
  75. /* Symmetric Hash */
  76. #undef NO_SHA
  77. #undef NO_SHA256
  78. #define WOLFSSL_SHA512
  79. #define WOLFSSL_SHA384
  80. /* Symmetric Cipher */
  81. #define HAVE_AES_KEYWRAP
  82. #define WOLFSSL_AES_DIRECT
  83. #define WOLFSSL_AES_CFB
  84. #define HAVE_AESGCM
  85. #define GCM_TABLE_4BIT
  86. #if 0
  87. #define HAVE_POLY1305
  88. #define HAVE_CHACHA
  89. #endif
  90. /* Features */
  91. #define WOLFSSL_CERT_GEN
  92. #define WOLFSSL_CERT_REQ
  93. #define WOLFSSL_CERT_EXT
  94. #define HAVE_PKCS7
  95. #define HAVE_X963_KDF
  96. #define WOLFSSL_BASE64_ENCODE
  97. /* Disables */
  98. #define NO_DSA
  99. #define NO_DES3
  100. #define NO_RC4
  101. #define NO_PSK
  102. #define NO_MD4
  103. #define WOLFSSL_NO_SHAKE128
  104. #define WOLFSSL_NO_SHAKE256
  105. #ifdef __cplusplus
  106. }
  107. #endif
  108. #endif /* WOLF_USER_SETTINGS_TPM_H */