wolfssl_options.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. By default wolfSSL has a very conservative configuration that can result in
  3. connections to servers failing due to certificate or algorithm problems.
  4. To remedy this issue for libcurl I've generated this options file that
  5. build-wolfssl will copy to the wolfSSL include directories and will result in
  6. maximum compatibility.
  7. These configure flags were used in MinGW to generate the options in this file:
  8. --enable-opensslextra
  9. --enable-aesgcm
  10. --enable-ripemd
  11. --enable-sha512
  12. --enable-dh
  13. --enable-dsa
  14. --enable-ecc
  15. --enable-sni
  16. --enable-fastmath
  17. --enable-sessioncerts
  18. --enable-certgen
  19. --enable-testcert
  20. C_EXTRA_FLAGS="-DFP_MAX_BITS=16384 -DTFM_TIMING_RESISTANT"
  21. Two generated options HAVE_THREAD_LS and _POSIX_THREADS were removed since they
  22. are inapplicable for our Visual Studio build.
  23. Regarding the two options that were added via C_EXTRA_FLAGS:
  24. FP_MAX_BITS=16384
  25. http://www.yassl.com/forums/topic423-cacertorgs-ca-cert-verify-failed-but-withdisablefastmath-it-works.html
  26. "Since root.crt uses a 4096-bit RSA key, you'll need to increase the fastmath
  27. buffer size. You can do this using the define:
  28. FP_MAX_BITS and setting it to 8192."
  29. TFM_TIMING_RESISTANT
  30. https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-2-building-wolfssl.html
  31. From section 2.4.5 Increasing Performance, USE_FAST_MATH:
  32. "Because the stack memory usage can be larger when using fastmath, we recommend
  33. defining TFM_TIMING_RESISTANT as well when using this option."
  34. */
  35. /* wolfssl options.h
  36. * generated from configure options
  37. *
  38. * Copyright (C) 2006-2015 wolfSSL Inc.
  39. *
  40. * This file is part of wolfSSL. (formerly known as CyaSSL)
  41. *
  42. */
  43. #pragma once
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47. #undef FP_MAX_BITS
  48. #define FP_MAX_BITS 16384
  49. #undef TFM_TIMING_RESISTANT
  50. #define TFM_TIMING_RESISTANT
  51. #undef OPENSSL_EXTRA
  52. #define OPENSSL_EXTRA
  53. #undef HAVE_AESGCM
  54. #define HAVE_AESGCM
  55. #undef WOLFSSL_RIPEMD
  56. #define WOLFSSL_RIPEMD
  57. #undef WOLFSSL_SHA512
  58. #define WOLFSSL_SHA512
  59. #undef WOLFSSL_SHA384
  60. #define WOLFSSL_SHA384
  61. #undef SESSION_CERTS
  62. #define SESSION_CERTS
  63. #undef WOLFSSL_CERT_GEN
  64. #define WOLFSSL_CERT_GEN
  65. #undef HAVE_ECC
  66. #define HAVE_ECC
  67. #undef TFM_ECC256
  68. #define TFM_ECC256
  69. #undef ECC_SHAMIR
  70. #define ECC_SHAMIR
  71. #undef NO_PSK
  72. #define NO_PSK
  73. #undef NO_RC4
  74. #define NO_RC4
  75. #undef NO_MD4
  76. #define NO_MD4
  77. #undef NO_HC128
  78. #define NO_HC128
  79. #undef NO_RABBIT
  80. #define NO_RABBIT
  81. #undef HAVE_POLY1305
  82. #define HAVE_POLY1305
  83. #undef HAVE_ONE_TIME_AUTH
  84. #define HAVE_ONE_TIME_AUTH
  85. #undef HAVE_CHACHA
  86. #define HAVE_CHACHA
  87. #undef HAVE_HASHDRBG
  88. #define HAVE_HASHDRBG
  89. #undef HAVE_TLS_EXTENSIONS
  90. #define HAVE_TLS_EXTENSIONS
  91. #undef HAVE_SNI
  92. #define HAVE_SNI
  93. #undef WOLFSSL_TEST_CERT
  94. #define WOLFSSL_TEST_CERT
  95. #undef USE_FAST_MATH
  96. #define USE_FAST_MATH
  97. #ifdef __cplusplus
  98. }
  99. #endif