README 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. *** Description ***
  2. The wolfSSL embedded SSL library (formerly CyaSSL) is a lightweight SSL/TLS
  3. library written in ANSI C and targeted for embedded, RTOS, and
  4. resource-constrained environments - primarily because of its small size, speed,
  5. and feature set. It is commonly used in standard operating environments as well
  6. because of its royalty-free pricing and excellent cross platform support.
  7. wolfSSL supports industry standards up to the current TLS 1.3 and DTLS 1.2
  8. levels, is up to 20 times smaller than OpenSSL, and offers progressive ciphers
  9. such as ChaCha20, Curve25519, and Blake2b. User benchmarking and feedback
  10. reports dramatically better performance when using wolfSSL over OpenSSL.
  11. wolfSSL is powered by the wolfCrypt library. Two versions of the wolfCrypt
  12. cryptography library have been FIPS 140-2 validated (Certificate #2425 and
  13. certificate #3389). For additional information, visit the wolfCrypt FIPS FAQ
  14. (https://www.wolfssl.com/license/fips/) or contact fips@wolfssl.com
  15. *** Why choose wolfSSL? ***
  16. There are many reasons to choose wolfSSL as your embedded SSL solution. Some of
  17. the top reasons include size (typical footprint sizes range from 20-100 kB),
  18. support for the newest standards (SSL 3.0, TLS 1.0, TLS 1.1, TLS 1.2, TLS 1.3,
  19. DTLS 1.0, and DTLS 1.2), current and progressive cipher support (including
  20. stream ciphers), multi-platform, royalty free, and an OpenSSL compatibility API
  21. to ease porting into existing applications which have previously used the
  22. OpenSSL package. For a complete feature list, see chapter 4 of the wolfSSL
  23. manual. (https://www.wolfssl.com/docs/wolfssl-manual/ch4/)
  24. *** Notes, Please read ***
  25. Note 1)
  26. wolfSSL as of 3.6.6 no longer enables SSLv3 by default. wolfSSL also no longer
  27. supports static key cipher suites with PSK, RSA, or ECDH. This means if you
  28. plan to use TLS cipher suites you must enable DH (DH is on by default), or
  29. enable ECC (ECC is on by default), or you must enable static key cipher suites
  30. with
  31. WOLFSSL_STATIC_DH
  32. WOLFSSL_STATIC_RSA
  33. or
  34. WOLFSSL_STATIC_PSK
  35. though static key cipher suites are deprecated and will be removed from future
  36. versions of TLS. They also lower your security by removing PFS.
  37. When compiling ssl.c, wolfSSL will now issue a compiler error if no cipher
  38. suites are available. You can remove this error by defining
  39. WOLFSSL_ALLOW_NO_SUITES in the event that you desire that, i.e., you're not
  40. using TLS cipher suites.
  41. Note 2)
  42. wolfSSL takes a different approach to certificate verification than OpenSSL
  43. does. The default policy for the client is to verify the server, this means
  44. that if you don't load CAs to verify the server you'll get a connect error,
  45. no signer error to confirm failure (-188).
  46. If you want to mimic OpenSSL behavior of having SSL_connect succeed even if
  47. verifying the server fails and reducing security you can do this by calling:
  48. wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
  49. before calling wolfSSL_new();. Though it's not recommended.
  50. Note 3)
  51. The enum values SHA, SHA256, SHA384, SHA512 are no longer available when
  52. wolfSSL is built with --enable-opensslextra (OPENSSL_EXTRA) or with the macro
  53. NO_OLD_SHA_NAMES. These names get mapped to the OpenSSL API for a single call
  54. hash function. Instead the name WC_SHA, WC_SHA256, WC_SHA384 and WC_SHA512
  55. should be used for the enum name.
  56. *** end Notes ***
  57. # wolfSSL Release 4.8.1 (July 16, 2021)
  58. Release 4.8.1 of wolfSSL embedded TLS has an OCSP vulnerability fix:
  59. ### Vulnerabilities
  60. * [High] OCSP verification issue when response is for a certificate with no relation to the chain in question BUT that response contains the NoCheck extension which effectively disables ALL verification of that one cert. Users who should upgrade to 4.8.1 are TLS client users doing OCSP, TLS server users doing mutual auth with OCSP, and CertManager users doing OCSP independent of TLS. Thanks to Jan Nauber, Marco Smeets, Werner Rueschenbaum and Alissa Kim of Volkswagen Infotainment for the report.
  61. # wolfSSL Release 4.8.0 (July 09, 2021)
  62. Release 4.8.0 of wolfSSL embedded TLS has bug fixes and new features including:
  63. ### Vulnerabilities
  64. * [Low] CVE-2021-37155: OCSP request/response verification issue. In the case that the serial number in the OCSP request differs from the serial number in the OCSP response the error from the comparison was not resulting in a failed verification. We recommend users that have wolfSSL version 4.6.0 and 4.7.0 with OCSP enabled update their version of wolfSSL. Version 4.5.0 and earlier are not affected by this report. Thanks to Rainer Mueller-Amersdorffer, Roee Yankelevsky, Barak Gutman, Hila Cohen and Shoshi Berko (from CYMOTIVE Technologies and CARIAD) for the report.
  65. * [Low] CVE-2021-24116: Side-Channel cache look up vulnerability in base64 PEM decoding for versions of wolfSSL 4.5.0 and earlier. Versions 4.6.0 and up contain a fix and do not need to be updated for this report. If decoding a PEM format private key using version 4.5.0 and older of wolfSSL then we recommend updating the version of wolfSSL used. Thanks to Florian Sieck, Jan Wichelmann, Sebastian Berndt and Thomas Eisenbarth for the report.
  66. ### New Feature Additions
  67. ###### New Product
  68. * Added wolfSentry build with --enable-wolfsentry and tie-ins to wolfSSL code for use with wolfSentry
  69. ###### Ports
  70. * QNX CAAM driver added, supporting ECC black keys, CMAC, BLOBs, and TRNG use
  71. * _WIN32_WCE wolfCrypt port added
  72. * INTIME_RTOS directory support added
  73. * Added support for STM32G0
  74. * Renesas RX: Added intrinsics for rot[rl], revl (thanks @rliebscher)
  75. * Added support for running wolfcrypt/test/testwolfcrypt on Dolphin emulator to test DEVKITPRO port
  76. * Zephyr project port updated to latest version 2.6.X
  77. ###### ASN1 and PKCS
  78. * Storing policy constraint extension from certificate added
  79. * Added support for NID_favouriteDrink pilot
  80. * Added the API function wc_EncryptPKCS8Key to handle encrypting a DER, PKCS#8-formatted key
  81. ###### Compatibility Layer Additions
  82. * Open Source PORTS Added/Updated
  83. - OpenVPN
  84. - OpenLDAP
  85. - socat-1.7.4.1
  86. - Updated QT port for 5.15.2
  87. * Changes to extend set_cipher_list() compatibility layer API to have set_ciphersuites compatibility layer API capability
  88. * Added more support for SHA3 in the EVP layer
  89. * API Added
  90. - MD5/MD5_Transform
  91. - SHA/SHA_Transform/SHA1_Transform
  92. - SHA224/SHA256_Transform/SHA512_Transform
  93. - SSL_CTX_get0_param/SSL_CTX_set1_param
  94. - X509_load_crl_file
  95. - SSL_CTX_get_min_proto_version
  96. - EVP_ENCODE_CTX_new
  97. - EVP_ENCODE_CTX_free
  98. - EVP_EncodeInit
  99. - EVP_EncodeUpdate
  100. - EVP_EncodeFinal
  101. - EVP_DecodeInit
  102. - EVP_DecodeUpdate
  103. - EVP_DecodeFinal
  104. - EVP_PKEY_print_public
  105. - BIO_tell
  106. - THREADID_current
  107. - THREADID_hash
  108. - SSL_CTX_set_ecdh_auto
  109. - RAND_set_rand_method()
  110. - X509_LOOKUP_ctrl()
  111. - RSA_bits
  112. - EC_curve_nist2nid
  113. - EC_KEY_set_group
  114. - SSL_SESSION_set_cipher
  115. - SSL_set_psk_use_session_callback
  116. - EVP_PKEY_param_check
  117. - DH_get0_pqg
  118. - CRYPTO_get_ex_new_index
  119. - SSL_SESSION_is_resumable
  120. - SSL_CONF_cmd
  121. - SSL_CONF_CTX_finish
  122. - SSL_CTX_keylog_cb_func
  123. - SSL_CTX_set_keylog_callback
  124. - SSL_CTX_get_keylog_callback
  125. ###### Misc.
  126. * Added wolfSSL_CTX_get_TicketEncCtx getter function to return the ticket encryption ctx value
  127. * Added wc_AesKeyWrap_ex and wc_AesKeyUnWrap_ex APIs to accept an Aes object to use for the AES operations
  128. * Added implementation of AES-GCM streaming (--enable-aesgcm-stream)
  129. * Added deterministic generation of k with ECC following RFC6979 when the macro WOLFSL_ECDSA_DETERMINISTIC_K is defined and wc_ecc_set_deterministic function is called
  130. * Implemented wc_DsaParamsDecode and wc_DsaKeyToParamsDer
  131. * Asynchronous support for TLS v1.3 TLSX ECC/DH key generation and key agreement
  132. * Added crypto callback support for Ed/Curve25519 and SHA2-512/384
  133. * TLS 1.3 wolfSSL_key_update_response function added to see if a update response is needed
  134. ### Fixes
  135. * Fix for detecting extra unused bytes that are in an ASN1 sequence appended to the end of a valid ECC signature
  136. * Fix for keyid with ktri CMS (breaks compatibility with previous keyid ASN1 syntax)
  137. * Fix for failed handshake if a client offers more than 150 cipher suites. Thanks to Marcel Maehren, Philipp Nieting, Robert Merget from Ruhr University Bochum Sven Hebrok, Juraj Somorovsky from Paderborn University
  138. * Fix for default order of deprecated elliptic curves SECP224R1, SECP192R1, SECP160R1. Thanks to Marcel Maehren, Philipp Nieting, Robert Merget from Ruhr University Bochum Sven Hebrok, Juraj Somorovsky from Paderborn University
  139. * Fix for corner TLS downgrade case where a TLS 1.3 setup that allows for downgrades but has TLS 1.3 set as the minimum version would still downgrade to TLS 1.2
  140. ###### PKCS7 (Multiple fixes throughout regarding memory leaks with SMIME and heap buffer overflows due to streaming functionality)
  141. * Fix PKCS7 dynamic content save/restore in PKCS7_VerifySignedData
  142. * Fix for heap buffer overflow on compare with wc_PKCS7_DecryptKtri
  143. * Fix for heap buffer overflow with wc_PKCS7_VerifySignedData
  144. * Fix for heap buffer overflow with wc_PKCS7_DecodeEnvelopedData
  145. * Check size of public key used with certificate passed into wc_PKCS7_InitWithCert before XMEMCPY to avoid overflow
  146. * Fix for heap buffer overflow fix for wolfSSL_SMIME_read_PKCS7
  147. * Fix to cleanly free memory in error state with wolfSSL_SMIME_read_PKCS7
  148. * SMIME error checking improvements and canonicalize multi-part messages before hashing
  149. ###### DTLS Fixes
  150. * DTLS fix to correctly move the Tx sequence number forward
  151. * DTLS fix for sequence and epoch number with secure renegotiation cookie exchange
  152. * Fix for Chacha-Poly AEAD for DTLS 1.2 with secure renegotiation
  153. ###### PORT Fixes
  154. * Fix AES, aligned key for the HW module with DCP port
  155. * Fix ATECC608A TNGTLS certificate size issue (thanks @vppillai)
  156. * Fixes for mingw compile warnings
  157. * Fixes for NXP LTC ECC/RSA
  158. * Fix ESP32 RSA hw accelerator initialization issue
  159. * Fixes for STM32 PKA with ECC
  160. * Fixes for STM32 AES GCM for HAL's that support byte sized headers
  161. * Espressif ESP32 SHA_CTX macro conflict resolved
  162. ###### Math Library Fixes
  163. * For platforms that support limits.h or windows make sure both SIZEOF_LONG_LONG and SIZEOF_LONG are set to avoid issues with CTC_SETTINGS
  164. * SP C 32/64: fix corner cases around subtraction affecting RSA PSS use
  165. * Fix to return the error code from sp_cond_swap_ct when malloc fails
  166. * Fix potential memory leak with small stack in the function fp_gcd
  167. * Static Analysis Fixes
  168. * Fixes made from Coverity analysis including:
  169. * Cleanups for some return values,
  170. * Fix for leak with wolfSSL_a2i_ASN1_INTEGER
  171. * Sanity check on length in wolfSSL_BN_rand
  172. * Sanity check size in TLSX_Parse catching a possible integer overflow
  173. * Fixes found with -fsanitize=undefined testing
  174. * Fix null dereferences or undefined memcpy calls
  175. * Fix alignment in myCryptoDevCb
  176. * Fix default DTLS context assignment
  177. * Added align configure option to force data alignment
  178. ###### Misc.
  179. * Fix for wolfSSL_ASN1_TIME_adj set length
  180. * Fix for freeing structure on error case in the function AddTrustedPeer
  181. * Return value of SSL_read when called after bidirectional shutdown
  182. * Fix for build options ./configure --enable-dtls --disable-asn
  183. * FIx for detection of a salt length from an RSA PSS signature
  184. * Fix to free up globalRNGMutex mutex when cleaning up global RNG
  185. * Fix leak when multiple hardware names are in SAN
  186. * Fix nonblocking ret value from CRL I/O callbacks
  187. * Fix wolfSSL_BIO_free_all return type to better match for compatibility layer
  188. * Fix for make distcheck, maintainer-clean, to allow distribution builds
  189. * Fix for async with fragmented packets
  190. * Fix for the build or RSA verify or public only
  191. * Fix for return value of wolfSSL_BIO_set_ssl to better match expected compatibility layer return value
  192. * Fix for sanity checks on size of issuer hash and key along with better freeing on error cases with DecodeBasicOcspResponse
  193. * Fix for potential memory leak with wolfSSL_OCSP_cert_to_id
  194. ### Improvements/Optimizations
  195. ###### DTLS/TLS Code Base
  196. * Improved TLS v1.3 time rollover support
  197. * TLS 1.3 PSK: use the hash algorithm to choose cipher suite
  198. * TLS Extended Master Secret ext: TLS13 - send in second Client Hello if in first
  199. * TLS Encrypt then MAC: check all padding bytes are the same value
  200. * wolfSSL_GetMaxRecordSize updated to now take additional cipher data into account
  201. * Updated session export/import with DTLS to handle a new internal options flag
  202. * Refactored dtls_expected_peer_handshake_number handling
  203. * Added wolfSSL_CTX_get_ephemeral_key and wolfSSL_get_ephemeral_key for loading a constant key in place of an ephemeral one
  204. * Improved checking of XSNPRINTF return value in DecodePolicyOID
  205. ###### Build Options and Warnings
  206. * Added wolfSSL_CTX_set_verify to the ABI list
  207. * Adjusted FP_ECC build to not allow SECP160R1, SECP160R2, SECP160K1 and SECP224K1. FP_ECC does not work with scalars that are the length of the order when the order is longer than the prime.
  208. * Added CMake support for CURVE25519, ED25519, CURVE448, and ED448
  209. * cmake addition to test paths when building
  210. * Added support for session tickets in CMake
  211. * Added support for reproducible builds with CMake
  212. * Turn on reproducible-build by default when enable-distro
  213. * Windows Project: Include the X448 and Ed448 files
  214. * GCC-11 compile time warning fixes
  215. * Fix for compiling build of ./configure '--disable-tlsv12' '-enable-pkcallbacks'
  216. * Added build error for insecure build combination of secure renegotiation enabled with extended master secret disabled when session resumption is enabled
  217. * Updated building and running with Apple M1
  218. * Apache httpd build without TLS 1.3 macro guard added
  219. * Enable SHA3 and SHAKE256 requirements automatically when ED448 is enabled
  220. * Added option for AES CBC cipher routines to return BAD_LENGTH_E when called with an input buffer length not a multiple of AES_BLOCK_SIZE
  221. * Macro WOLFSSL_SP_INT_DIGIT_ALIGN added for alignment on buffers with SP build. This was needed for compiler building on a Renesas board.
  222. * Build support with no hashes enabled an no RNG compiled in
  223. * Allow use of FREESCALE hardware RNG without a specific port
  224. * Resolved some warnings with Windows builds and PBKDF disabled
  225. * Updated the version of autoconf and automake along with fixes for some new GCC-10 warnings
  226. ###### Math Libraries
  227. * SP: Thumb implementation that works with clang
  228. * SP math all: sp_cmp handling of negative values
  229. * SP C ECC: mont sub - always normalize after sub before check for add
  230. * TFM math library prime checking, added more error checks with small stack build
  231. * Sanity checks on 0 value with GCD math function
  232. * fp_exptmod_ct error checking and small stack variable free on error
  233. * Sanity check on supported digit size when calling mp_add_d in non fastmath builds
  234. * Support for mp_dump with SP Math ALL
  235. * WOLFSSL_SP_NO_MALLOC for both the normal SP build and small SP build now
  236. * WOLFSSL_SP_NO_DYN_STACK added for SP small code that is not small stack build to avoid dynamic stack
  237. ###### PKCS 7/8
  238. * wc_PKCS7_DecodeCompressedData to optionally handle a packet without content wrapping
  239. * Added setting of content type parsed with PKCS7 wc_PKCS7_DecodeAuthEnvelopedData and wc_PKCS7_DecodeEnvelopedData
  240. * PKCS8 code improvements and refactoring
  241. ###### Misc.
  242. * Sanity checks on null inputs to the functions wolfSSL_X509_get_serialNumber and wolfSSL_X509_NAME_print_ex
  243. * Added ARM CryptoCell support for importing public key with wc_ecc_import_x963_ex()
  244. * Improved checking for possible use of key->dp == NULL cases with ECC functions
  245. * Updated SHAKE256 to compile with NIST FIPS 202 standard and added support for OID values (thanks to strongX509)
  246. * Improved ECC operations when using WOLFSSL_NO_MALLOC
  247. * Added WOLFSSL_SNIFFER_FATAL_ERROR for an return value when sniffer is in a fatal state
  248. * Allow parsing spaces in Base64_SkipNewline
  249. * Issue callback when exceeding depth limit rather than error out with OPENSSL_EXTRA build
  250. * Added NXP LTC RSA key generation acceleration
  251. For additional vulnerability information visit the vulnerability page at
  252. https://www.wolfssl.com/docs/security-vulnerabilities/
  253. See INSTALL file for build instructions.
  254. More info can be found on-line at https://wolfssl.com/wolfSSL/Docs.html
  255. *** Resources ***
  256. [wolfSSL Website](https://www.wolfssl.com/)
  257. [wolfSSL Wiki](https://github.com/wolfSSL/wolfssl/wiki)
  258. [FIPS FAQ](https://wolfssl.com/license/fips)
  259. [wolfSSL Documents](https://wolfssl.com/wolfSSL/Docs.html)
  260. [wolfSSL Manual](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-toc.html)
  261. [wolfSSL API Reference]
  262. (https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-wolfssl-api-reference.html)
  263. [wolfCrypt API Reference]
  264. (https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-18-wolfcrypt-api-reference.html)
  265. [TLS 1.3](https://www.wolfssl.com/docs/tls13/)
  266. [wolfSSL Vulnerabilities]
  267. (https://www.wolfssl.com/docs/security-vulnerabilities/)
  268. Additional wolfSSL Examples](https://github.com/wolfssl/wolfssl-examples)