user_settings.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /* Custom build settings for Android */
  2. #ifndef _WOLF_USER_SETTINGS_H_
  3. #define _WOLF_USER_SETTINGS_H_
  4. #if 0
  5. #define HAVE_FIPS_VERSION 2
  6. #define HAVE_FIPS
  7. #endif
  8. #ifdef __aarch64__
  9. #if !defined(__clang__) || \
  10. (defined(__clang__) && defined(__clang_major__) && __clang_major__ >= 5)
  11. /* older clang v4 has issue with inline assembly constraints */
  12. #define WOLFSSL_ARMASM
  13. #endif
  14. #endif
  15. #if 1 /* SP Assembly Speedups (wPAA) */
  16. #define WOLFSSL_SP
  17. #define WOLFSSL_SP_SMALL /* use smaller version of code */
  18. #define WOLFSSL_HAVE_SP_RSA
  19. #define WOLFSSL_HAVE_SP_DH
  20. #define WOLFSSL_HAVE_SP_ECC
  21. #ifdef WOLFSSL_ARMASM
  22. #define WOLFSSL_SP_ARM64_ASM
  23. #endif
  24. #endif
  25. /* WPA Supplicant Support */
  26. #define WOLFSSL_WPAS_SMALL
  27. #define OPENSSL_ALL
  28. #define HAVE_THREAD_LS
  29. #define USE_FAST_MATH
  30. #define FP_MAX_BITS (4096*2) /* Maximum math bits (Max RSA key bits * 2) */
  31. #define TFM_TIMING_RESISTANT
  32. #define ECC_TIMING_RESISTANT
  33. #define WC_RSA_BLINDING
  34. #define HAVE_HASHDRBG
  35. #if 1
  36. #define WOLFSSL_TLS13
  37. #endif
  38. #define WC_RSA_PSS
  39. #define HAVE_SESSION_TICKET
  40. #define HAVE_TLS_EXTENSIONS
  41. #define HAVE_SUPPORTED_CURVES
  42. #define HAVE_EXTENDED_MASTER
  43. #define HAVE_ENCRYPT_THEN_MAC
  44. #define WOLFSSL_ENCRYPTED_KEYS
  45. #define HAVE_KEYING_MATERIAL
  46. #define NO_OLD_TLS
  47. #define NO_CHECK_PRIVATE_KEY
  48. /* enable PK callback support for signing operations to key store */
  49. #define HAVE_PK_CALLBACKS
  50. /* crypto callback support is not in FIPS 3389 */
  51. #ifndef HAVE_FIPS
  52. #define WOLF_CRYPTO_CB
  53. #endif
  54. #define KEEP_OUR_CERT
  55. #define KEEP_PEER_CERT
  56. #define WOLFSSL_ALWAYS_VERIFY_CB
  57. #define WOLFSSL_ALWAYS_KEEP_SNI
  58. #define HAVE_EX_DATA
  59. #define HAVE_EXT_CACHE
  60. #define WOLFSSL_EITHER_SIDE
  61. #define WOLFSSL_PUBLIC_MP
  62. #define WOLFSSL_DER_LOAD
  63. #define WOLFSSL_CERT_GEN
  64. #define WOLFSSL_CERT_EXT
  65. #define WOLFSSL_CERT_REQ
  66. #define WOLFSSL_KEY_GEN
  67. #define WC_RSA_NO_PADDING
  68. #define WOLFSSL_DH_CONST
  69. #define HAVE_FFDHE_2048
  70. #define HAVE_FFDHE_3072
  71. #define HAVE_FFDHE_4096
  72. #define HAVE_DH_DEFAULT_PARAMS
  73. #ifdef HAVE_FIPS
  74. #define WOLFSSL_VALIDATE_FFC_IMPORT
  75. #define HAVE_FFDHE_Q
  76. #endif
  77. #define WOLFSSL_SHA224
  78. #define WOLFSSL_SHA512
  79. #define WOLFSSL_SHA384
  80. #define WOLFSSL_NOSHA512_256
  81. #define WOLFSSL_NOSHA512_224
  82. #define WOLFSSL_SHA3
  83. #define HAVE_HKDF
  84. #define HAVE_PKCS8
  85. #define HAVE_ECC
  86. #define TFM_ECC256
  87. #define ECC_SHAMIR
  88. #define HAVE_COMP_KEY
  89. #ifdef HAVE_FIPS
  90. #define HAVE_ECC_CDH
  91. #define WOLFSSL_VALIDATE_ECC_IMPORT
  92. #endif
  93. #ifdef __i386
  94. #define TFM_NO_ASM
  95. #endif
  96. #define HAVE_AESGCM
  97. #define HAVE_AESCCM
  98. #define WOLFSSL_AES_DIRECT
  99. #define WOLFSSL_AES_COUNTER
  100. #define HAVE_AES_ECB
  101. #define WOLFSSL_CMAC
  102. #define WOLFSSL_BASE64_ENCODE
  103. #define HAVE_CRL
  104. #define NO_DSA
  105. #define NO_RC4
  106. #define NO_PSK
  107. #define WOLFSSL_NO_SHAKE256
  108. #define NO_MD4
  109. #define NO_OLD_MD5_NAME
  110. #define NO_OLD_SHA_NAMES
  111. #define NO_OLD_SHA256_NAMES
  112. #define NO_OLD_WC_NAMES
  113. #if 0
  114. #define DEBUG_WOLFSSL
  115. #define WOLFSSL_ANDROID_DEBUG
  116. #endif
  117. #endif /* _WOLF_USER_SETTINGS_H_ */