xref: /optee_os/lib/libmbedtls/mbedtls/ChangeLog (revision 039e02df2716a0ed886b56e1e07b7ac1d8597228)
1*039e02dfSJerome ForissierMbed TLS ChangeLog (Sorted per branch, date)
2*039e02dfSJerome Forissier
3*039e02dfSJerome Forissier= Mbed TLS 2.28.1 branch released 2022-07-11
4*039e02dfSJerome Forissier
5*039e02dfSJerome ForissierDefault behavior changes
6*039e02dfSJerome Forissier   * mbedtls_cipher_set_iv will now fail with ChaCha20 and ChaCha20+Poly1305
7*039e02dfSJerome Forissier     for IV lengths other than 12. The library was silently overwriting this
8*039e02dfSJerome Forissier     length with 12, but did not inform the caller about it. Fixes #4301.
9*039e02dfSJerome Forissier
10*039e02dfSJerome ForissierFeatures
11*039e02dfSJerome Forissier   * When MBEDTLS_PSA_CRYPTO_CONFIG is enabled, you may list the PSA crypto
12*039e02dfSJerome Forissier     feature requirements in the file named by the new macro
13*039e02dfSJerome Forissier     MBEDTLS_PSA_CRYPTO_CONFIG_FILE instead of the default psa/crypto_config.h.
14*039e02dfSJerome Forissier     Furthermore you may name an additional file to include after the main
15*039e02dfSJerome Forissier     file with the macro MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE.
16*039e02dfSJerome Forissier
17*039e02dfSJerome ForissierSecurity
18*039e02dfSJerome Forissier   * Zeroize dynamically-allocated buffers used by the PSA Crypto key storage
19*039e02dfSJerome Forissier     module before freeing them. These buffers contain secret key material, and
20*039e02dfSJerome Forissier     could thus potentially leak the key through freed heap.
21*039e02dfSJerome Forissier   * Fix a potential heap buffer overread in TLS 1.2 server-side when
22*039e02dfSJerome Forissier     MBEDTLS_USE_PSA_CRYPTO is enabled, an opaque key (created with
23*039e02dfSJerome Forissier     mbedtls_pk_setup_opaque()) is provisioned, and a static ECDH ciphersuite
24*039e02dfSJerome Forissier     is selected. This may result in an application crash or potentially an
25*039e02dfSJerome Forissier     information leak.
26*039e02dfSJerome Forissier   * Fix a buffer overread in DTLS ClientHello parsing in servers with
27*039e02dfSJerome Forissier     MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE enabled. An unauthenticated client
28*039e02dfSJerome Forissier     or a man-in-the-middle could cause a DTLS server to read up to 255 bytes
29*039e02dfSJerome Forissier     after the end of the SSL input buffer. The buffer overread only happens
30*039e02dfSJerome Forissier     when MBEDTLS_SSL_IN_CONTENT_LEN is less than a threshold that depends on
31*039e02dfSJerome Forissier     the exact configuration: 258 bytes if using mbedtls_ssl_cookie_check(),
32*039e02dfSJerome Forissier     and possibly up to 571 bytes with a custom cookie check function.
33*039e02dfSJerome Forissier     Reported by the Cybeats PSI Team.
34*039e02dfSJerome Forissier
35*039e02dfSJerome ForissierBugfix
36*039e02dfSJerome Forissier   * Fix a memory leak if mbedtls_ssl_config_defaults() is called twice.
37*039e02dfSJerome Forissier   * Fix several bugs (warnings, compiler and linker errors, test failures)
38*039e02dfSJerome Forissier     in reduced configurations when MBEDTLS_USE_PSA_CRYPTO is enabled.
39*039e02dfSJerome Forissier   * Fix a bug in (D)TLS curve negotiation: when MBEDTLS_USE_PSA_CRYPTO was
40*039e02dfSJerome Forissier     enabled and an ECDHE-ECDSA or ECDHE-RSA key exchange was used, the
41*039e02dfSJerome Forissier     client would fail to check that the curve selected by the server for
42*039e02dfSJerome Forissier     ECDHE was indeed one that was offered. As a result, the client would
43*039e02dfSJerome Forissier     accept any curve that it supported, even if that curve was not allowed
44*039e02dfSJerome Forissier     according to its configuration. Fixes #5291.
45*039e02dfSJerome Forissier   * Fix unit tests that used 0 as the file UID. This failed on some
46*039e02dfSJerome Forissier     implementations of PSA ITS. Fixes #3838.
47*039e02dfSJerome Forissier   * Fix API violation in mbedtls_md_process() test by adding a call to
48*039e02dfSJerome Forissier     mbedtls_md_starts(). Fixes #2227.
49*039e02dfSJerome Forissier   * Fix compile errors when MBEDTLS_HAVE_TIME is not defined. Add tests
50*039e02dfSJerome Forissier     to catch bad uses of time.h.
51*039e02dfSJerome Forissier   * Fix the library search path when building a shared library with CMake
52*039e02dfSJerome Forissier     on Windows.
53*039e02dfSJerome Forissier   * Fix bug in the alert sending function mbedtls_ssl_send_alert_message()
54*039e02dfSJerome Forissier     potentially leading to corrupted alert messages being sent in case
55*039e02dfSJerome Forissier     the function needs to be re-called after initially returning
56*039e02dfSJerome Forissier     MBEDTLS_SSL_WANT_WRITE. Fixes #1916.
57*039e02dfSJerome Forissier   * In configurations with MBEDTLS_SSL_DTLS_CONNECTION_ID enabled but none of
58*039e02dfSJerome Forissier     MBEDTLS_SSL_HW_RECORD_ACCEL, MBEDTLS_SSL_EXPORT_KEYS or MBEDTLS_DEBUG_C,
59*039e02dfSJerome Forissier     DTLS handshakes using CID would crash due to a null pointer dereference.
60*039e02dfSJerome Forissier     Fix this. Fixes #3998.
61*039e02dfSJerome Forissier   * Fix incorrect documentation of mbedtls_x509_crt_profile. The previous
62*039e02dfSJerome Forissier     documentation stated that the `allowed_pks` field applies to signatures
63*039e02dfSJerome Forissier     only, but in fact it does apply to the public key type of the end entity
64*039e02dfSJerome Forissier     certificate, too. Fixes #1992.
65*039e02dfSJerome Forissier   * Fix PSA cipher multipart operations using ARC4. Previously, an IV was
66*039e02dfSJerome Forissier     required but discarded. Now, an IV is rejected, as it should be.
67*039e02dfSJerome Forissier   * Fix undefined behavior in mbedtls_asn1_find_named_data(), where val is
68*039e02dfSJerome Forissier     not NULL and val_len is zero.
69*039e02dfSJerome Forissier   * psa_raw_key_agreement() now returns PSA_ERROR_BUFFER_TOO_SMALL when
70*039e02dfSJerome Forissier     applicable. Fixes #5735.
71*039e02dfSJerome Forissier   * Fix a bug in the x25519 example program where the removal of
72*039e02dfSJerome Forissier     MBEDTLS_ECDH_LEGACY_CONTEXT caused the program not to run. Fixes #4901 and
73*039e02dfSJerome Forissier     #3191.
74*039e02dfSJerome Forissier   * Encode X.509 dates before 1/1/2000 as UTCTime rather than
75*039e02dfSJerome Forissier     GeneralizedTime. Fixes #5465.
76*039e02dfSJerome Forissier   * Fix order value of curve x448.
77*039e02dfSJerome Forissier   * Fix string representation of DNs when outputting values containing commas
78*039e02dfSJerome Forissier     and other special characters, conforming to RFC 1779. Fixes #769.
79*039e02dfSJerome Forissier   * Silence a warning from GCC 12 in the selftest program. Fixes #5974.
80*039e02dfSJerome Forissier   * Fix mbedtls_asn1_write_mpi() writing an incorrect encoding of 0.
81*039e02dfSJerome Forissier   * Fix resource leaks in mbedtls_pk_parse_public_key() in low
82*039e02dfSJerome Forissier     memory conditions.
83*039e02dfSJerome Forissier   * Fix server connection identifier setting for outgoing encrypted records
84*039e02dfSJerome Forissier     on DTLS 1.2 session resumption. After DTLS 1.2 session resumption with
85*039e02dfSJerome Forissier     connection identifier, the Mbed TLS client now properly sends the server
86*039e02dfSJerome Forissier     connection identifier in encrypted record headers. Fix #5872.
87*039e02dfSJerome Forissier   * Fix a null pointer dereference when performing some operations on zero
88*039e02dfSJerome Forissier     represented with 0 limbs (specifically mbedtls_mpi_mod_int() dividing
89*039e02dfSJerome Forissier     by 2, and mbedtls_mpi_write_string() in base 2).
90*039e02dfSJerome Forissier   * Fix record sizes larger than 16384 being sometimes accepted despite being
91*039e02dfSJerome Forissier     non-compliant. This could not lead to a buffer overflow. In particular,
92*039e02dfSJerome Forissier     application data size was already checked correctly.
93*039e02dfSJerome Forissier
94*039e02dfSJerome ForissierChanges
95*039e02dfSJerome Forissier   * Assume source files are in UTF-8 when using MSVC with CMake.
96*039e02dfSJerome Forissier
97*039e02dfSJerome Forissier= mbed TLS 2.28.0 branch released 2021-12-17
98*039e02dfSJerome Forissier
99*039e02dfSJerome ForissierAPI changes
100*039e02dfSJerome Forissier   * Some fields of mbedtls_ssl_session and mbedtls_ssl_config are in a
101*039e02dfSJerome Forissier     different order. This only affects applications that define such
102*039e02dfSJerome Forissier     structures directly or serialize them.
103*039e02dfSJerome Forissier
104*039e02dfSJerome ForissierRequirement changes
105*039e02dfSJerome Forissier   * Sign-magnitude and one's complement representations for signed integers are
106*039e02dfSJerome Forissier     not supported. Two's complement is the only supported representation.
107*039e02dfSJerome Forissier
108*039e02dfSJerome ForissierRemovals
109*039e02dfSJerome Forissier   * Remove config option MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES,
110*039e02dfSJerome Forissier     which allowed SHA-1 in the default TLS configuration for certificate
111*039e02dfSJerome Forissier     signing. It was intended to facilitate the transition in environments
112*039e02dfSJerome Forissier     with SHA-1 certificates. SHA-1 is considered a weak message digest and
113*039e02dfSJerome Forissier     its use constitutes a security risk.
114*039e02dfSJerome Forissier   * Remove the partial support for running unit tests via Greentea on Mbed OS,
115*039e02dfSJerome Forissier     which had been unmaintained since 2018.
116*039e02dfSJerome Forissier
117*039e02dfSJerome ForissierFeatures
118*039e02dfSJerome Forissier   * The identifier of the CID TLS extension can be configured by defining
119*039e02dfSJerome Forissier     MBEDTLS_TLS_EXT_CID at compile time.
120*039e02dfSJerome Forissier   * Warn if errors from certain functions are ignored. This is currently
121*039e02dfSJerome Forissier     supported on GCC-like compilers and on MSVC and can be configured through
122*039e02dfSJerome Forissier     the macro MBEDTLS_CHECK_RETURN. The warnings are always enabled
123*039e02dfSJerome Forissier     (where supported) for critical functions where ignoring the return
124*039e02dfSJerome Forissier     value is almost always a bug. Enable the new configuration option
125*039e02dfSJerome Forissier     MBEDTLS_CHECK_RETURN_WARNING to get warnings for other functions. This
126*039e02dfSJerome Forissier     is currently implemented in the AES, DES and md modules, and will be
127*039e02dfSJerome Forissier     extended to other modules in the future.
128*039e02dfSJerome Forissier   * Add missing PSA macros declared by PSA Crypto API 1.0.0:
129*039e02dfSJerome Forissier     PSA_ALG_IS_SIGN_HASH, PSA_ALG_NONE, PSA_HASH_BLOCK_LENGTH, PSA_KEY_ID_NULL.
130*039e02dfSJerome Forissier   * Add new API mbedtls_ct_memcmp for constant time buffer comparison.
131*039e02dfSJerome Forissier   * Add PSA API definition for ARIA.
132*039e02dfSJerome Forissier
133*039e02dfSJerome ForissierSecurity
134*039e02dfSJerome Forissier   * Zeroize several intermediate variables used to calculate the expected
135*039e02dfSJerome Forissier     value when verifying a MAC or AEAD tag. This hardens the library in
136*039e02dfSJerome Forissier     case the value leaks through a memory disclosure vulnerability. For
137*039e02dfSJerome Forissier     example, a memory disclosure vulnerability could have allowed a
138*039e02dfSJerome Forissier     man-in-the-middle to inject fake ciphertext into a DTLS connection.
139*039e02dfSJerome Forissier   * In psa_cipher_generate_iv() and psa_cipher_encrypt(), do not read back
140*039e02dfSJerome Forissier     from the output buffer. This fixes a potential policy bypass or decryption
141*039e02dfSJerome Forissier     oracle vulnerability if the output buffer is in memory that is shared with
142*039e02dfSJerome Forissier     an untrusted application.
143*039e02dfSJerome Forissier   * Fix a double-free that happened after mbedtls_ssl_set_session() or
144*039e02dfSJerome Forissier     mbedtls_ssl_get_session() failed with MBEDTLS_ERR_SSL_ALLOC_FAILED
145*039e02dfSJerome Forissier     (out of memory). After that, calling mbedtls_ssl_session_free()
146*039e02dfSJerome Forissier     and mbedtls_ssl_free() would cause an internal session buffer to
147*039e02dfSJerome Forissier     be free()'d twice.
148*039e02dfSJerome Forissier
149*039e02dfSJerome ForissierBugfix
150*039e02dfSJerome Forissier   * Stop using reserved identifiers as local variables. Fixes #4630.
151*039e02dfSJerome Forissier   * The GNU makefiles invoke python3 in preference to python except on Windows.
152*039e02dfSJerome Forissier     The check was accidentally not performed when cross-compiling for Windows
153*039e02dfSJerome Forissier     on Linux. Fix this. Fixes #4774.
154*039e02dfSJerome Forissier   * Prevent divide by zero if either of PSA_CIPHER_ENCRYPT_OUTPUT_SIZE() or
155*039e02dfSJerome Forissier     PSA_CIPHER_UPDATE_OUTPUT_SIZE() were called using an asymmetric key type.
156*039e02dfSJerome Forissier   * Fix a parameter set but unused in psa_crypto_cipher.c. Fixes #4935.
157*039e02dfSJerome Forissier   * Don't use the obsolete header path sys/fcntl.h in unit tests.
158*039e02dfSJerome Forissier     These header files cause compilation errors in musl.
159*039e02dfSJerome Forissier     Fixes #4969.
160*039e02dfSJerome Forissier   * Fix missing constraints on x86_64 and aarch64 assembly code
161*039e02dfSJerome Forissier     for bignum multiplication that broke some bignum operations with
162*039e02dfSJerome Forissier     (at least) Clang 12.
163*039e02dfSJerome Forissier     Fixes #4116, #4786, #4917, #4962.
164*039e02dfSJerome Forissier   * Fix mbedtls_cipher_crypt: AES-ECB when MBEDTLS_USE_PSA_CRYPTO is enabled.
165*039e02dfSJerome Forissier   * Failures of alternative implementations of AES or DES single-block
166*039e02dfSJerome Forissier     functions enabled with MBEDTLS_AES_ENCRYPT_ALT, MBEDTLS_AES_DECRYPT_ALT,
167*039e02dfSJerome Forissier     MBEDTLS_DES_CRYPT_ECB_ALT or MBEDTLS_DES3_CRYPT_ECB_ALT were ignored.
168*039e02dfSJerome Forissier     This does not concern the implementation provided with Mbed TLS,
169*039e02dfSJerome Forissier     where this function cannot fail, or full-module replacements with
170*039e02dfSJerome Forissier     MBEDTLS_AES_ALT or MBEDTLS_DES_ALT. Reported by Armelle Duboc in #1092.
171*039e02dfSJerome Forissier   * Some failures of HMAC operations were ignored. These failures could only
172*039e02dfSJerome Forissier     happen with an alternative implementation of the underlying hash module.
173*039e02dfSJerome Forissier   * Fix the error returned by psa_generate_key() for a public key. Fixes #4551.
174*039e02dfSJerome Forissier   * Fix the build of sample programs when neither MBEDTLS_ERROR_C nor
175*039e02dfSJerome Forissier     MBEDTLS_ERROR_STRERROR_DUMMY is enabled.
176*039e02dfSJerome Forissier   * Fix PSA_ALG_RSA_PSS verification accepting an arbitrary salt length.
177*039e02dfSJerome Forissier     This algorithm now accepts only the same salt length for verification
178*039e02dfSJerome Forissier     that it produces when signing, as documented. Use the new algorithm
179*039e02dfSJerome Forissier     PSA_ALG_RSA_PSS_ANY_SALT to accept any salt length. Fixes #4946.
180*039e02dfSJerome Forissier   * The existing predicate macro name PSA_ALG_IS_HASH_AND_SIGN is now reserved
181*039e02dfSJerome Forissier     for algorithm values that fully encode the hashing step, as per the PSA
182*039e02dfSJerome Forissier     Crypto API specification. This excludes PSA_ALG_RSA_PKCS1V15_SIGN_RAW and
183*039e02dfSJerome Forissier     PSA_ALG_ECDSA_ANY. The new predicate macro PSA_ALG_IS_SIGN_HASH covers
184*039e02dfSJerome Forissier     all algorithms that can be used with psa_{sign,verify}_hash(), including
185*039e02dfSJerome Forissier     these two.
186*039e02dfSJerome Forissier   * Fix issue in Makefile on Linux with SHARED=1, that caused shared libraries
187*039e02dfSJerome Forissier     not to list other shared libraries they need.
188*039e02dfSJerome Forissier   * Fix a bug in mbedtls_gcm_starts() when the bit length of the iv
189*039e02dfSJerome Forissier     exceeds 2^32. Fixes #4884.
190*039e02dfSJerome Forissier   * Fix an uninitialized variable warning in test_suite_ssl.function with GCC
191*039e02dfSJerome Forissier     version 11.
192*039e02dfSJerome Forissier   * Fix the build when no SHA2 module is included. Fixes #4930.
193*039e02dfSJerome Forissier   * Fix the build when only the bignum module is included. Fixes #4929.
194*039e02dfSJerome Forissier   * Fix a potential invalid pointer dereference and infinite loop bugs in
195*039e02dfSJerome Forissier     pkcs12 functions when the password is empty. Fix the documentation to
196*039e02dfSJerome Forissier     better describe the inputs to these functions and their possible values.
197*039e02dfSJerome Forissier     Fixes #5136.
198*039e02dfSJerome Forissier   * The key usage flags PSA_KEY_USAGE_SIGN_MESSAGE now allows the MAC
199*039e02dfSJerome Forissier     operations psa_mac_compute() and psa_mac_sign_setup().
200*039e02dfSJerome Forissier   * The key usage flags PSA_KEY_USAGE_VERIFY_MESSAGE now allows the MAC
201*039e02dfSJerome Forissier     operations psa_mac_verify() and psa_mac_verify_setup().
202*039e02dfSJerome Forissier
203*039e02dfSJerome ForissierChanges
204*039e02dfSJerome Forissier   * Set config option MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE to be
205*039e02dfSJerome Forissier     disabled by default.
206*039e02dfSJerome Forissier   * Improve the performance of base64 constant-flow code. The result is still
207*039e02dfSJerome Forissier     slower than the original non-constant-flow implementation, but much faster
208*039e02dfSJerome Forissier     than the previous constant-flow implementation. Fixes #4814.
209*039e02dfSJerome Forissier   * Indicate in the error returned if the nonce length used with
210*039e02dfSJerome Forissier     ChaCha20-Poly1305 is invalid, and not just unsupported.
211*039e02dfSJerome Forissier   * The mbedcrypto library includes a new source code module constant_time.c,
212*039e02dfSJerome Forissier     containing various functions meant to resist timing side channel attacks.
213*039e02dfSJerome Forissier     This module does not have a separate configuration option, and functions
214*039e02dfSJerome Forissier     from this module will be included in the build as required. Currently
215*039e02dfSJerome Forissier     most of the interface of this module is private and may change at any
216*039e02dfSJerome Forissier     time.
217817466cbSJens Wiklander
2187901324dSJerome Forissier= mbed TLS 2.27.0 branch released 2021-07-07
2197901324dSJerome Forissier
2207901324dSJerome ForissierAPI changes
2217901324dSJerome Forissier   * Update AEAD output size macros to bring them in line with the PSA Crypto
2227901324dSJerome Forissier     API version 1.0 spec. This version of the spec parameterizes them on the
2237901324dSJerome Forissier     key type used, as well as the key bit-size in the case of
2247901324dSJerome Forissier     PSA_AEAD_TAG_LENGTH.
2257901324dSJerome Forissier     The old versions of these macros were renamed and deprecated as follows:
2267901324dSJerome Forissier     - PSA_AEAD_TAG_LENGTH          -> PSA_AEAD_TAG_LENGTH_1_ARG
2277901324dSJerome Forissier     - PSA_AEAD_ENCRYPT_OUTPUT_SIZE -> PSA_AEAD_ENCRYPT_OUTPUT_SIZE_2_ARG
2287901324dSJerome Forissier     - PSA_AEAD_DECRYPT_OUTPUT_SIZE -> PSA_AEAD_DECRYPT_OUTPUT_SIZE_2_ARG
2297901324dSJerome Forissier     - PSA_AEAD_UPDATE_OUTPUT_SIZE  -> PSA_AEAD_UPDATE_OUTPUT_SIZE_2_ARG
2307901324dSJerome Forissier     - PSA_AEAD_FINISH_OUTPUT_SIZE  -> PSA_AEAD_FINISH_OUTPUT_SIZE_1_ARG
2317901324dSJerome Forissier     - PSA_AEAD_VERIFY_OUTPUT_SIZE  -> PSA_AEAD_VERIFY_OUTPUT_SIZE_1_ARG
2327901324dSJerome Forissier   * Implement one-shot cipher functions, psa_cipher_encrypt and
2337901324dSJerome Forissier     psa_cipher_decrypt, according to the PSA Crypto API 1.0.0
2347901324dSJerome Forissier     specification.
2357901324dSJerome Forissier
2367901324dSJerome ForissierRequirement changes
2377901324dSJerome Forissier   * The library now uses the %zu format specifier with the printf() family of
2387901324dSJerome Forissier     functions, so requires a toolchain that supports it. This change does not
2397901324dSJerome Forissier     affect the maintained LTS branches, so when contributing changes please
2407901324dSJerome Forissier     bear this in mind and do not add them to backported code.
2417901324dSJerome Forissier
2427901324dSJerome ForissierFeatures
2437901324dSJerome Forissier   * Add mbedtls_rsa_rsassa_pss_sign_ext() function allowing to generate a
2447901324dSJerome Forissier     signature with a specific salt length. This function allows to validate
2457901324dSJerome Forissier     test cases provided in the NIST's CAVP test suite. Contributed by Cédric
2467901324dSJerome Forissier     Meuter in PR #3183.
2477901324dSJerome Forissier   * Added support for built-in driver keys through the PSA opaque crypto
2487901324dSJerome Forissier     driver interface. Refer to the documentation of
2497901324dSJerome Forissier     MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS for more information.
2507901324dSJerome Forissier   * Implement psa_sign_message() and psa_verify_message().
2517901324dSJerome Forissier   * The new function mbedtls_mpi_random() generates a random value in a
2527901324dSJerome Forissier     given range uniformly.
2537901324dSJerome Forissier   * Implement psa_mac_compute() and psa_mac_verify() as defined in the
2547901324dSJerome Forissier     PSA Cryptograpy API 1.0.0 specification.
2557901324dSJerome Forissier   * MBEDTLS_ECP_MAX_BITS is now determined automatically from the configured
2567901324dSJerome Forissier     curves and no longer needs to be configured explicitly to save RAM.
2577901324dSJerome Forissier
2587901324dSJerome ForissierSecurity
2597901324dSJerome Forissier   * Fix a bias in the generation of finite-field Diffie-Hellman-Merkle (DHM)
2607901324dSJerome Forissier     private keys and of blinding values for DHM and elliptic curves (ECP)
2617901324dSJerome Forissier     computations. Reported by FlorianF89 in #4245.
2627901324dSJerome Forissier   * Fix a potential side channel vulnerability in ECDSA ephemeral key generation.
2637901324dSJerome Forissier     An adversary who is capable of very precise timing measurements could
2647901324dSJerome Forissier     learn partial information about the leading bits of the nonce used for the
2657901324dSJerome Forissier     signature, allowing the recovery of the private key after observing a
2667901324dSJerome Forissier     large number of signature operations. This completes a partial fix in
2677901324dSJerome Forissier     Mbed TLS 2.20.0.
2687901324dSJerome Forissier   * It was possible to configure MBEDTLS_ECP_MAX_BITS to a value that is
2697901324dSJerome Forissier     too small, leading to buffer overflows in ECC operations. Fail the build
2707901324dSJerome Forissier     in such a case.
2717901324dSJerome Forissier   * An adversary with access to precise enough information about memory
2727901324dSJerome Forissier     accesses (typically, an untrusted operating system attacking a secure
2737901324dSJerome Forissier     enclave) could recover an RSA private key after observing the victim
2747901324dSJerome Forissier     performing a single private-key operation. Found and reported by
2757901324dSJerome Forissier     Zili KOU, Wenjian HE, Sharad Sinha, and Wei ZHANG.
2767901324dSJerome Forissier   * An adversary with access to precise enough timing information (typically, a
2777901324dSJerome Forissier     co-located process) could recover a Curve25519 or Curve448 static ECDH key
2787901324dSJerome Forissier     after inputting a chosen public key and observing the victim performing the
2797901324dSJerome Forissier     corresponding private-key operation. Found and reported by Leila Batina,
2807901324dSJerome Forissier     Lukas Chmielewski, Björn Haase, Niels Samwel and Peter Schwabe.
2817901324dSJerome Forissier
2827901324dSJerome ForissierBugfix
2837901324dSJerome Forissier   * Add printf function attributes to mbedtls_debug_print_msg to ensure we
2847901324dSJerome Forissier     get printf format specifier warnings.
2857901324dSJerome Forissier   * Fix premature fopen() call in mbedtls_entropy_write_seed_file which may
2867901324dSJerome Forissier     lead to seed file corruption in the case where the path to the seed file is
2877901324dSJerome Forissier     equal to MBEDTLS_PLATFORM_STD_NV_SEED_FILE. Contributed by Victor
2887901324dSJerome Forissier     Krasnoshchok in #3616.
2897901324dSJerome Forissier   * PSA functions other than psa_open_key now return PSA_ERROR_INVALID_HANDLE
2907901324dSJerome Forissier     rather than PSA_ERROR_DOES_NOT_EXIST for an invalid handle, bringing them
2917901324dSJerome Forissier     in line with version 1.0.0 of the specification. Fix #4162.
2927901324dSJerome Forissier   * PSA functions creating a key now return PSA_ERROR_INVALID_ARGUMENT rather
2937901324dSJerome Forissier     than PSA_ERROR_INVALID_HANDLE when the identifier specified for the key
2947901324dSJerome Forissier     to create is not valid, bringing them in line with version 1.0.0 of the
2957901324dSJerome Forissier     specification. Fix #4271.
2967901324dSJerome Forissier   * Fix some cases in the bignum module where the library constructed an
2977901324dSJerome Forissier     unintended representation of the value 0 which was not processed
2987901324dSJerome Forissier     correctly by some bignum operations. This could happen when
2997901324dSJerome Forissier     mbedtls_mpi_read_string() was called on "-0", or when
3007901324dSJerome Forissier     mbedtls_mpi_mul_mpi() and mbedtls_mpi_mul_int() was called with one of
3017901324dSJerome Forissier     the arguments being negative and the other being 0. Fixes #4643.
3027901324dSJerome Forissier   * Fix a bug in ECDSA that would cause it to fail when the hash is all-bits
3037901324dSJerome Forissier     zero. Fixes #1792
3047901324dSJerome Forissier   * Fix a compilation error when MBEDTLS_ECP_RANDOMIZE_MXZ_ALT is
3057901324dSJerome Forissier     defined. Fixes #4217.
3067901324dSJerome Forissier   * Fix an incorrect error code when parsing a PKCS#8 private key.
3077901324dSJerome Forissier   * In a TLS client, enforce the Diffie-Hellman minimum parameter size
3087901324dSJerome Forissier     set with mbedtls_ssl_conf_dhm_min_bitlen() precisely. Before, the
3097901324dSJerome Forissier     minimum size was rounded down to the nearest multiple of 8.
3107901324dSJerome Forissier   * In library/net_sockets.c, _POSIX_C_SOURCE and _XOPEN_SOURCE are
3117901324dSJerome Forissier     defined to specific values.  If the code is used in a context
3127901324dSJerome Forissier     where these are already defined, this can result in a compilation
3137901324dSJerome Forissier     error.  Instead, assume that if they are defined, the values will
3147901324dSJerome Forissier     be adequate to build Mbed TLS.
3157901324dSJerome Forissier   * The cipher suite TLS-RSA-WITH-CAMELLIA-256-GCM-SHA384 was not available
3167901324dSJerome Forissier     when SHA-1 was disabled and was offered when SHA-1 was enabled but SHA-384
3177901324dSJerome Forissier     was disabled. Fix the dependency. Fixes #4472.
3187901324dSJerome Forissier   * Do not offer SHA384 cipher suites when SHA-384 is disabled. Fixes #4499.
3197901324dSJerome Forissier   * With MBEDTLS_PSA_CRYPTO_C disabled, some functions were getting built
3207901324dSJerome Forissier     nonetheless, resulting in undefined reference errors when building a
3217901324dSJerome Forissier     shared library. Reported by Guillermo Garcia M. in #4411.
3227901324dSJerome Forissier   * Fix test suite code on platforms where int32_t is not int, such as
3237901324dSJerome Forissier     Arm Cortex-M. Fixes #4530.
3247901324dSJerome Forissier   * Fix some issues affecting MBEDTLS_ARIA_ALT implementations: a misplaced
3257901324dSJerome Forissier     directive in a header and a missing initialization in the self-test.
3267901324dSJerome Forissier   * Fix a missing initialization in the Camellia self-test, affecting
3277901324dSJerome Forissier     MBEDTLS_CAMELLIA_ALT implementations.
3287901324dSJerome Forissier   * Restore the ability to configure PSA via Mbed TLS options to support RSA
3297901324dSJerome Forissier     key pair operations but exclude RSA key generation. When MBEDTLS_GENPRIME
3307901324dSJerome Forissier     is not defined PSA will no longer attempt to use mbedtls_rsa_gen_key().
3317901324dSJerome Forissier     Fixes #4512.
3327901324dSJerome Forissier   * Fix a regression introduced in 2.24.0 which broke (D)TLS CBC ciphersuites
3337901324dSJerome Forissier     (when the encrypt-then-MAC extension is not in use) with some ALT
3347901324dSJerome Forissier     implementations of the underlying hash (SHA-1, SHA-256, SHA-384), causing
3357901324dSJerome Forissier     the affected side to wrongly reject valid messages. Fixes #4118.
3367901324dSJerome Forissier   * Remove outdated check-config.h check that prevented implementing the
3377901324dSJerome Forissier     timing module on Mbed OS. Fixes #4633.
3387901324dSJerome Forissier   * Fix PSA_ALG_TLS12_PRF and PSA_ALG_TLS12_PSK_TO_MS being too permissive
3397901324dSJerome Forissier     about missing inputs.
3407901324dSJerome Forissier   * Fix mbedtls_net_poll() and mbedtls_net_recv_timeout() often failing with
3417901324dSJerome Forissier     MBEDTLS_ERR_NET_POLL_FAILED on Windows. Fixes #4465.
3427901324dSJerome Forissier   * Fix a resource leak in a test suite with an alternative AES
3437901324dSJerome Forissier     implementation. Fixes #4176.
3447901324dSJerome Forissier   * Fix a crash in mbedtls_mpi_debug_mpi on a bignum having 0 limbs. This
3457901324dSJerome Forissier     could notably be triggered by setting the TLS debug level to 3 or above
3467901324dSJerome Forissier     and using a Montgomery curve for the key exchange. Reported by lhuang04
3477901324dSJerome Forissier     in #4578. Fixes #4608.
3487901324dSJerome Forissier   * psa_verify_hash() was relying on implementation-specific behavior of
3497901324dSJerome Forissier     mbedtls_rsa_rsassa_pss_verify() and was causing failures in some _ALT
3507901324dSJerome Forissier     implementations. This reliance is now removed. Fixes #3990.
3517901324dSJerome Forissier   * Disallow inputs of length different from the corresponding hash when
3527901324dSJerome Forissier     signing or verifying with PSA_ALG_RSA_PSS (The PSA Crypto API mandates
3537901324dSJerome Forissier     that PSA_ALG_RSA_PSS uses the same hash throughout the algorithm.)
3547901324dSJerome Forissier   * Fix a null pointer dereference when mbedtls_mpi_exp_mod() was called with
3557901324dSJerome Forissier     A=0 represented with 0 limbs. Up to and including Mbed TLS 2.26, this bug
3567901324dSJerome Forissier     could not be triggered by code that constructed A with one of the
3577901324dSJerome Forissier     mbedtls_mpi_read_xxx functions (including in particular TLS code) since
3587901324dSJerome Forissier     those always built an mpi object with at least one limb.
3597901324dSJerome Forissier     Credit to OSS-Fuzz. Fixes #4641.
3607901324dSJerome Forissier   * Fix mbedtls_mpi_gcd(G,A,B) when the value of B is zero. This had no
3617901324dSJerome Forissier     effect on Mbed TLS's internal use of mbedtls_mpi_gcd(), but may affect
3627901324dSJerome Forissier     applications that call mbedtls_mpi_gcd() directly. Fixes #4642.
3637901324dSJerome Forissier   * The PSA API no longer allows the creation or destruction of keys with a
3647901324dSJerome Forissier     read-only lifetime. The persistence level PSA_KEY_PERSISTENCE_READ_ONLY
3657901324dSJerome Forissier     can now only be used as intended, for keys that cannot be modified through
3667901324dSJerome Forissier     normal use of the API.
3677901324dSJerome Forissier   * When MBEDTLS_PSA_CRYPTO_SPM is enabled, crypto_spe.h was not included
3687901324dSJerome Forissier     in all the right places. Include it from crypto_platform.h, which is
3697901324dSJerome Forissier     the natural place. Fixes #4649.
3707901324dSJerome Forissier   * mbedtls_pk_sign() and mbedtls_pk_verify() and their extended and
3717901324dSJerome Forissier     restartable variants now always honor the specified hash length if
3727901324dSJerome Forissier     nonzero. Before, for RSA, hash_len was ignored in favor of the length of
3737901324dSJerome Forissier     the specified hash algorithm.
3747901324dSJerome Forissier   * Fix which alert is sent in some cases to conform to the
3757901324dSJerome Forissier     applicable RFC: on an invalid Finished message value, an
3767901324dSJerome Forissier     invalid max_fragment_length extension, or an
3777901324dSJerome Forissier     unsupported extension used by the server.
3787901324dSJerome Forissier   * Correct (change from 12 to 13 bytes) the value of the macro describing the
3797901324dSJerome Forissier     maximum nonce length returned by psa_aead_generate_nonce().
3807901324dSJerome Forissier
3817901324dSJerome ForissierChanges
3827901324dSJerome Forissier   * Add extra printf compiler warning flags to builds.
3837901324dSJerome Forissier   * Fix memsan build false positive in x509_crt.c with Clang 11
3847901324dSJerome Forissier   * Fix the setting of the read timeout in the DTLS sample programs.
3857901324dSJerome Forissier   * Remove the AES sample application programs/aes/aescrypt2 which shows
3867901324dSJerome Forissier     bad cryptographic practice. Fix #1906.
3877901324dSJerome Forissier   * Alternative implementations of CMAC may now opt to not support 3DES as a
3887901324dSJerome Forissier     CMAC block cipher, and still pass the CMAC self test.
3897901324dSJerome Forissier   * Remove configs/config-psa-crypto.h, which was identical to the default
3907901324dSJerome Forissier     configuration except for having some extra cryptographic mechanisms
3917901324dSJerome Forissier     enabled and for unintended differences. This configuration was primarily
3927901324dSJerome Forissier     intended to demonstrate the PSA API, and lost most of its usefulness when
3937901324dSJerome Forissier     MBEDTLS_PSA_CRYPTO_C became enabled by default.
3947901324dSJerome Forissier   * When building the test suites with GNU make, invoke python3 or python, not
3957901324dSJerome Forissier     python2, which is no longer supported upstream.
3967901324dSJerome Forissier   * When using session cache based session resumption on the server,
3977901324dSJerome Forissier     double-check that custom session cache implementations return
3987901324dSJerome Forissier     sessions which are consistent with the negotiated ciphersuite
3997901324dSJerome Forissier     and compression method.
4007901324dSJerome Forissier   * Fix build failure on MinGW toolchain when __USE_MING_ANSI_STDIO is on.
4017901324dSJerome Forissier     When that flag is on, standard GNU C printf format specifiers
4027901324dSJerome Forissier     should be used.
4037901324dSJerome Forissier   * Reduce the default value of MBEDTLS_ECP_WINDOW_SIZE. This reduces RAM usage
4047901324dSJerome Forissier     during ECC operations at a negligible performance cost.
4057901324dSJerome Forissier   * mbedtls_mpi_read_binary(), mbedtls_mpi_read_binary_le() and
4067901324dSJerome Forissier     mbedtls_mpi_read_string() now construct an mbedtls_mpi object with 0 limbs
4077901324dSJerome Forissier     when their input has length 0. Note that this is an implementation detail
4087901324dSJerome Forissier     and can change at any time, so this change should be transparent, but it
4097901324dSJerome Forissier     may result in mbedtls_mpi_write_binary() or mbedtls_mpi_write_string()
4107901324dSJerome Forissier     now writing an empty string where it previously wrote one or more
4117901324dSJerome Forissier     zero digits when operating from values constructed with an mpi_read
4127901324dSJerome Forissier     function and some mpi operations.
4137901324dSJerome Forissier   * Implicitly add PSA_KEY_USAGE_SIGN_MESSAGE key usage policy flag when
4147901324dSJerome Forissier     PSA_KEY_USAGE_SIGN_HASH flag is set and PSA_KEY_USAGE_VERIFY_MESSAGE flag
4157901324dSJerome Forissier     when PSA_KEY_USAGE_VERIFY_HASH flag is set. This usage flag extension
4167901324dSJerome Forissier     is also applied when loading a key from storage.
4177901324dSJerome Forissier
4187901324dSJerome Forissier= mbed TLS 2.26.0 branch released 2021-03-08
4197901324dSJerome Forissier
4207901324dSJerome ForissierAPI changes
4217901324dSJerome Forissier   * Renamed the PSA Crypto API output buffer size macros to bring them in line
4227901324dSJerome Forissier     with version 1.0.0 of the specification.
4237901324dSJerome Forissier   * The API glue function mbedtls_ecc_group_of_psa() now takes the curve size
4247901324dSJerome Forissier     in bits rather than bytes, with an additional flag to indicate if the
4257901324dSJerome Forissier     size may have been rounded up to a whole number of bytes.
4267901324dSJerome Forissier   * Renamed the PSA Crypto API AEAD tag length macros to bring them in line
4277901324dSJerome Forissier     with version 1.0.0 of the specification.
4287901324dSJerome Forissier
4297901324dSJerome ForissierDefault behavior changes
4307901324dSJerome Forissier   * In mbedtls_rsa_context objects, the ver field was formerly documented
4317901324dSJerome Forissier     as always 0. It is now reserved for internal purposes and may take
4327901324dSJerome Forissier     different values.
4337901324dSJerome Forissier
4347901324dSJerome ForissierNew deprecations
4357901324dSJerome Forissier   * PSA_KEY_EXPORT_MAX_SIZE, PSA_HASH_SIZE, PSA_MAC_FINAL_SIZE,
4367901324dSJerome Forissier     PSA_BLOCK_CIPHER_BLOCK_SIZE, PSA_MAX_BLOCK_CIPHER_BLOCK_SIZE and
4377901324dSJerome Forissier     PSA_ALG_TLS12_PSK_TO_MS_MAX_PSK_LEN have been renamed, and the old names
4387901324dSJerome Forissier     deprecated.
4397901324dSJerome Forissier   * PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH and PSA_ALG_AEAD_WITH_TAG_LENGTH
4407901324dSJerome Forissier     have been renamed, and the old names deprecated.
4417901324dSJerome Forissier
4427901324dSJerome ForissierFeatures
4437901324dSJerome Forissier   * The PSA crypto subsystem can now use HMAC_DRBG instead of CTR_DRBG.
4447901324dSJerome Forissier     CTR_DRBG is used by default if it is available, but you can override
4457901324dSJerome Forissier     this choice by setting MBEDTLS_PSA_HMAC_DRBG_MD_TYPE at compile time.
4467901324dSJerome Forissier     Fix #3354.
4477901324dSJerome Forissier   * Automatic fallback to a software implementation of ECP when
4487901324dSJerome Forissier     MBEDTLS_ECP_xxx_ALT accelerator hooks are in use can now be turned off
4497901324dSJerome Forissier     through setting the new configuration flag MBEDTLS_ECP_NO_FALLBACK.
4507901324dSJerome Forissier   * The PSA crypto subsystem can now be configured to use less static RAM by
4517901324dSJerome Forissier     tweaking the setting for the maximum amount of keys simultaneously in RAM.
4527901324dSJerome Forissier     MBEDTLS_PSA_KEY_SLOT_COUNT sets the maximum number of volatile keys that
4537901324dSJerome Forissier     can exist simultaneously. It has a sensible default if not overridden.
4547901324dSJerome Forissier   * Partial implementation of the PSA crypto driver interface: Mbed TLS can
4557901324dSJerome Forissier     now use an external random generator instead of the library's own
4567901324dSJerome Forissier     entropy collection and DRBG code. Enable MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
4577901324dSJerome Forissier     and see the documentation of mbedtls_psa_external_get_random() for details.
4587901324dSJerome Forissier   * Applications using both mbedtls_xxx and psa_xxx functions (for example,
4597901324dSJerome Forissier     applications using TLS and MBEDTLS_USE_PSA_CRYPTO) can now use the PSA
4607901324dSJerome Forissier     random generator with mbedtls_xxx functions. See the documentation of
4617901324dSJerome Forissier     mbedtls_psa_get_random() for details.
4627901324dSJerome Forissier   * In the PSA API, the policy for a MAC or AEAD algorithm can specify a
4637901324dSJerome Forissier     minimum MAC or tag length thanks to the new wildcards
4647901324dSJerome Forissier     PSA_ALG_AT_LEAST_THIS_LENGTH_MAC and
4657901324dSJerome Forissier     PSA_ALG_AEAD_WITH_AT_LEAST_THIS_LENGTH_TAG.
4667901324dSJerome Forissier
4677901324dSJerome ForissierSecurity
4687901324dSJerome Forissier   * Fix a security reduction in CTR_DRBG when the initial seeding obtained a
4697901324dSJerome Forissier     nonce from entropy. Applications were affected if they called
4707901324dSJerome Forissier     mbedtls_ctr_drbg_set_nonce_len(), if they called
4717901324dSJerome Forissier     mbedtls_ctr_drbg_set_entropy_len() with a size that was 3/2 times the key
4727901324dSJerome Forissier     length, or when the entropy module uses SHA-256 and CTR_DRBG uses AES-256.
4737901324dSJerome Forissier     In such cases, a random nonce was necessary to achieve the advertised
4747901324dSJerome Forissier     security strength, but the code incorrectly used a constant instead of
4757901324dSJerome Forissier     entropy from the nonce.
4767901324dSJerome Forissier     Found by John Stroebel in #3819 and fixed in #3973.
4777901324dSJerome Forissier   * Fix a buffer overflow in mbedtls_mpi_sub_abs() when calculating
4787901324dSJerome Forissier     |A| - |B| where |B| is larger than |A| and has more limbs (so the
4797901324dSJerome Forissier     function should return MBEDTLS_ERR_MPI_NEGATIVE_VALUE). Only
4807901324dSJerome Forissier     applications calling mbedtls_mpi_sub_abs() directly are affected:
4817901324dSJerome Forissier     all calls inside the library were safe since this function is
4827901324dSJerome Forissier     only called with |A| >= |B|. Reported by Guido Vranken in #4042.
4837901324dSJerome Forissier   * Fix an errorneous estimation for an internal buffer in
4847901324dSJerome Forissier     mbedtls_pk_write_key_pem(). If MBEDTLS_MPI_MAX_SIZE is set to an odd
4857901324dSJerome Forissier     value the function might fail to write a private RSA keys of the largest
4867901324dSJerome Forissier     supported size.
4877901324dSJerome Forissier     Found by Daniel Otte, reported in #4093 and fixed in #4094.
4887901324dSJerome Forissier   * Fix a stack buffer overflow with mbedtls_net_poll() and
4897901324dSJerome Forissier     mbedtls_net_recv_timeout() when given a file descriptor that is
4907901324dSJerome Forissier     beyond FD_SETSIZE. Reported by FigBug in #4169.
4917901324dSJerome Forissier   * Guard against strong local side channel attack against base64 tables by
4927901324dSJerome Forissier     making access aceess to them use constant flow code.
4937901324dSJerome Forissier
4947901324dSJerome ForissierBugfix
4957901324dSJerome Forissier   * Fix use-after-scope error in programs/ssl/ssl_client2.c and ssl_server2.c
4967901324dSJerome Forissier   * Fix memory leak that occured when calling psa_close_key() on a
4977901324dSJerome Forissier     wrapped key with MBEDTLS_PSA_CRYPTO_SE_C defined.
4987901324dSJerome Forissier   * Fix an incorrect error code if an RSA private operation glitched.
4997901324dSJerome Forissier   * Fix a memory leak in an error case in psa_generate_derived_key_internal().
5007901324dSJerome Forissier   * Fix a resource leak in CTR_DRBG and HMAC_DRBG when MBEDTLS_THREADING_C
5017901324dSJerome Forissier     is enabled, on platforms where initializing a mutex allocates resources.
5027901324dSJerome Forissier     This was a regression introduced in the previous release. Reported in
5037901324dSJerome Forissier     #4017, #4045 and #4071.
5047901324dSJerome Forissier   * Ensure that calling mbedtls_rsa_free() or mbedtls_entropy_free()
5057901324dSJerome Forissier     twice is safe. This happens for RSA when some Mbed TLS library functions
5067901324dSJerome Forissier     fail. Such a double-free was not safe when MBEDTLS_THREADING_C was
5077901324dSJerome Forissier     enabled on platforms where freeing a mutex twice is not safe.
5087901324dSJerome Forissier   * Fix a resource leak in a bad-arguments case of mbedtls_rsa_gen_key()
5097901324dSJerome Forissier     when MBEDTLS_THREADING_C is enabled on platforms where initializing
5107901324dSJerome Forissier     a mutex allocates resources.
5117901324dSJerome Forissier   * Fixes a bug where, if the library was configured to include support for
5127901324dSJerome Forissier     both the old SE interface and the new PSA driver interface, external keys were
5137901324dSJerome Forissier     not loaded from storage. This was fixed by #3996.
5147901324dSJerome Forissier   * This change makes 'mbedtls_x509write_crt_set_basic_constraints'
5157901324dSJerome Forissier     consistent with RFC 5280 4.2.1.9 which says: "Conforming CAs MUST
5167901324dSJerome Forissier     include this extension in all CA certificates that contain public keys
5177901324dSJerome Forissier     used to validate digital signatures on certificates and MUST mark the
5187901324dSJerome Forissier     extension as critical in such certificates." Previous to this change,
5197901324dSJerome Forissier     the extension was always marked as non-critical. This was fixed by
5207901324dSJerome Forissier     #3698.
5217901324dSJerome Forissier
5227901324dSJerome ForissierChanges
5237901324dSJerome Forissier   * A new library C file psa_crypto_client.c has been created to contain
5247901324dSJerome Forissier     the PSA code needed by a PSA crypto client when the PSA crypto
5257901324dSJerome Forissier     implementation is not included into the library.
5267901324dSJerome Forissier   * On recent enough versions of FreeBSD and DragonFlyBSD, the entropy module
5277901324dSJerome Forissier     now uses the getrandom syscall instead of reading from /dev/urandom.
5287901324dSJerome Forissier
5297901324dSJerome Forissier= mbed TLS 2.25.0 branch released 2020-12-11
5307901324dSJerome Forissier
5317901324dSJerome ForissierAPI changes
5327901324dSJerome Forissier   * The numerical values of the PSA Crypto API macros have been updated to
5337901324dSJerome Forissier     conform to version 1.0.0 of the specification.
5347901324dSJerome Forissier   * PSA_ALG_STREAM_CIPHER replaces PSA_ALG_CHACHA20 and PSA_ALG_ARC4.
5357901324dSJerome Forissier     The underlying stream cipher is determined by the key type
5367901324dSJerome Forissier     (PSA_KEY_TYPE_CHACHA20 or PSA_KEY_TYPE_ARC4).
5377901324dSJerome Forissier   * The functions mbedtls_cipher_auth_encrypt() and
5387901324dSJerome Forissier     mbedtls_cipher_auth_decrypt() no longer accept NIST_KW contexts,
5397901324dSJerome Forissier     as they have no way to check if the output buffer is large enough.
5407901324dSJerome Forissier     Please use mbedtls_cipher_auth_encrypt_ext() and
5417901324dSJerome Forissier     mbedtls_cipher_auth_decrypt_ext() instead. Credit to OSS-Fuzz and
5427901324dSJerome Forissier     Cryptofuzz. Fixes #3665.
5437901324dSJerome Forissier
5447901324dSJerome ForissierRequirement changes
5457901324dSJerome Forissier   * Update the minimum required CMake version to 2.8.12.  This silences a
5467901324dSJerome Forissier     warning on CMake 3.19.0. #3801
5477901324dSJerome Forissier
5487901324dSJerome ForissierNew deprecations
5497901324dSJerome Forissier   * PSA_ALG_CHACHA20 and PSA_ALG_ARC4 have been deprecated.
5507901324dSJerome Forissier     Use PSA_ALG_STREAM_CIPHER instead.
5517901324dSJerome Forissier   * The functions mbedtls_cipher_auth_encrypt() and
5527901324dSJerome Forissier     mbedtls_cipher_auth_decrypt() are deprecated in favour of the new
5537901324dSJerome Forissier     functions mbedtls_cipher_auth_encrypt_ext() and
5547901324dSJerome Forissier     mbedtls_cipher_auth_decrypt_ext(). Please note that with AEAD ciphers,
5557901324dSJerome Forissier     these new functions always append the tag to the ciphertext, and include
5567901324dSJerome Forissier     the tag in the ciphertext length.
5577901324dSJerome Forissier
5587901324dSJerome ForissierFeatures
5597901324dSJerome Forissier   * Partial implementation of the new PSA Crypto accelerator APIs. (Symmetric
5607901324dSJerome Forissier     ciphers, asymmetric signing/verification and key generation, validate_key
5617901324dSJerome Forissier     entry point, and export_public_key interface.)
5627901324dSJerome Forissier   * Add support for ECB to the PSA cipher API.
5637901324dSJerome Forissier   * In PSA, allow using a key declared with a base key agreement algorithm
5647901324dSJerome Forissier     in combined key agreement and derivation operations, as long as the key
5657901324dSJerome Forissier     agreement algorithm in use matches the algorithm the key was declared with.
5667901324dSJerome Forissier     This is currently non-standard behaviour, but expected to make it into a
5677901324dSJerome Forissier     future revision of the PSA Crypto standard.
5687901324dSJerome Forissier   * Add MBEDTLS_TARGET_PREFIX CMake variable, which is prefixed to the mbedtls,
5697901324dSJerome Forissier     mbedcrypto, mbedx509 and apidoc CMake target names. This can be used by
5707901324dSJerome Forissier     external CMake projects that include this one to avoid CMake target name
5717901324dSJerome Forissier     clashes.  The default value of this variable is "", so default target names
5727901324dSJerome Forissier     are unchanged.
5737901324dSJerome Forissier   * Add support for DTLS-SRTP as defined in RFC 5764. Contributed by Johan
5747901324dSJerome Forissier     Pascal, improved by Ron Eldor.
5757901324dSJerome Forissier   * In the PSA API, it is no longer necessary to open persistent keys:
5767901324dSJerome Forissier     operations now accept the key identifier. The type psa_key_handle_t is now
5777901324dSJerome Forissier     identical to psa_key_id_t instead of being platform-defined. This bridges
5787901324dSJerome Forissier     the last major gap to compliance with the PSA Cryptography specification
5797901324dSJerome Forissier     version 1.0.0. Opening persistent keys is still supported for backward
5807901324dSJerome Forissier     compatibility, but will be deprecated and later removed in future
5817901324dSJerome Forissier     releases.
5827901324dSJerome Forissier   * PSA_AEAD_NONCE_LENGTH, PSA_AEAD_NONCE_MAX_SIZE, PSA_CIPHER_IV_LENGTH and
5837901324dSJerome Forissier     PSA_CIPHER_IV_MAX_SIZE macros have been added as defined in version
5847901324dSJerome Forissier     1.0.0 of the PSA Crypto API specification.
5857901324dSJerome Forissier
5867901324dSJerome ForissierSecurity
5877901324dSJerome Forissier   * The functions mbedtls_cipher_auth_encrypt() and
5887901324dSJerome Forissier     mbedtls_cipher_auth_decrypt() would write past the minimum documented
5897901324dSJerome Forissier     size of the output buffer when used with NIST_KW. As a result, code using
5907901324dSJerome Forissier     those functions as documented with NIST_KW could have a buffer overwrite
5917901324dSJerome Forissier     of up to 15 bytes, with consequences ranging up to arbitrary code
5927901324dSJerome Forissier     execution depending on the location of the output buffer.
5937901324dSJerome Forissier   * Limit the size of calculations performed by mbedtls_mpi_exp_mod to
5947901324dSJerome Forissier     MBEDTLS_MPI_MAX_SIZE to prevent a potential denial of service when
5957901324dSJerome Forissier     generating Diffie-Hellman key pairs. Credit to OSS-Fuzz.
5967901324dSJerome Forissier   * A failure of the random generator was ignored in mbedtls_mpi_fill_random(),
5977901324dSJerome Forissier     which is how most uses of randomization in asymmetric cryptography
5987901324dSJerome Forissier     (including key generation, intermediate value randomization and blinding)
5997901324dSJerome Forissier     are implemented. This could cause failures or the silent use of non-random
6007901324dSJerome Forissier     values. A random generator can fail if it needs reseeding and cannot not
6017901324dSJerome Forissier     obtain entropy, or due to an internal failure (which, for Mbed TLS's own
6027901324dSJerome Forissier     CTR_DRBG or HMAC_DRBG, can only happen due to a misconfiguration).
6037901324dSJerome Forissier   * Fix a compliance issue whereby we were not checking the tag on the
6047901324dSJerome Forissier     algorithm parameters (only the size) when comparing the signature in the
6057901324dSJerome Forissier     description part of the cert to the real signature. This meant that a
6067901324dSJerome Forissier     NULL algorithm parameters entry would look identical to an array of REAL
6077901324dSJerome Forissier     (size zero) to the library and thus the certificate would be considered
6087901324dSJerome Forissier     valid. However, if the parameters do not match in *any* way then the
6097901324dSJerome Forissier     certificate should be considered invalid, and indeed OpenSSL marks these
6107901324dSJerome Forissier     certs as invalid when mbedtls did not.
6117901324dSJerome Forissier     Many thanks to guidovranken who found this issue via differential fuzzing
6127901324dSJerome Forissier     and reported it in #3629.
6137901324dSJerome Forissier   * Zeroising of local buffers and variables which are used for calculations
6147901324dSJerome Forissier     in mbedtls_pkcs5_pbkdf2_hmac(), mbedtls_internal_sha*_process(),
6157901324dSJerome Forissier     mbedtls_internal_md*_process() and mbedtls_internal_ripemd160_process()
6167901324dSJerome Forissier     functions to erase sensitive data from memory. Reported by
6177901324dSJerome Forissier     Johan Malmgren and Johan Uppman Bruce from Sectra.
6187901324dSJerome Forissier
6197901324dSJerome ForissierBugfix
6207901324dSJerome Forissier   * Fix an invalid (but non-zero) return code from mbedtls_pk_parse_subpubkey()
6217901324dSJerome Forissier     when the input has trailing garbage. Fixes #2512.
6227901324dSJerome Forissier   * Fix build failure in configurations where MBEDTLS_USE_PSA_CRYPTO is
6237901324dSJerome Forissier     enabled but ECDSA is disabled. Contributed by jdurkop. Fixes #3294.
6247901324dSJerome Forissier   * Include the psa_constant_names generated source code in the source tree
6257901324dSJerome Forissier     instead of generating it at build time. Fixes #3524.
6267901324dSJerome Forissier   * Fix rsa_prepare_blinding() to retry when the blinding value is not
6277901324dSJerome Forissier     invertible (mod N), instead of returning MBEDTLS_ERR_RSA_RNG_FAILED. This
6287901324dSJerome Forissier     addresses a regression but is rare in practice (approx. 1 in 2/sqrt(N)).
6297901324dSJerome Forissier     Found by Synopsys Coverity, fix contributed by Peter Kolbus (Garmin).
6307901324dSJerome Forissier     Fixes #3647.
6317901324dSJerome Forissier   * Use socklen_t on Android and other POSIX-compliant system
6327901324dSJerome Forissier   * Fix the build when the macro _GNU_SOURCE is defined to a non-empty value.
6337901324dSJerome Forissier     Fix #3432.
6347901324dSJerome Forissier   * Consistently return PSA_ERROR_INVALID_ARGUMENT on invalid cipher input
6357901324dSJerome Forissier     sizes (instead of PSA_ERROR_BAD_STATE in some cases) to make the
6367901324dSJerome Forissier     psa_cipher_* functions compliant with the PSA Crypto API specification.
6377901324dSJerome Forissier   * mbedtls_ecp_curve_list() now lists Curve25519 and Curve448 under the names
6387901324dSJerome Forissier     "x25519" and "x448". These curves support ECDH but not ECDSA. If you need
6397901324dSJerome Forissier     only the curves that support ECDSA, filter the list with
6407901324dSJerome Forissier     mbedtls_ecdsa_can_do().
6417901324dSJerome Forissier   * Fix psa_generate_key() returning an error when asked to generate
6427901324dSJerome Forissier     an ECC key pair on Curve25519 or secp244k1.
6437901324dSJerome Forissier   * Fix psa_key_derivation_output_key() to allow the output of a combined key
6447901324dSJerome Forissier     agreement and subsequent key derivation operation to be used as a key
6457901324dSJerome Forissier     inside of the PSA Crypto core.
6467901324dSJerome Forissier   * Fix handling of EOF against 0xff bytes and on platforms with unsigned
6477901324dSJerome Forissier     chars. Fixes a build failure on platforms where char is unsigned. Fixes
6487901324dSJerome Forissier     #3794.
6497901324dSJerome Forissier   * Fix an off-by-one error in the additional data length check for
6507901324dSJerome Forissier     CCM, which allowed encryption with a non-standard length field.
6517901324dSJerome Forissier     Fixes #3719.
6527901324dSJerome Forissier   * Correct the default IV size for mbedtls_cipher_info_t structures using
6537901324dSJerome Forissier     MBEDTLS_MODE_ECB to 0, since ECB mode ciphers don't use IVs.
6547901324dSJerome Forissier   * Make arc4random_buf available on NetBSD and OpenBSD when _POSIX_C_SOURCE is
6557901324dSJerome Forissier     defined. Fix contributed in #3571.
6567901324dSJerome Forissier   * Fix conditions for including string.h in error.c. Fixes #3866.
6577901324dSJerome Forissier   * psa_set_key_id() now also sets the lifetime to persistent for keys located
6587901324dSJerome Forissier     in a secure element.
6597901324dSJerome Forissier   * Attempting to create a volatile key with a non-zero key identifier now
6607901324dSJerome Forissier     fails. Previously the key identifier was just ignored when creating a
6617901324dSJerome Forissier     volatile key.
6627901324dSJerome Forissier   * Attempting to create or register a key with a key identifier in the vendor
6637901324dSJerome Forissier     range now fails.
6647901324dSJerome Forissier   * Fix build failures on GCC 11. Fixes #3782.
6657901324dSJerome Forissier   * Add missing arguments of debug message in mbedtls_ssl_decrypt_buf.
6667901324dSJerome Forissier   * Fix a memory leak in mbedtls_mpi_sub_abs() when the result was negative
6677901324dSJerome Forissier     (an error condition) and the second operand was aliased to the result.
6687901324dSJerome Forissier   * Fix a case in elliptic curve arithmetic where an out-of-memory condition
6697901324dSJerome Forissier     could go undetected, resulting in an incorrect result.
6707901324dSJerome Forissier   * In CTR_DRBG and HMAC_DRBG, don't reset the reseed interval in seed().
6717901324dSJerome Forissier     Fixes #2927.
6727901324dSJerome Forissier   * In PEM writing functions, fill the trailing part of the buffer with null
6737901324dSJerome Forissier     bytes. This guarantees that the corresponding parsing function can read
6747901324dSJerome Forissier     the buffer back, which was the case for mbedtls_x509write_{crt,csr}_pem
6757901324dSJerome Forissier     until this property was inadvertently broken in Mbed TLS 2.19.0.
6767901324dSJerome Forissier     Fixes #3682.
6777901324dSJerome Forissier   * Fix a build failure that occurred with the MBEDTLS_AES_SETKEY_DEC_ALT
6787901324dSJerome Forissier     option on. In this configuration key management methods that are required
6797901324dSJerome Forissier     for MBEDTLS_CIPHER_MODE_XTS were excluded from the build and made it fail.
6807901324dSJerome Forissier     Fixes #3818. Reported by John Stroebel.
6817901324dSJerome Forissier
6827901324dSJerome ForissierChanges
6837901324dSJerome Forissier   * Reduce stack usage significantly during sliding window exponentiation.
6847901324dSJerome Forissier     Reported in #3591 and fix contributed in #3592 by Daniel Otte.
6857901324dSJerome Forissier   * The PSA persistent storage format is updated to always store the key bits
6867901324dSJerome Forissier     attribute. No automatic upgrade path is provided. Previously stored keys
6877901324dSJerome Forissier     must be erased, or manually upgraded based on the key storage format
6887901324dSJerome Forissier     specification (docs/architecture/mbed-crypto-storage-specification.md).
6897901324dSJerome Forissier     Fixes #3740.
6907901324dSJerome Forissier   * Remove the zeroization of a pointer variable in AES rounds. It was valid
6917901324dSJerome Forissier     but spurious and misleading since it looked like a mistaken attempt to
6927901324dSJerome Forissier     zeroize the pointed-to buffer. Reported by Antonio de la Piedra, CEA
6937901324dSJerome Forissier     Leti, France.
6947901324dSJerome Forissier
6957901324dSJerome Forissier= mbed TLS 2.24.0 branch released 2020-09-01
6967901324dSJerome Forissier
6977901324dSJerome ForissierAPI changes
6987901324dSJerome Forissier   * In the PSA API, rename the types of elliptic curve and Diffie-Hellman
6997901324dSJerome Forissier     group families to psa_ecc_family_t and psa_dh_family_t, in line with the
7007901324dSJerome Forissier     PSA Crypto API specification version 1.0.0.
7017901324dSJerome Forissier     Rename associated macros as well:
7027901324dSJerome Forissier     PSA_ECC_CURVE_xxx renamed to PSA_ECC_FAMILY_xxx
7037901324dSJerome Forissier     PSA_DH_GROUP_xxx renamed to PSA_DH_FAMILY_xxx
7047901324dSJerome Forissier     PSA_KEY_TYPE_GET_CURVE renamed to to PSA_KEY_TYPE_ECC_GET_FAMILY
7057901324dSJerome Forissier     PSA_KEY_TYPE_GET_GROUP renamed to PSA_KEY_TYPE_DH_GET_FAMILY
7067901324dSJerome Forissier
7077901324dSJerome ForissierDefault behavior changes
7087901324dSJerome Forissier   * Stop storing persistent information about externally stored keys created
7097901324dSJerome Forissier     through PSA Crypto with a volatile lifetime. Reported in #3288 and
7107901324dSJerome Forissier     contributed by Steven Cooreman in #3382.
7117901324dSJerome Forissier
7127901324dSJerome ForissierFeatures
7137901324dSJerome Forissier   * The new function mbedtls_ecp_write_key() exports private ECC keys back to
7147901324dSJerome Forissier     a byte buffer. It is the inverse of the existing mbedtls_ecp_read_key().
7157901324dSJerome Forissier   * Support building on e2k (Elbrus) architecture: correctly enable
7167901324dSJerome Forissier     -Wformat-signedness, and fix the code that causes signed-one-bit-field
7177901324dSJerome Forissier     and sign-compare warnings. Contributed by makise-homura (Igor Molchanov)
7187901324dSJerome Forissier     <akemi_homura@kurisa.ch>.
7197901324dSJerome Forissier
7207901324dSJerome ForissierSecurity
7217901324dSJerome Forissier   * Fix a vulnerability in the verification of X.509 certificates when
7227901324dSJerome Forissier     matching the expected common name (the cn argument of
7237901324dSJerome Forissier     mbedtls_x509_crt_verify()) with the actual certificate name: when the
7247901324dSJerome Forissier     subjecAltName extension is present, the expected name was compared to any
7257901324dSJerome Forissier     name in that extension regardless of its type. This means that an
7267901324dSJerome Forissier     attacker could for example impersonate a 4-bytes or 16-byte domain by
7277901324dSJerome Forissier     getting a certificate for the corresponding IPv4 or IPv6 (this would
7287901324dSJerome Forissier     require the attacker to control that IP address, though). Similar attacks
7297901324dSJerome Forissier     using other subjectAltName name types might be possible. Found and
7307901324dSJerome Forissier     reported by kFYatek in #3498.
7317901324dSJerome Forissier   * When checking X.509 CRLs, a certificate was only considered as revoked if
7327901324dSJerome Forissier     its revocationDate was in the past according to the local clock if
7337901324dSJerome Forissier     available. In particular, on builds without MBEDTLS_HAVE_TIME_DATE,
7347901324dSJerome Forissier     certificates were never considered as revoked. On builds with
7357901324dSJerome Forissier     MBEDTLS_HAVE_TIME_DATE, an attacker able to control the local clock (for
7367901324dSJerome Forissier     example, an untrusted OS attacking a secure enclave) could prevent
7377901324dSJerome Forissier     revocation of certificates via CRLs. Fixed by no longer checking the
7387901324dSJerome Forissier     revocationDate field, in accordance with RFC 5280. Reported by
7397901324dSJerome Forissier     yuemonangong in #3340. Reported independently and fixed by
7407901324dSJerome Forissier     Raoul Strackx and Jethro Beekman in #3433.
7417901324dSJerome Forissier   * In (D)TLS record decryption, when using a CBC ciphersuites without the
7427901324dSJerome Forissier     Encrypt-then-Mac extension, use constant code flow memory access patterns
7437901324dSJerome Forissier     to extract and check the MAC. This is an improvement to the existing
7447901324dSJerome Forissier     countermeasure against Lucky 13 attacks. The previous countermeasure was
7457901324dSJerome Forissier     effective against network-based attackers, but less so against local
7467901324dSJerome Forissier     attackers. The new countermeasure defends against local attackers, even
7477901324dSJerome Forissier     if they have access to fine-grained measurements. In particular, this
7487901324dSJerome Forissier     fixes a local Lucky 13 cache attack found and reported by Tuba Yavuz,
7497901324dSJerome Forissier     Farhaan Fowze, Ken (Yihan) Bai, Grant Hernandez, and Kevin Butler
7507901324dSJerome Forissier     (University of Florida) and Dave Tian (Purdue University).
7517901324dSJerome Forissier   * Fix side channel in RSA private key operations and static (finite-field)
7527901324dSJerome Forissier     Diffie-Hellman. An adversary with precise enough timing and memory access
7537901324dSJerome Forissier     information (typically an untrusted operating system attacking a secure
7547901324dSJerome Forissier     enclave) could bypass an existing counter-measure (base blinding) and
7557901324dSJerome Forissier     potentially fully recover the private key.
7567901324dSJerome Forissier   * Fix a 1-byte buffer overread in mbedtls_x509_crl_parse_der().
7577901324dSJerome Forissier     Credit to OSS-Fuzz for detecting the problem and to Philippe Antoine
7587901324dSJerome Forissier     for pinpointing the problematic code.
7597901324dSJerome Forissier   * Zeroising of plaintext buffers in mbedtls_ssl_read() to erase unused
7607901324dSJerome Forissier     application data from memory. Reported in #689 by
7617901324dSJerome Forissier     Johan Uppman Bruce of Sectra.
7627901324dSJerome Forissier
7637901324dSJerome ForissierBugfix
7647901324dSJerome Forissier   * Library files installed after a CMake build no longer have execute
7657901324dSJerome Forissier     permission.
7667901324dSJerome Forissier   * Use local labels in mbedtls_padlock_has_support() to fix an invalid symbol
7677901324dSJerome Forissier     redefinition if the function is inlined.
7687901324dSJerome Forissier     Reported in #3451 and fix contributed in #3452 by okhowang.
7697901324dSJerome Forissier   * Fix the endianness of Curve25519 keys imported/exported through the PSA
7707901324dSJerome Forissier     APIs. psa_import_key and psa_export_key will now correctly expect/output
7717901324dSJerome Forissier     Montgomery keys in little-endian as defined by RFC7748. Contributed by
7727901324dSJerome Forissier     Steven Cooreman in #3425.
7737901324dSJerome Forissier   * Fix build errors when the only enabled elliptic curves are Montgomery
7747901324dSJerome Forissier     curves. Raised by signpainter in #941 and by Taiki-San in #1412. This
7757901324dSJerome Forissier     also fixes missing declarations reported by Steven Cooreman in #1147.
7767901324dSJerome Forissier   * Fix self-test failure when the only enabled short Weierstrass elliptic
7777901324dSJerome Forissier     curve is secp192k1. Fixes #2017.
7787901324dSJerome Forissier   * PSA key import will now correctly import a Curve25519/Curve448 public key
7797901324dSJerome Forissier     instead of erroring out. Contributed by Steven Cooreman in #3492.
7807901324dSJerome Forissier   * Use arc4random_buf on NetBSD instead of rand implementation with cyclical
7817901324dSJerome Forissier     lower bits. Fix contributed in #3540.
7827901324dSJerome Forissier   * Fix a memory leak in mbedtls_md_setup() when using HMAC under low memory
7837901324dSJerome Forissier     conditions. Reported and fix suggested by Guido Vranken in #3486.
7847901324dSJerome Forissier   * Fix bug in redirection of unit test outputs on platforms where stdout is
7857901324dSJerome Forissier     defined as a macro. First reported in #2311 and fix contributed in #3528.
7867901324dSJerome Forissier
7877901324dSJerome ForissierChanges
7887901324dSJerome Forissier   * Only pass -Wformat-signedness to versions of GCC that support it. Reported
7897901324dSJerome Forissier     in #3478 and fix contributed in #3479 by okhowang.
7907901324dSJerome Forissier   * Reduce the stack consumption of mbedtls_x509write_csr_der() which
7917901324dSJerome Forissier     previously could lead to stack overflow on constrained devices.
7927901324dSJerome Forissier     Contributed by Doru Gucea and Simon Leet in #3464.
7937901324dSJerome Forissier   * Undefine the ASSERT macro before defining it locally, in case it is defined
7947901324dSJerome Forissier     in a platform header. Contributed by Abdelatif Guettouche in #3557.
7957901324dSJerome Forissier   * Update copyright notices to use Linux Foundation guidance. As a result,
7967901324dSJerome Forissier     the copyright of contributors other than Arm is now acknowledged, and the
7977901324dSJerome Forissier     years of publishing are no longer tracked in the source files. This also
7987901324dSJerome Forissier     eliminates the need for the lines declaring the files to be part of
7997901324dSJerome Forissier     MbedTLS. Fixes #3457.
8007901324dSJerome Forissier   * Add the command line parameter key_pwd to the ssl_client2 and ssl_server2
8017901324dSJerome Forissier     example applications which allows to provide a password for the key file
8027901324dSJerome Forissier     specified through the existing key_file argument. This allows the use of
8037901324dSJerome Forissier     these applications with password-protected key files. Analogously but for
8047901324dSJerome Forissier     ssl_server2 only, add the command line parameter key_pwd2 which allows to
8057901324dSJerome Forissier     set a password for the key file provided through the existing key_file2
8067901324dSJerome Forissier     argument.
8077901324dSJerome Forissier
8087901324dSJerome Forissier= mbed TLS 2.23.0 branch released 2020-07-01
8097901324dSJerome Forissier
8107901324dSJerome ForissierDefault behavior changes
8117901324dSJerome Forissier   * In the experimental PSA secure element interface, change the encoding of
8127901324dSJerome Forissier     key lifetimes to encode a persistence level and the location. Although C
8137901324dSJerome Forissier     prototypes do not effectively change, code calling
8147901324dSJerome Forissier     psa_register_se_driver() must be modified to pass the driver's location
8157901324dSJerome Forissier     instead of the keys' lifetime. If the library is upgraded on an existing
8167901324dSJerome Forissier     device, keys created with the old lifetime value will not be readable or
8177901324dSJerome Forissier     removable through Mbed TLS after the upgrade.
8187901324dSJerome Forissier
8197901324dSJerome ForissierFeatures
8207901324dSJerome Forissier   * New functions in the error module return constant strings for
8217901324dSJerome Forissier     high- and low-level error codes, complementing mbedtls_strerror()
8227901324dSJerome Forissier     which constructs a string for any error code, including compound
8237901324dSJerome Forissier     ones, but requires a writable buffer. Contributed by Gaurav Aggarwal
8247901324dSJerome Forissier     in #3176.
8257901324dSJerome Forissier   * The new utility programs/ssl/ssl_context_info prints a human-readable
8267901324dSJerome Forissier     dump of an SSL context saved with mbedtls_ssl_context_save().
8277901324dSJerome Forissier   * Add support for midipix, a POSIX layer for Microsoft Windows.
8287901324dSJerome Forissier   * Add new mbedtls_x509_crt_parse_der_with_ext_cb() routine which allows
8297901324dSJerome Forissier     parsing unsupported certificate extensions via user provided callback.
8307901324dSJerome Forissier     Contributed by Nicola Di Lieto <nicola.dilieto@gmail.com> in #3243 as
8317901324dSJerome Forissier     a solution to #3241.
8327901324dSJerome Forissier   * Pass the "certificate policies" extension to the callback supplied to
8337901324dSJerome Forissier     mbedtls_x509_crt_parse_der_with_ext_cb() if it contains unsupported
8347901324dSJerome Forissier     policies (#3419).
8357901324dSJerome Forissier   * Added support to entropy_poll for the kern.arandom syscall supported on
8367901324dSJerome Forissier     some BSD systems. Contributed by Nia Alarie in #3423.
8377901324dSJerome Forissier   * Add support for Windows 2000 in net_sockets. Contributed by opatomic. #3239
8387901324dSJerome Forissier
8397901324dSJerome ForissierSecurity
8407901324dSJerome Forissier   * Fix a side channel vulnerability in modular exponentiation that could
8417901324dSJerome Forissier     reveal an RSA private key used in a secure enclave. Noticed by Sangho Lee,
8427901324dSJerome Forissier     Ming-Wei Shih, Prasun Gera, Taesoo Kim and Hyesoon Kim (Georgia Institute
8437901324dSJerome Forissier     of Technology); and Marcus Peinado (Microsoft Research). Reported by Raoul
8447901324dSJerome Forissier     Strackx (Fortanix) in #3394.
8457901324dSJerome Forissier   * Fix side channel in mbedtls_ecp_check_pub_priv() and
8467901324dSJerome Forissier     mbedtls_pk_parse_key() / mbedtls_pk_parse_keyfile() (when loading a
8477901324dSJerome Forissier     private key that didn't include the uncompressed public key), as well as
8487901324dSJerome Forissier     mbedtls_ecp_mul() / mbedtls_ecp_mul_restartable() when called with a NULL
8497901324dSJerome Forissier     f_rng argument. An attacker with access to precise enough timing and
8507901324dSJerome Forissier     memory access information (typically an untrusted operating system
8517901324dSJerome Forissier     attacking a secure enclave) could fully recover the ECC private key.
8527901324dSJerome Forissier     Found and reported by Alejandro Cabrera Aldaya and Billy Brumley.
8537901324dSJerome Forissier   * Fix issue in Lucky 13 counter-measure that could make it ineffective when
8547901324dSJerome Forissier     hardware accelerators were used (using one of the MBEDTLS_SHAxxx_ALT
8557901324dSJerome Forissier     macros). This would cause the original Lucky 13 attack to be possible in
8567901324dSJerome Forissier     those configurations, allowing an active network attacker to recover
8577901324dSJerome Forissier     plaintext after repeated timing measurements under some conditions.
8587901324dSJerome Forissier     Reported and fix suggested by Luc Perneel in #3246.
8597901324dSJerome Forissier
8607901324dSJerome ForissierBugfix
8617901324dSJerome Forissier   * Fix the Visual Studio Release x64 build configuration for mbedtls itself.
8627901324dSJerome Forissier     Completes a previous fix in Mbed TLS 2.19 that only fixed the build for
8637901324dSJerome Forissier     the example programs. Reported in #1430 and fix contributed by irwir.
8647901324dSJerome Forissier   * Fix undefined behavior in X.509 certificate parsing if the
8657901324dSJerome Forissier     pathLenConstraint basic constraint value is equal to INT_MAX.
8667901324dSJerome Forissier     The actual effect with almost every compiler is the intended
8677901324dSJerome Forissier     behavior, so this is unlikely to be exploitable anywhere. #3192
8687901324dSJerome Forissier   * Fix issue with a detected HW accelerated record error not being exposed
8697901324dSJerome Forissier     due to shadowed variable. Contributed by Sander Visser in #3310.
8707901324dSJerome Forissier   * Avoid NULL pointer dereferencing if mbedtls_ssl_free() is called with a
8717901324dSJerome Forissier     NULL pointer argument. Contributed by Sander Visser in #3312.
8727901324dSJerome Forissier   * Fix potential linker errors on dual world platforms by inlining
8737901324dSJerome Forissier     mbedtls_gcc_group_to_psa(). This allows the pk.c module to link separately
8747901324dSJerome Forissier     from psa_crypto.c. Fixes #3300.
8757901324dSJerome Forissier   * Remove dead code in X.509 certificate parsing. Contributed by irwir in
8767901324dSJerome Forissier     #2855.
8777901324dSJerome Forissier   * Include asn1.h in error.c. Fixes #3328 reported by David Hu.
8787901324dSJerome Forissier   * Fix potential memory leaks in ecp_randomize_jac() and ecp_randomize_mxz()
8797901324dSJerome Forissier     when PRNG function fails. Contributed by Jonas Lejeune in #3318.
8807901324dSJerome Forissier   * Remove unused macros from MSVC projects. Reported in #3297 and fix
8817901324dSJerome Forissier     submitted in #3333 by irwir.
8827901324dSJerome Forissier   * Add additional bounds checks in ssl_write_client_hello() preventing
8837901324dSJerome Forissier     output buffer overflow if the configuration declared a buffer that was
8847901324dSJerome Forissier     too small.
8857901324dSJerome Forissier   * Set _POSIX_C_SOURCE to at least 200112L in C99 code. Reported in #3420 and
8867901324dSJerome Forissier     fix submitted in #3421 by Nia Alarie.
8877901324dSJerome Forissier   * Fix building library/net_sockets.c and the ssl_mail_client program on
8887901324dSJerome Forissier     NetBSD. Contributed by Nia Alarie in #3422.
8897901324dSJerome Forissier   * Fix false positive uninitialised variable reported by cpp-check.
8907901324dSJerome Forissier     Contributed by Sander Visser in #3311.
8917901324dSJerome Forissier   * Update iv and len context pointers manually when reallocating buffers
8927901324dSJerome Forissier     using the MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH feature. This caused issues
8937901324dSJerome Forissier     when receiving a connection with CID, when these fields were shifted
8947901324dSJerome Forissier     in ssl_parse_record_header().
8957901324dSJerome Forissier
8967901324dSJerome ForissierChanges
8977901324dSJerome Forissier   * Fix warnings about signedness issues in format strings. The build is now
8987901324dSJerome Forissier     clean of -Wformat-signedness warnings. Contributed by Kenneth Soerensen
8997901324dSJerome Forissier     in #3153.
9007901324dSJerome Forissier   * Fix minor performance issue in operations on Curve25519 caused by using a
9017901324dSJerome Forissier     suboptimal modular reduction in one place. Found and fix contributed by
9027901324dSJerome Forissier     Aurelien Jarno in #3209.
9037901324dSJerome Forissier   * Combine identical cases in switch statements in md.c. Contributed
9047901324dSJerome Forissier     by irwir in #3208.
9057901324dSJerome Forissier   * Simplify a bounds check in ssl_write_certificate_request(). Contributed
9067901324dSJerome Forissier     by irwir in #3150.
9077901324dSJerome Forissier   * Unify the example programs termination to call mbedtls_exit() instead of
9087901324dSJerome Forissier     using a return command. This has been done to enable customization of the
9097901324dSJerome Forissier     behavior in bare metal environments.
9107901324dSJerome Forissier   * Fix mbedtls_x509_dn_gets to escape non-ASCII characters as "?".
9117901324dSJerome Forissier     Contributed by Koh M. Nakagawa in #3326.
9127901324dSJerome Forissier   * Use FindPython3 when cmake version >= 3.15.0
9137901324dSJerome Forissier   * Abort the ClientHello writing function as soon as some extension doesn't
9147901324dSJerome Forissier     fit into the record buffer. Previously, such extensions were silently
9157901324dSJerome Forissier     dropped. As a consequence, the TLS handshake now fails when the output
9167901324dSJerome Forissier     buffer is not large enough to hold the ClientHello.
9177901324dSJerome Forissier   * The unit tests now rely on header files in tests/include/test and source
9187901324dSJerome Forissier     files in tests/src. When building with make or cmake, the files in
9197901324dSJerome Forissier     tests/src are compiled and the resulting object linked into each test
9207901324dSJerome Forissier     executable.
9217901324dSJerome Forissier   * The ECP module, enabled by `MBEDTLS_ECP_C`, now depends on
9227901324dSJerome Forissier     `MBEDTLS_CTR_DRBG_C` or `MBEDTLS_HMAC_DRBG_C` for some side-channel
9237901324dSJerome Forissier     coutermeasures. If side channels are not a concern, this dependency can
9247901324dSJerome Forissier     be avoided by enabling the new option `MBEDTLS_ECP_NO_INTERNAL_RNG`.
9257901324dSJerome Forissier   * Align MSVC error flag with GCC and Clang. Contributed by Carlos Gomes
9267901324dSJerome Forissier     Martinho. #3147
9277901324dSJerome Forissier   * Remove superfluous assignment in mbedtls_ssl_parse_certificate(). Reported
9287901324dSJerome Forissier     in #3182 and fix submitted by irwir. #3217
9297901324dSJerome Forissier   * Fix typo in XTS tests. Reported and fix submitted by Kxuan. #3319
9307901324dSJerome Forissier
93111fa71b9SJerome Forissier= mbed TLS 2.22.0 branch released 2020-04-14
93211fa71b9SJerome Forissier
93311fa71b9SJerome ForissierNew deprecations
93411fa71b9SJerome Forissier   * Deprecate MBEDTLS_SSL_HW_RECORD_ACCEL that enables function hooks in the
93511fa71b9SJerome Forissier     SSL module for hardware acceleration of individual records.
93611fa71b9SJerome Forissier   * Deprecate mbedtls_ssl_get_max_frag_len() in favour of
93711fa71b9SJerome Forissier     mbedtls_ssl_get_output_max_frag_len() and
93811fa71b9SJerome Forissier     mbedtls_ssl_get_input_max_frag_len() to be more precise about which max
93911fa71b9SJerome Forissier     fragment length is desired.
94011fa71b9SJerome Forissier
94111fa71b9SJerome ForissierSecurity
94211fa71b9SJerome Forissier   * Fix issue in DTLS handling of new associations with the same parameters
94311fa71b9SJerome Forissier     (RFC 6347 section 4.2.8): an attacker able to send forged UDP packets to
94411fa71b9SJerome Forissier     the server could cause it to drop established associations with
94511fa71b9SJerome Forissier     legitimate clients, resulting in a Denial of Service. This could only
94611fa71b9SJerome Forissier     happen when MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE was enabled in config.h
94711fa71b9SJerome Forissier     (which it is by default).
94811fa71b9SJerome Forissier   * Fix side channel in ECC code that allowed an adversary with access to
94911fa71b9SJerome Forissier     precise enough timing and memory access information (typically an
95011fa71b9SJerome Forissier     untrusted operating system attacking a secure enclave) to fully recover
95111fa71b9SJerome Forissier     an ECDSA private key. Found and reported by Alejandro Cabrera Aldaya,
95211fa71b9SJerome Forissier     Billy Brumley and Cesar Pereida Garcia. CVE-2020-10932
95311fa71b9SJerome Forissier   * Fix a potentially remotely exploitable buffer overread in a
95411fa71b9SJerome Forissier     DTLS client when parsing the Hello Verify Request message.
95511fa71b9SJerome Forissier
95611fa71b9SJerome ForissierFeatures
95711fa71b9SJerome Forissier   * The new build option MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH automatically
95811fa71b9SJerome Forissier     resizes the I/O buffers before and after handshakes, reducing the memory
95911fa71b9SJerome Forissier     consumption during application data transfer.
96011fa71b9SJerome Forissier
96111fa71b9SJerome ForissierBugfix
96211fa71b9SJerome Forissier   * Fix compilation failure when both MBEDTLS_SSL_PROTO_DTLS and
96311fa71b9SJerome Forissier     MBEDTLS_SSL_HW_RECORD_ACCEL are enabled.
96411fa71b9SJerome Forissier   * Remove a spurious check in ssl_parse_client_psk_identity that triggered
96511fa71b9SJerome Forissier     a warning with some compilers. Fix contributed by irwir in #2856.
96611fa71b9SJerome Forissier   * Fix a function name in a debug message. Contributed by Ercan Ozturk in
96711fa71b9SJerome Forissier     #3013.
96811fa71b9SJerome Forissier
96911fa71b9SJerome ForissierChanges
97011fa71b9SJerome Forissier   * Mbed Crypto is no longer a Git submodule. The crypto part of the library
97111fa71b9SJerome Forissier     is back directly in the present repository.
97211fa71b9SJerome Forissier   * Split mbedtls_ssl_get_max_frag_len() into
97311fa71b9SJerome Forissier     mbedtls_ssl_get_output_max_frag_len() and
97411fa71b9SJerome Forissier     mbedtls_ssl_get_input_max_frag_len() to ensure that a sufficient input
97511fa71b9SJerome Forissier     buffer is allocated by the server (if MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
97611fa71b9SJerome Forissier     is defined), regardless of what MFL was configured for it.
97711fa71b9SJerome Forissier
97811fa71b9SJerome Forissier= mbed TLS 2.21.0 branch released 2020-02-20
97911fa71b9SJerome Forissier
98011fa71b9SJerome ForissierNew deprecations
98111fa71b9SJerome Forissier   * Deprecate MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO that enables parsing
98211fa71b9SJerome Forissier     SSLv2 ClientHello messages.
98311fa71b9SJerome Forissier   * Deprecate MBEDTLS_SSL_PROTO_SSL3 that enables support for SSLv3.
98411fa71b9SJerome Forissier   * Deprecate for MBEDTLS_PKCS11_C, the wrapper around the pkcs11-helper
98511fa71b9SJerome Forissier     library which allows TLS authentication to use keys stored in a
98611fa71b9SJerome Forissier     PKCS#11 token such as a smartcard.
9875b25c76aSJerome Forissier
9885b25c76aSJerome ForissierSecurity
9895b25c76aSJerome Forissier   * Fix potential memory overread when performing an ECDSA signature
9905b25c76aSJerome Forissier     operation. The overread only happens with cryptographically low
9915b25c76aSJerome Forissier     probability (of the order of 2^-n where n is the bitsize of the curve)
9925b25c76aSJerome Forissier     unless the RNG is broken, and could result in information disclosure or
9935b25c76aSJerome Forissier     denial of service (application crash or extra resource consumption).
9945b25c76aSJerome Forissier     Found by Auke Zeilstra and Peter Schwabe, using static analysis.
9955b25c76aSJerome Forissier   * To avoid a side channel vulnerability when parsing an RSA private key,
9965b25c76aSJerome Forissier     read all the CRT parameters from the DER structure rather than
9975b25c76aSJerome Forissier     reconstructing them. Found by Alejandro Cabrera Aldaya and Billy Bob
9985b25c76aSJerome Forissier     Brumley. Reported and fix contributed by Jack Lloyd.
9995b25c76aSJerome Forissier     ARMmbed/mbed-crypto#352
10005b25c76aSJerome Forissier
100111fa71b9SJerome ForissierFeatures
100211fa71b9SJerome Forissier   * The new build option MBEDTLS_SHA512_NO_SHA384 allows building SHA-512
100311fa71b9SJerome Forissier     support without SHA-384.
100411fa71b9SJerome Forissier
100511fa71b9SJerome ForissierAPI changes
100611fa71b9SJerome Forissier   * Change the encoding of key types and curves in the PSA API. The new
100711fa71b9SJerome Forissier     values are aligned with the upcoming release of the PSA Crypto API
100811fa71b9SJerome Forissier     specification version 1.0.0. The main change which may break some
100911fa71b9SJerome Forissier     existing code is that elliptic curve key types no longer encode the
101011fa71b9SJerome Forissier     exact curve: a psa_ecc_curve_t or psa_key_type_t value only encodes
101111fa71b9SJerome Forissier     a curve family and the key size determines the exact curve (for example,
101211fa71b9SJerome Forissier     PSA_ECC_CURVE_SECP_R1 with 256 bits is P256R1). ARMmbed/mbed-crypto#330
101311fa71b9SJerome Forissier
10145b25c76aSJerome ForissierBugfix
10155b25c76aSJerome Forissier   * Fix an unchecked call to mbedtls_md() in the x509write module.
101611fa71b9SJerome Forissier   * Fix build failure with MBEDTLS_ZLIB_SUPPORT enabled. Reported by
101711fa71b9SJerome Forissier     Jack Lloyd in #2859. Fix submitted by jiblime in #2963.
101811fa71b9SJerome Forissier   * Fix some false-positive uninitialized variable warnings in X.509. Fix
101911fa71b9SJerome Forissier     contributed by apple-ihack-geek in #2663.
102011fa71b9SJerome Forissier   * Fix a possible error code mangling in psa_mac_verify_finish() when
102111fa71b9SJerome Forissier     a cryptographic accelerator fails. ARMmbed/mbed-crypto#345
10225b25c76aSJerome Forissier   * Fix a bug in mbedtls_pk_parse_key() that would cause it to accept some
10235b25c76aSJerome Forissier     RSA keys that would later be rejected by functions expecting private
10245b25c76aSJerome Forissier     keys. Found by Catena cyber using oss-fuzz (issue 20467).
102511fa71b9SJerome Forissier   * Fix a bug in mbedtls_pk_parse_key() that would cause it to
102611fa71b9SJerome Forissier     accept some RSA keys with invalid values by silently fixing those values.
10275b25c76aSJerome Forissier
102811fa71b9SJerome Forissier= mbed TLS 2.20.0 branch released 2020-01-15
102911fa71b9SJerome Forissier
103011fa71b9SJerome ForissierDefault behavior changes
103111fa71b9SJerome Forissier   * The initial seeding of a CTR_DRBG instance makes a second call to the
103211fa71b9SJerome Forissier     entropy function to obtain entropy for a nonce if the entropy size is less
103311fa71b9SJerome Forissier     than 3/2 times the key size. In case you want to disable the extra call to
103411fa71b9SJerome Forissier     grab entropy, you can call mbedtls_ctr_drbg_set_nonce_len() to force the
103511fa71b9SJerome Forissier     nonce length to 0.
10365b25c76aSJerome Forissier
10375b25c76aSJerome ForissierSecurity
103811fa71b9SJerome Forissier   * Enforce that mbedtls_entropy_func() gathers a total of
103911fa71b9SJerome Forissier     MBEDTLS_ENTROPY_BLOCK_SIZE bytes or more from strong sources. In the
104011fa71b9SJerome Forissier     default configuration, on a platform with a single entropy source, the
104111fa71b9SJerome Forissier     entropy module formerly only grabbed 32 bytes, which is good enough for
104211fa71b9SJerome Forissier     security if the source is genuinely strong, but less than the expected 64
104311fa71b9SJerome Forissier     bytes (size of the entropy accumulator).
10445b25c76aSJerome Forissier   * Zeroize local variables in mbedtls_internal_aes_encrypt() and
10455b25c76aSJerome Forissier     mbedtls_internal_aes_decrypt() before exiting the function. The value of
10465b25c76aSJerome Forissier     these variables can be used to recover the last round key. To follow best
10475b25c76aSJerome Forissier     practice and to limit the impact of buffer overread vulnerabilities (like
10485b25c76aSJerome Forissier     Heartbleed) we need to zeroize them before exiting the function.
10495b25c76aSJerome Forissier     Issue reported by Tuba Yavuz, Farhaan Fowze, Ken (Yihang) Bai,
10505b25c76aSJerome Forissier     Grant Hernandez, and Kevin Butler (University of Florida) and
10515b25c76aSJerome Forissier     Dave Tian (Purdue University).
105211fa71b9SJerome Forissier   * Fix side channel vulnerability in ECDSA. Our bignum implementation is not
105311fa71b9SJerome Forissier     constant time/constant trace, so side channel attacks can retrieve the
105411fa71b9SJerome Forissier     blinded value, factor it (as it is smaller than RSA keys and not guaranteed
105511fa71b9SJerome Forissier     to have only large prime factors), and then, by brute force, recover the
105611fa71b9SJerome Forissier     key. Reported by Alejandro Cabrera Aldaya and Billy Brumley.
10575b25c76aSJerome Forissier   * Fix side channel vulnerability in ECDSA key generation. Obtaining precise
10585b25c76aSJerome Forissier     timings on the comparison in the key generation enabled the attacker to
10595b25c76aSJerome Forissier     learn leading bits of the ephemeral key used during ECDSA signatures and to
10605b25c76aSJerome Forissier     recover the private key. Reported by Jeremy Dubeuf.
10615b25c76aSJerome Forissier   * Catch failure of AES functions in mbedtls_ctr_drbg_random(). Uncaught
10625b25c76aSJerome Forissier     failures could happen with alternative implementations of AES. Bug
10635b25c76aSJerome Forissier     reported and fix proposed by Johan Uppman Bruce and Christoffer Lauri,
10645b25c76aSJerome Forissier     Sectra.
10655b25c76aSJerome Forissier
106611fa71b9SJerome ForissierFeatures
106711fa71b9SJerome Forissier   * Key derivation inputs in the PSA API can now either come from a key object
106811fa71b9SJerome Forissier     or from a buffer regardless of the step type.
106911fa71b9SJerome Forissier   * The CTR_DRBG module can grab a nonce from the entropy source during the
107011fa71b9SJerome Forissier     initial seeding. The default nonce length is chosen based on the key size
107111fa71b9SJerome Forissier     to achieve the security strength defined by NIST SP 800-90A. You can
107211fa71b9SJerome Forissier     change it with mbedtls_ctr_drbg_set_nonce_len().
107311fa71b9SJerome Forissier   * Add ENUMERATED tag support to the ASN.1 module. Contributed by
107411fa71b9SJerome Forissier     msopiha-linaro in ARMmbed/mbed-crypto#307.
107511fa71b9SJerome Forissier
107611fa71b9SJerome ForissierAPI changes
107711fa71b9SJerome Forissier   * In the PSA API, forbid zero-length keys. To pass a zero-length input to a
107811fa71b9SJerome Forissier     key derivation function, use a buffer instead (this is now always
107911fa71b9SJerome Forissier     possible).
108011fa71b9SJerome Forissier   * Rename psa_asymmetric_sign() to psa_sign_hash() and
108111fa71b9SJerome Forissier     psa_asymmetric_verify() to psa_verify_hash().
108211fa71b9SJerome Forissier
10835b25c76aSJerome ForissierBugfix
108411fa71b9SJerome Forissier   * Fix an incorrect size in a debugging message. Reported and fix
108511fa71b9SJerome Forissier     submitted by irwir. Fixes #2717.
108611fa71b9SJerome Forissier   * Fix an unused variable warning when compiling without DTLS.
108711fa71b9SJerome Forissier     Reported and fix submitted by irwir. Fixes #2800.
108811fa71b9SJerome Forissier   * Remove a useless assignment. Reported and fix submitted by irwir.
108911fa71b9SJerome Forissier     Fixes #2801.
109011fa71b9SJerome Forissier   * Fix a buffer overflow in the PSA HMAC code when using a long key with an
109111fa71b9SJerome Forissier     unsupported algorithm. Fixes ARMmbed/mbed-crypto#254.
109211fa71b9SJerome Forissier   * Fix mbedtls_asn1_get_int to support any number of leading zeros. Credit
109311fa71b9SJerome Forissier     to OSS-Fuzz for finding a bug in an intermediate version of the fix.
109411fa71b9SJerome Forissier   * Fix mbedtls_asn1_get_bitstring_null to correctly parse bitstrings of at
109511fa71b9SJerome Forissier     most 2 bytes.
109611fa71b9SJerome Forissier   * mbedtls_ctr_drbg_set_entropy_len() and
109711fa71b9SJerome Forissier     mbedtls_hmac_drbg_set_entropy_len() now work if you call them before
109811fa71b9SJerome Forissier     mbedtls_ctr_drbg_seed() or mbedtls_hmac_drbg_seed().
10995b25c76aSJerome Forissier
11005b25c76aSJerome ForissierChanges
110111fa71b9SJerome Forissier   * Remove the technical possibility to define custom mbedtls_md_info
110211fa71b9SJerome Forissier     structures, which was exposed only in an internal header.
110311fa71b9SJerome Forissier   * psa_close_key(0) and psa_destroy_key(0) now succeed (doing nothing, as
110411fa71b9SJerome Forissier     before).
110511fa71b9SJerome Forissier   * Variables containing error codes are now initialized to an error code
110611fa71b9SJerome Forissier     rather than success, so that coding mistakes or memory corruption tends to
110711fa71b9SJerome Forissier     cause functions to return this error code rather than a success. There are
110811fa71b9SJerome Forissier     no known instances where this changes the behavior of the library: this is
110911fa71b9SJerome Forissier     merely a robustness improvement. ARMmbed/mbed-crypto#323
111011fa71b9SJerome Forissier   * Remove a useless call to mbedtls_ecp_group_free(). Contributed by
111111fa71b9SJerome Forissier     Alexander Krizhanovsky in ARMmbed/mbed-crypto#210.
111211fa71b9SJerome Forissier   * Speed up PBKDF2 by caching the digest calculation. Contributed by Jack
111311fa71b9SJerome Forissier     Lloyd and Fortanix Inc in ARMmbed/mbed-crypto#277.
111411fa71b9SJerome Forissier   * Small performance improvement of mbedtls_mpi_div_mpi(). Contributed by
111511fa71b9SJerome Forissier     Alexander Krizhanovsky in ARMmbed/mbed-crypto#308.
11165b25c76aSJerome Forissier
111711fa71b9SJerome Forissier= mbed TLS 2.19.1 branch released 2019-09-16
111811fa71b9SJerome Forissier
111911fa71b9SJerome ForissierFeatures
112011fa71b9SJerome Forissier   * Declare include headers as PUBLIC to propagate to CMake project consumers
112111fa71b9SJerome Forissier     Contributed by Zachary J. Fields in PR #2949.
112211fa71b9SJerome Forissier   * Add nss_keylog to ssl_client2 and ssl_server2, enabling easier analysis of
112311fa71b9SJerome Forissier     TLS sessions with tools like Wireshark.
112411fa71b9SJerome Forissier
112511fa71b9SJerome ForissierAPI Changes
112611fa71b9SJerome Forissier   * Make client_random and server_random const in
112711fa71b9SJerome Forissier     mbedtls_ssl_export_keys_ext_t, so that the key exporter is discouraged
112811fa71b9SJerome Forissier     from modifying the client/server hello.
112911fa71b9SJerome Forissier
113011fa71b9SJerome ForissierBugfix
113111fa71b9SJerome Forissier   * Fix some false-positive uninitialized variable warnings in crypto. Fix
113211fa71b9SJerome Forissier     contributed by apple-ihack-geek in #2663.
113311fa71b9SJerome Forissier
113411fa71b9SJerome Forissier= mbed TLS 2.19.0 branch released 2019-09-06
11355b25c76aSJerome Forissier
11365b25c76aSJerome ForissierSecurity
11375b25c76aSJerome Forissier   * Fix a missing error detection in ECJPAKE. This could have caused a
11385b25c76aSJerome Forissier     predictable shared secret if a hardware accelerator failed and the other
11395b25c76aSJerome Forissier     side of the key exchange had a similar bug.
11405b25c76aSJerome Forissier   * When writing a private EC key, use a constant size for the private
11415b25c76aSJerome Forissier     value, as specified in RFC 5915. Previously, the value was written
11425b25c76aSJerome Forissier     as an ASN.1 INTEGER, which caused the size of the key to leak
11435b25c76aSJerome Forissier     about 1 bit of information on average and could cause the value to be
11445b25c76aSJerome Forissier     1 byte too large for the output buffer.
114511fa71b9SJerome Forissier   * The deterministic ECDSA calculation reused the scheme's HMAC-DRBG to
114611fa71b9SJerome Forissier     implement blinding. Because of this for the same key and message the same
114711fa71b9SJerome Forissier     blinding value was generated. This reduced the effectiveness of the
114811fa71b9SJerome Forissier     countermeasure and leaked information about the private key through side
114911fa71b9SJerome Forissier     channels. Reported by Jack Lloyd.
115011fa71b9SJerome Forissier
115111fa71b9SJerome ForissierFeatures
115211fa71b9SJerome Forissier   * Add new API functions mbedtls_ssl_session_save() and
115311fa71b9SJerome Forissier     mbedtls_ssl_session_load() to allow serializing a session, for example to
115411fa71b9SJerome Forissier     store it in non-volatile storage, and later using it for TLS session
115511fa71b9SJerome Forissier     resumption.
115611fa71b9SJerome Forissier   * Add a new API function mbedtls_ssl_check_record() to allow checking that
115711fa71b9SJerome Forissier     an incoming record is valid, authentic and has not been seen before. This
115811fa71b9SJerome Forissier     feature can be used alongside Connection ID and SSL context serialisation.
115911fa71b9SJerome Forissier     The feature is enabled at compile-time by MBEDTLS_SSL_RECORD_CHECKING
116011fa71b9SJerome Forissier     option.
116111fa71b9SJerome Forissier   * New implementation of X25519 (ECDH using Curve25519) from Project Everest
116211fa71b9SJerome Forissier     (https://project-everest.github.io/). It can be enabled at compile time
116311fa71b9SJerome Forissier     with MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED. This implementation is formally
116411fa71b9SJerome Forissier     verified and significantly faster, but is only supported on x86 platforms
116511fa71b9SJerome Forissier     (32-bit and 64-bit) using GCC, Clang or Visual Studio. Contributed by
116611fa71b9SJerome Forissier     Christoph Wintersteiger from Microsoft Research.
116711fa71b9SJerome Forissier   * Add mbedtls_net_close(), enabling the building of forking servers where
116811fa71b9SJerome Forissier     the parent process closes the client socket and continue accepting, and
116911fa71b9SJerome Forissier     the child process closes the listening socket and handles the client
117011fa71b9SJerome Forissier     socket. Contributed by Robert Larsen in #2803.
11715b25c76aSJerome Forissier
11725b25c76aSJerome ForissierAPI Changes
117311fa71b9SJerome Forissier   * Add DER-encoded test CRTs to library/certs.c, allowing
117411fa71b9SJerome Forissier     the example programs ssl_server2 and ssl_client2 to be run
117511fa71b9SJerome Forissier     if MBEDTLS_FS_IO and MBEDTLS_PEM_PARSE_C are unset. Fixes #2254.
117611fa71b9SJerome Forissier   * The HAVEGE state type now uses uint32_t elements instead of int.
117711fa71b9SJerome Forissier   * The functions mbedtls_ecp_curve_list() and mbedtls_ecp_grp_id_list() now
117811fa71b9SJerome Forissier     list all curves for which at least one of ECDH or ECDSA is supported, not
117911fa71b9SJerome Forissier     just curves for which both are supported. Call mbedtls_ecdsa_can_do() or
118011fa71b9SJerome Forissier     mbedtls_ecdh_can_do() on each result to check whether each algorithm is
118111fa71b9SJerome Forissier     supported.
11825b25c76aSJerome Forissier   * The new function mbedtls_ecdsa_sign_det_ext() is similar to
11835b25c76aSJerome Forissier     mbedtls_ecdsa_sign_det() but allows passing an external RNG for the
11845b25c76aSJerome Forissier     purpose of blinding.
11855b25c76aSJerome Forissier
118611fa71b9SJerome ForissierNew deprecations
118711fa71b9SJerome Forissier   * Deprecate mbedtls_ecdsa_sign_det() in favor of a functions that can take an
118811fa71b9SJerome Forissier     RNG function as an input.
118911fa71b9SJerome Forissier   * Calling mbedtls_ecdsa_write_signature() with NULL as the f_rng argument
119011fa71b9SJerome Forissier     is now deprecated.
119111fa71b9SJerome Forissier
11925b25c76aSJerome ForissierBugfix
119311fa71b9SJerome Forissier   * Fix missing bounds checks in X.509 parsing functions that could
119411fa71b9SJerome Forissier     lead to successful parsing of ill-formed X.509 CRTs. Fixes #2437.
119511fa71b9SJerome Forissier   * Fix multiple X.509 functions previously returning ASN.1 low-level error
119611fa71b9SJerome Forissier     codes to always wrap these codes into X.509 high level error codes before
119711fa71b9SJerome Forissier     returning. Fixes #2431.
11985b25c76aSJerome Forissier   * Fix to allow building test suites with any warning that detects unused
11995b25c76aSJerome Forissier     functions. Fixes #1628.
12005b25c76aSJerome Forissier   * Fix typo in net_would_block(). Fixes #528 reported by github-monoculture.
12015b25c76aSJerome Forissier   * Remove redundant include file in timing.c. Fixes #2640 reported by irwir.
120211fa71b9SJerome Forissier   * Fix build failure when building with mingw on Windows by including
120311fa71b9SJerome Forissier     stdarg.h where needed. Fixes #2656.
12045b25c76aSJerome Forissier   * Fix Visual Studio Release x64 build configuration by inheriting
12055b25c76aSJerome Forissier     PlatformToolset from the project configuration. Fixes #1430 reported by
12065b25c76aSJerome Forissier     irwir.
12075b25c76aSJerome Forissier   * Enable Suite B with subset of ECP curves. Make sure the code compiles even
12085b25c76aSJerome Forissier     if some curves are not defined. Fixes #1591 reported by dbedev.
12095b25c76aSJerome Forissier   * Fix misuse of signed arithmetic in the HAVEGE module. #2598
121011fa71b9SJerome Forissier   * Avoid use of statically sized stack buffers for certificate writing.
121111fa71b9SJerome Forissier     This previously limited the maximum size of DER encoded certificates
121211fa71b9SJerome Forissier     in mbedtls_x509write_crt_der() to 2Kb. Reported by soccerGB in #2631.
121311fa71b9SJerome Forissier   * Fix partial zeroing in x509_get_other_name. Found and fixed by ekse, #2716.
12145b25c76aSJerome Forissier   * Update test certificates that were about to expire. Reported by
12155b25c76aSJerome Forissier     Bernhard M. Wiedemann in #2357.
12165b25c76aSJerome Forissier   * Fix the build on ARMv5TE in ARM mode to not use assembly instructions
12175b25c76aSJerome Forissier     that are only available in Thumb mode. Fix contributed by Aurelien Jarno
12185b25c76aSJerome Forissier     in #2169.
12195b25c76aSJerome Forissier   * Fix propagation of restart contexts in restartable EC operations.
12205b25c76aSJerome Forissier     This could previously lead to segmentation faults in builds using an
12215b25c76aSJerome Forissier     address-sanitizer and enabling but not using MBEDTLS_ECP_RESTARTABLE.
12225b25c76aSJerome Forissier   * Fix memory leak in in mpi_miller_rabin(). Contributed by
12235b25c76aSJerome Forissier     Jens Wiklander <jens.wiklander@linaro.org> in #2363
12245b25c76aSJerome Forissier   * Improve code clarity in x509_crt module, removing false-positive
12255b25c76aSJerome Forissier     uninitialized variable warnings on some recent toolchains (GCC8, etc).
12265b25c76aSJerome Forissier     Discovered and fixed by Andy Gross (Linaro), #2392.
12275b25c76aSJerome Forissier   * Fix bug in endianness conversion in bignum module. This lead to
12285b25c76aSJerome Forissier     functionally incorrect code on bigendian systems which don't have
12295b25c76aSJerome Forissier     __BYTE_ORDER__ defined. Reported by Brendan Shanks. Fixes #2622.
12305b25c76aSJerome Forissier
12315b25c76aSJerome ForissierChanges
123211fa71b9SJerome Forissier   * Replace multiple uses of MD2 by SHA-256 in X.509 test suite. Fixes #821.
12335b25c76aSJerome Forissier   * Make it easier to define MBEDTLS_PARAM_FAILED as assert (which config.h
12345b25c76aSJerome Forissier     suggests). #2671
12355b25c76aSJerome Forissier   * Make `make clean` clean all programs always. Fixes #1862.
123611fa71b9SJerome Forissier   * Add a Dockerfile and helper scripts (all-in-docker.sh, basic-in-docker.sh,
123711fa71b9SJerome Forissier     docker-env.sh) to simplify running test suites on a Linux host. Contributed
123811fa71b9SJerome Forissier     by Peter Kolbus (Garmin).
123911fa71b9SJerome Forissier   * Add `reproducible` option to `ssl_client2` and `ssl_server2` to enable
124011fa71b9SJerome Forissier     test runs without variability. Contributed by Philippe Antoine (Catena
124111fa71b9SJerome Forissier     cyber) in #2681.
124211fa71b9SJerome Forissier   * Extended .gitignore to ignore Visual Studio artifacts. Fixed by ConfusedSushi.
124311fa71b9SJerome Forissier   * Adds fuzz targets, especially for continuous fuzzing with OSS-Fuzz.
124411fa71b9SJerome Forissier     Contributed by Philippe Antoine (Catena cyber).
124511fa71b9SJerome Forissier   * Remove the crypto part of the library from Mbed TLS. The crypto
124611fa71b9SJerome Forissier     code and tests are now only available via Mbed Crypto, which
124711fa71b9SJerome Forissier     Mbed TLS references as a Git submodule.
12485b25c76aSJerome Forissier
124911fa71b9SJerome Forissier= mbed TLS 2.18.1 branch released 2019-07-12
12505b25c76aSJerome Forissier
12515b25c76aSJerome ForissierBugfix
125211fa71b9SJerome Forissier   * Fix build failure when building with mingw on Windows by including
125311fa71b9SJerome Forissier     stdarg.h where needed. Fixes #2656.
125411fa71b9SJerome Forissier
125511fa71b9SJerome ForissierChanges
125611fa71b9SJerome Forissier   * Enable building of Mbed TLS as a CMake subproject. Suggested and fixed by
125711fa71b9SJerome Forissier     Ashley Duncan in #2609.
125811fa71b9SJerome Forissier
125911fa71b9SJerome Forissier= mbed TLS 2.18.0 branch released 2019-06-11
126011fa71b9SJerome Forissier
126111fa71b9SJerome ForissierFeatures
126211fa71b9SJerome Forissier   * Add the Any Policy certificate policy oid, as defined in
126311fa71b9SJerome Forissier     rfc 5280 section 4.2.1.4.
126411fa71b9SJerome Forissier   * It is now possible to use NIST key wrap mode via the mbedtls_cipher API.
126511fa71b9SJerome Forissier     Contributed by Jack Lloyd and Fortanix Inc.
126611fa71b9SJerome Forissier   * Add the Wi-SUN Field Area Network (FAN) device extended key usage.
126711fa71b9SJerome Forissier   * Add the oid certificate policy x509 extension.
126811fa71b9SJerome Forissier   * It is now possible to perform RSA PKCS v1.5 signatures with RIPEMD-160 digest.
126911fa71b9SJerome Forissier     Contributed by Jack Lloyd and Fortanix Inc.
127011fa71b9SJerome Forissier   * Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes,
127111fa71b9SJerome Forissier     and the used tls-prf.
127211fa71b9SJerome Forissier   * Add public API for tls-prf function, according to requested enum.
127311fa71b9SJerome Forissier   * Add support for parsing otherName entries in the Subject Alternative Name
127411fa71b9SJerome Forissier     X.509 certificate extension, specifically type hardware module name,
127511fa71b9SJerome Forissier     as defined in RFC 4108 section 5.
127611fa71b9SJerome Forissier   * Add support for parsing certificate policies extension, as defined in
127711fa71b9SJerome Forissier     RFC 5280 section 4.2.1.4. Currently, only the "Any Policy" policy is
127811fa71b9SJerome Forissier     supported.
127911fa71b9SJerome Forissier   * List all SAN types in the subject_alt_names field of the certificate.
128011fa71b9SJerome Forissier     Resolves #459.
128111fa71b9SJerome Forissier   * Add support for draft-05 of the Connection ID extension, as specified
128211fa71b9SJerome Forissier     in https://tools.ietf.org/html/draft-ietf-tls-dtls-connection-id-05.
128311fa71b9SJerome Forissier     The Connection ID extension allows to keep DTLS connections beyond the
128411fa71b9SJerome Forissier     lifetime of the underlying transport by adding a connection identifier
128511fa71b9SJerome Forissier     to the DTLS record header. This identifier can be used to associated an
128611fa71b9SJerome Forissier     incoming record with the correct connection data even after the peer has
128711fa71b9SJerome Forissier     changed its IP or port. The feature is enabled at compile-time by setting
128811fa71b9SJerome Forissier     MBEDTLS_SSL_DTLS_CONNECTION_ID (disabled by default), and at run-time
128911fa71b9SJerome Forissier     through the new APIs mbedtls_ssl_conf_cid() and mbedtls_ssl_set_cid().
129011fa71b9SJerome Forissier
129111fa71b9SJerome Forissier
129211fa71b9SJerome ForissierAPI Changes
129311fa71b9SJerome Forissier   * Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes,
129411fa71b9SJerome Forissier     and the used tls-prf.
129511fa71b9SJerome Forissier   * Add public API for tls-prf function, according to requested enum.
129611fa71b9SJerome Forissier
129711fa71b9SJerome ForissierBugfix
12985b25c76aSJerome Forissier   * Fix private key DER output in the key_app_writer example. File contents
12995b25c76aSJerome Forissier     were shifted by one byte, creating an invalid ASN.1 tag. Fixed by
13005b25c76aSJerome Forissier     Christian Walther in #2239.
13015b25c76aSJerome Forissier   * Fix potential memory leak in X.509 self test. Found and fixed by
13025b25c76aSJerome Forissier     Junhwan Park, #2106.
13035b25c76aSJerome Forissier   * Reduce stack usage of hkdf tests. Fixes #2195.
13045b25c76aSJerome Forissier   * Fix 1-byte buffer overflow in mbedtls_mpi_write_string() when
13055b25c76aSJerome Forissier     used with negative inputs. Found by Guido Vranken in #2404. Credit to
13065b25c76aSJerome Forissier     OSS-Fuzz.
13075b25c76aSJerome Forissier   * Fix bugs in the AEAD test suite which would be exposed by ciphers which
13085b25c76aSJerome Forissier     either used both encrypt and decrypt key schedules, or which perform padding.
13095b25c76aSJerome Forissier     GCM and CCM were not affected. Fixed by Jack Lloyd.
13105b25c76aSJerome Forissier   * Fix incorrect default port number in ssl_mail_client example's usage.
13115b25c76aSJerome Forissier     Found and fixed by irwir. #2337
131211fa71b9SJerome Forissier   * Add psa_util.h to test/cpp_dummy_build to fix build_default_make_gcc_and_cxx.
131311fa71b9SJerome Forissier     Fixed by Peter Kolbus (Garmin). #2579
13145b25c76aSJerome Forissier   * Add missing parentheses around parameters in the definition of the
13155b25c76aSJerome Forissier     public macro MBEDTLS_X509_ID_FLAG. This could lead to invalid evaluation
13165b25c76aSJerome Forissier     in case operators binding less strongly than subtraction were used
13175b25c76aSJerome Forissier     for the parameter.
13185b25c76aSJerome Forissier   * Add a check for MBEDTLS_X509_CRL_PARSE_C in ssl_server2, guarding the crl
13195b25c76aSJerome Forissier     sni entry parameter. Reported by inestlerode in #560.
132011fa71b9SJerome Forissier   * Set the next sequence of the subject_alt_name to NULL when deleting
132111fa71b9SJerome Forissier     sequence on failure. Found and fix suggested by Philippe Antoine.
132211fa71b9SJerome Forissier     Credit to OSS-Fuzz.
13235b25c76aSJerome Forissier
13245b25c76aSJerome ForissierChanges
132511fa71b9SJerome Forissier   * Server's RSA certificate in certs.c was SHA-1 signed. In the default
132611fa71b9SJerome Forissier     mbedTLS configuration only SHA-2 signed certificates are accepted.
132711fa71b9SJerome Forissier     This certificate is used in the demo server programs, which lead the
132811fa71b9SJerome Forissier     client programs to fail at the peer's certificate verification
132911fa71b9SJerome Forissier     due to an unacceptable hash signature. The certificate has been
133011fa71b9SJerome Forissier     updated to one that is SHA-256 signed. Fix contributed by
133111fa71b9SJerome Forissier     Illya Gerasymchuk.
13325b25c76aSJerome Forissier   * Return from various debugging routines immediately if the
13335b25c76aSJerome Forissier     provided SSL context is unset.
13345b25c76aSJerome Forissier   * Remove dead code from bignum.c in the default configuration.
13355b25c76aSJerome Forissier     Found by Coverity, reported and fixed by Peter Kolbus (Garmin). Fixes #2309.
13365b25c76aSJerome Forissier   * Add test for minimal value of MBEDTLS_MPI_WINDOW_SIZE to all.sh.
13375b25c76aSJerome Forissier     Contributed by Peter Kolbus (Garmin).
13385b25c76aSJerome Forissier   * Change wording in the `mbedtls_ssl_conf_max_frag_len()`'s documentation to
13395b25c76aSJerome Forissier     improve clarity. Fixes #2258.
13405b25c76aSJerome Forissier
134111fa71b9SJerome Forissier= mbed TLS 2.17.0 branch released 2019-03-19
13425b25c76aSJerome Forissier
13435b25c76aSJerome ForissierFeatures
134411fa71b9SJerome Forissier   * Add a new X.509 API call `mbedtls_x509_parse_der_nocopy()`
134511fa71b9SJerome Forissier     which allows copy-less parsing of DER encoded X.509 CRTs,
134611fa71b9SJerome Forissier     at the cost of additional lifetime constraints on the input
134711fa71b9SJerome Forissier     buffer, but at the benefit of reduced RAM consumption.
134811fa71b9SJerome Forissier   * Add a new function mbedtls_asn1_write_named_bitstring() to write ASN.1
134911fa71b9SJerome Forissier     named bitstring in DER as required by RFC 5280 Appendix B.
13505b25c76aSJerome Forissier   * Add MBEDTLS_REMOVE_3DES_CIPHERSUITES to allow removing 3DES ciphersuites
13515b25c76aSJerome Forissier     from the default list (enabled by default). See
13525b25c76aSJerome Forissier     https://sweet32.info/SWEET32_CCS16.pdf.
13535b25c76aSJerome Forissier
135411fa71b9SJerome ForissierAPI Changes
135511fa71b9SJerome Forissier   * Add a new X.509 API call `mbedtls_x509_parse_der_nocopy()`.
135611fa71b9SJerome Forissier     See the Features section for more information.
135711fa71b9SJerome Forissier   * Allow to opt in to the removal the API mbedtls_ssl_get_peer_cert()
135811fa71b9SJerome Forissier     for the benefit of saving RAM, by disabling the new compile-time
135911fa71b9SJerome Forissier     option MBEDTLS_SSL_KEEP_PEER_CERTIFICATE (enabled by default for
136011fa71b9SJerome Forissier     API stability). Disabling this option makes mbedtls_ssl_get_peer_cert()
136111fa71b9SJerome Forissier     always return NULL, and removes the peer_cert field from the
136211fa71b9SJerome Forissier     mbedtls_ssl_session structure which otherwise stores the peer's
136311fa71b9SJerome Forissier     certificate.
136411fa71b9SJerome Forissier
136511fa71b9SJerome ForissierSecurity
136611fa71b9SJerome Forissier   * Make mbedtls_ecdh_get_params return an error if the second key
136711fa71b9SJerome Forissier     belongs to a different group from the first. Before, if an application
136811fa71b9SJerome Forissier     passed keys that belonged to different group, the first key's data was
136911fa71b9SJerome Forissier     interpreted according to the second group, which could lead to either
137011fa71b9SJerome Forissier     an error or a meaningless output from mbedtls_ecdh_get_params. In the
137111fa71b9SJerome Forissier     latter case, this could expose at most 5 bits of the private key.
137211fa71b9SJerome Forissier
13735b25c76aSJerome ForissierBugfix
13745b25c76aSJerome Forissier   * Fix a compilation issue with mbedtls_ecp_restart_ctx not being defined
13755b25c76aSJerome Forissier     when MBEDTLS_ECP_ALT is defined. Reported by jwhui. Fixes #2242.
13765b25c76aSJerome Forissier   * Run the AD too long test only if MBEDTLS_CCM_ALT is not defined.
13775b25c76aSJerome Forissier     Raised as a comment in #1996.
13785b25c76aSJerome Forissier   * Reduce the stack consumption of mbedtls_mpi_fill_random() which could
13795b25c76aSJerome Forissier     previously lead to a stack overflow on constrained targets.
13805b25c76aSJerome Forissier   * Add `MBEDTLS_SELF_TEST` for the mbedtls_self_test functions
13815b25c76aSJerome Forissier     in the header files, which missed the precompilation check. #971
138211fa71b9SJerome Forissier   * Fix returning the value 1 when mbedtls_ecdsa_genkey failed.
138311fa71b9SJerome Forissier   * Remove a duplicate #include in a sample program. Fixed by Masashi Honma #2326.
138411fa71b9SJerome Forissier   * Remove the mbedtls namespacing from the header file, to fix a "file not found"
138511fa71b9SJerome Forissier     build error. Fixed by Haijun Gu #2319.
13865b25c76aSJerome Forissier   * Fix signed-to-unsigned integer conversion warning
13875b25c76aSJerome Forissier     in X.509 module. Fixes #2212.
13885b25c76aSJerome Forissier   * Reduce stack usage of `mpi_write_hlp()` by eliminating recursion.
13895b25c76aSJerome Forissier     Fixes #2190.
13905b25c76aSJerome Forissier   * Fix false failure in all.sh when backup files exist in include/mbedtls
13915b25c76aSJerome Forissier     (e.g. config.h.bak). Fixed by Peter Kolbus (Garmin) #2407.
13925b25c76aSJerome Forissier   * Ensure that unused bits are zero when writing ASN.1 bitstrings when using
13935b25c76aSJerome Forissier     mbedtls_asn1_write_bitstring().
13945b25c76aSJerome Forissier   * Fix issue when writing the named bitstrings in KeyUsage and NsCertType
13955b25c76aSJerome Forissier     extensions in CSRs and CRTs that caused these bitstrings to not be encoded
13965b25c76aSJerome Forissier     correctly as trailing zeroes were not accounted for as unused bits in the
13975b25c76aSJerome Forissier     leading content octet. Fixes #1610.
13985b25c76aSJerome Forissier
13995b25c76aSJerome ForissierChanges
140011fa71b9SJerome Forissier   * Reduce RAM consumption during session renegotiation by not storing
140111fa71b9SJerome Forissier     the peer CRT chain and session ticket twice.
14025b25c76aSJerome Forissier   * Include configuration file in all header files that use configuration,
14035b25c76aSJerome Forissier     instead of relying on other header files that they include.
14045b25c76aSJerome Forissier     Inserted as an enhancement for #1371
14055b25c76aSJerome Forissier   * Add support for alternative CSR headers, as used by Microsoft and defined
14065b25c76aSJerome Forissier     in RFC 7468. Found by Michael Ernst. Fixes #767.
140711fa71b9SJerome Forissier   * Correct many misspellings. Fixed by MisterDA #2371.
140811fa71b9SJerome Forissier   * Provide an abstraction of vsnprintf to allow alternative implementations
140911fa71b9SJerome Forissier     for platforms that don't provide it. Based on contributions by Joris Aerts
141011fa71b9SJerome Forissier     and Nathaniel Wesley Filardo.
141111fa71b9SJerome Forissier   * Fix clobber list in MIPS assembly for large integer multiplication.
141211fa71b9SJerome Forissier     Previously, this could lead to functionally incorrect assembly being
141311fa71b9SJerome Forissier     produced by some optimizing compilers, showing up as failures in
141411fa71b9SJerome Forissier     e.g. RSA or ECC signature operations. Reported in #1722, fix suggested
141511fa71b9SJerome Forissier     by Aurelien Jarno and submitted by Jeffrey Martin.
14165b25c76aSJerome Forissier   * Reduce the complexity of the timing tests. They were assuming more than the
14175b25c76aSJerome Forissier     underlying OS actually guarantees.
141811fa71b9SJerome Forissier   * Fix configuration queries in ssl-opt.h. #2030
141911fa71b9SJerome Forissier   * Ensure that ssl-opt.h can be run in OS X. #2029
14205b25c76aSJerome Forissier   * Re-enable certain interoperability tests in ssl-opt.sh which had previously
14215b25c76aSJerome Forissier     been disabled for lack of a sufficiently recent version of GnuTLS on the CI.
14225b25c76aSJerome Forissier   * Ciphersuites based on 3DES now have the lowest priority by default when
14235b25c76aSJerome Forissier     they are enabled.
14245b25c76aSJerome Forissier
14253d3b0591SJens Wiklander= mbed TLS 2.16.0 branch released 2018-12-21
14263d3b0591SJens Wiklander
14273d3b0591SJens WiklanderFeatures
14283d3b0591SJens Wiklander   * Add a new config.h option of MBEDTLS_CHECK_PARAMS that enables validation
14293d3b0591SJens Wiklander     of parameters in the API. This allows detection of obvious misuses of the
14303d3b0591SJens Wiklander     API, such as passing NULL pointers. The API of existing functions hasn't
14313d3b0591SJens Wiklander     changed, but requirements on parameters have been made more explicit in
14323d3b0591SJens Wiklander     the documentation. See the corresponding API documentation for each
14333d3b0591SJens Wiklander     function to see for which parameter values it is defined. This feature is
14343d3b0591SJens Wiklander     disabled by default. See its API documentation in config.h for additional
14353d3b0591SJens Wiklander     steps you have to take when enabling it.
14363d3b0591SJens Wiklander
14373d3b0591SJens WiklanderAPI Changes
14383d3b0591SJens Wiklander   * The following functions in the random generator modules have been
14393d3b0591SJens Wiklander     deprecated and replaced as shown below. The new functions change
14403d3b0591SJens Wiklander     the return type from void to int to allow returning error codes when
14413d3b0591SJens Wiklander     using MBEDTLS_<MODULE>_ALT for the underlying AES or message digest
14423d3b0591SJens Wiklander     primitive. Fixes #1798.
14433d3b0591SJens Wiklander     mbedtls_ctr_drbg_update() -> mbedtls_ctr_drbg_update_ret()
14443d3b0591SJens Wiklander     mbedtls_hmac_drbg_update() -> mbedtls_hmac_drbg_update_ret()
14453d3b0591SJens Wiklander   * Extend ECDH interface to enable alternative implementations.
14463d3b0591SJens Wiklander   * Deprecate error codes of the form MBEDTLS_ERR_xxx_INVALID_KEY_LENGTH for
14473d3b0591SJens Wiklander     ARIA, CAMELLIA and Blowfish. These error codes will be replaced by
14483d3b0591SJens Wiklander     the more generic per-module error codes MBEDTLS_ERR_xxx_BAD_INPUT_DATA.
14493d3b0591SJens Wiklander   * Additional parameter validation checks have been added for the following
14503d3b0591SJens Wiklander     modules - AES, ARIA, Blowfish, CAMELLIA, CCM, GCM, DHM, ECP, ECDSA, ECDH,
14513d3b0591SJens Wiklander     ECJPAKE, SHA, Chacha20 and Poly1305, cipher, pk, RSA, and MPI.
14523d3b0591SJens Wiklander     Where modules have had parameter validation added, existing parameter
14533d3b0591SJens Wiklander     checks may have changed. Some modules, such as Chacha20 had existing
14543d3b0591SJens Wiklander     parameter validation whereas other modules had little. This has now been
14553d3b0591SJens Wiklander     changed so that the same level of validation is present in all modules, and
14563d3b0591SJens Wiklander     that it is now optional with the MBEDTLS_CHECK_PARAMS flag which by default
14573d3b0591SJens Wiklander     is off. That means that checks which were previously present by default
14583d3b0591SJens Wiklander     will no longer be.
14593d3b0591SJens Wiklander
14603d3b0591SJens WiklanderNew deprecations
14613d3b0591SJens Wiklander   * Deprecate mbedtls_ctr_drbg_update and mbedtls_hmac_drbg_update
14623d3b0591SJens Wiklander     in favor of functions that can return an error code.
1463817466cbSJens Wiklander
1464817466cbSJens WiklanderBugfix
14653d3b0591SJens Wiklander   * Fix for Clang, which was reporting a warning for the bignum.c inline
14663d3b0591SJens Wiklander     assembly for AMD64 targets creating string literals greater than those
14673d3b0591SJens Wiklander     permitted by the ISO C99 standard. Found by Aaron Jones. Fixes #482.
14683d3b0591SJens Wiklander   * Fix runtime error in `mbedtls_platform_entropy_poll()` when run
14693d3b0591SJens Wiklander     through qemu user emulation. Reported and fix suggested by randombit
14703d3b0591SJens Wiklander     in #1212. Fixes #1212.
14713d3b0591SJens Wiklander   * Fix an unsafe bounds check when restoring an SSL session from a ticket.
14723d3b0591SJens Wiklander     This could lead to a buffer overflow, but only in case ticket authentication
14733d3b0591SJens Wiklander     was broken. Reported and fix suggested by Guido Vranken in #659.
14743d3b0591SJens Wiklander   * Add explicit integer to enumeration type casts to example program
14753d3b0591SJens Wiklander     programs/pkey/gen_key which previously led to compilation failure
14763d3b0591SJens Wiklander     on some toolchains. Reported by phoenixmcallister. Fixes #2170.
14773d3b0591SJens Wiklander   * Fix double initialization of ECC hardware that made some accelerators
14783d3b0591SJens Wiklander     hang.
14793d3b0591SJens Wiklander   * Clarify documentation of mbedtls_ssl_set_own_cert() regarding the absence
14803d3b0591SJens Wiklander     of check for certificate/key matching. Reported by Attila Molnar, #507.
14813d3b0591SJens Wiklander
148211fa71b9SJerome Forissier = mbed TLS 2.15.1 branch released 2018-11-30
148311fa71b9SJerome Forissier
148411fa71b9SJerome Forissier Changes
148511fa71b9SJerome Forissier    * Update the Mbed Crypto submodule to version 0.1.0b2.
148611fa71b9SJerome Forissier
148711fa71b9SJerome Forissier = mbed TLS 2.15.0 branch released 2018-11-23
148811fa71b9SJerome Forissier
148911fa71b9SJerome Forissier Features
149011fa71b9SJerome Forissier    * Add an experimental build option, USE_CRYPTO_SUBMODULE, to enable use of
149111fa71b9SJerome Forissier      Mbed Crypto as the source of the cryptography implementation.
149211fa71b9SJerome Forissier    * Add an experimental configuration option, MBEDTLS_PSA_CRYPTO_C, to enable
149311fa71b9SJerome Forissier      the PSA Crypto API from Mbed Crypto when additionally used with the
149411fa71b9SJerome Forissier      USE_CRYPTO_SUBMODULE build option.
149511fa71b9SJerome Forissier
149611fa71b9SJerome Forissier Changes
149711fa71b9SJerome Forissier    * Add unit tests for AES-GCM when called through mbedtls_cipher_auth_xxx()
149811fa71b9SJerome Forissier      from the cipher abstraction layer. Fixes #2198.
149911fa71b9SJerome Forissier
15003d3b0591SJens Wiklander= mbed TLS 2.14.1 branch released 2018-11-30
15013d3b0591SJens Wiklander
15023d3b0591SJens WiklanderSecurity
15033d3b0591SJens Wiklander   * Fix timing variations and memory access variations in RSA PKCS#1 v1.5
15043d3b0591SJens Wiklander     decryption that could lead to a Bleichenbacher-style padding oracle
15053d3b0591SJens Wiklander     attack. In TLS, this affects servers that accept ciphersuites based on
15063d3b0591SJens Wiklander     RSA decryption (i.e. ciphersuites whose name contains RSA but not
15073d3b0591SJens Wiklander     (EC)DH(E)). Discovered by Eyal Ronen (Weizmann Institute),  Robert Gillham
15083d3b0591SJens Wiklander     (University of Adelaide), Daniel Genkin (University of Michigan),
15093d3b0591SJens Wiklander     Adi Shamir (Weizmann Institute), David Wong (NCC Group), and Yuval Yarom
15103d3b0591SJens Wiklander     (University of Adelaide, Data61). The attack is described in more detail
15113d3b0591SJens Wiklander     in the paper available here: http://cat.eyalro.net/cat.pdf  CVE-2018-19608
15123d3b0591SJens Wiklander   * In mbedtls_mpi_write_binary(), don't leak the exact size of the number
15133d3b0591SJens Wiklander     via branching and memory access patterns. An attacker who could submit
15143d3b0591SJens Wiklander     a plaintext for RSA PKCS#1 v1.5 decryption but only observe the timing
15153d3b0591SJens Wiklander     of the decryption and not its result could nonetheless decrypt RSA
15163d3b0591SJens Wiklander     plaintexts and forge RSA signatures. Other asymmetric algorithms may
15173d3b0591SJens Wiklander     have been similarly vulnerable. Reported by Eyal Ronen, Robert Gillham,
15183d3b0591SJens Wiklander     Daniel Genkin, Adi Shamir, David Wong and Yuval Yarom.
15193d3b0591SJens Wiklander   * Wipe sensitive buffers on the stack in the CTR_DRBG and HMAC_DRBG
15203d3b0591SJens Wiklander     modules.
15213d3b0591SJens Wiklander
15223d3b0591SJens WiklanderAPI Changes
15233d3b0591SJens Wiklander   * The new functions mbedtls_ctr_drbg_update_ret() and
15243d3b0591SJens Wiklander     mbedtls_hmac_drbg_update_ret() are similar to mbedtls_ctr_drbg_update()
15253d3b0591SJens Wiklander     and mbedtls_hmac_drbg_update() respectively, but the new functions
15263d3b0591SJens Wiklander     report errors whereas the old functions return void. We recommend that
15273d3b0591SJens Wiklander     applications use the new functions.
15283d3b0591SJens Wiklander
15293d3b0591SJens Wiklander= mbed TLS 2.14.0 branch released 2018-11-19
15303d3b0591SJens Wiklander
15313d3b0591SJens WiklanderSecurity
15323d3b0591SJens Wiklander   * Fix overly strict DN comparison when looking for CRLs belonging to a
15333d3b0591SJens Wiklander     particular CA. This previously led to ignoring CRLs when the CRL's issuer
15343d3b0591SJens Wiklander     name and the CA's subject name differed in their string encoding (e.g.,
15353d3b0591SJens Wiklander     one using PrintableString and the other UTF8String) or in the choice of
15363d3b0591SJens Wiklander     upper and lower case. Reported by Henrik Andersson of Bosch GmbH in issue
15373d3b0591SJens Wiklander     #1784.
15383d3b0591SJens Wiklander   * Fix a flawed bounds check in server PSK hint parsing. In case the
15393d3b0591SJens Wiklander     incoming message buffer was placed within the first 64KiB of address
15403d3b0591SJens Wiklander     space and a PSK-(EC)DHE ciphersuite was used, this allowed an attacker
15413d3b0591SJens Wiklander     to trigger a memory access up to 64KiB beyond the incoming message buffer,
15423d3b0591SJens Wiklander     potentially leading to an application crash or information disclosure.
15433d3b0591SJens Wiklander   * Fix mbedtls_mpi_is_prime() to use more rounds of probabilistic testing. The
15443d3b0591SJens Wiklander     previous settings for the number of rounds made it practical for an
15453d3b0591SJens Wiklander     adversary to construct non-primes that would be erroneously accepted as
15463d3b0591SJens Wiklander     primes with high probability. This does not have an impact on the
15473d3b0591SJens Wiklander     security of TLS, but can matter in other contexts with numbers chosen
15483d3b0591SJens Wiklander     potentially by an adversary that should be prime and can be validated.
15493d3b0591SJens Wiklander     For example, the number of rounds was enough to securely generate RSA key
15503d3b0591SJens Wiklander     pairs or Diffie-Hellman parameters, but was insufficient to validate
15513d3b0591SJens Wiklander     Diffie-Hellman parameters properly.
15523d3b0591SJens Wiklander     See "Prime and Prejudice" by by Martin R. Albrecht and Jake Massimo and
15533d3b0591SJens Wiklander     Kenneth G. Paterson and Juraj Somorovsky.
15543d3b0591SJens Wiklander
15553d3b0591SJens WiklanderFeatures
15563d3b0591SJens Wiklander   * Add support for temporarily suspending expensive ECC computations after
15573d3b0591SJens Wiklander     some configurable amount of operations. This is intended to be used in
15583d3b0591SJens Wiklander     constrained, single-threaded systems where ECC is time consuming and can
15593d3b0591SJens Wiklander     block other operations until they complete. This is disabled by default,
15603d3b0591SJens Wiklander     but can be enabled by MBEDTLS_ECP_RESTARTABLE at compile time and
15613d3b0591SJens Wiklander     configured by mbedtls_ecp_set_max_ops() at runtime. It applies to the new
15623d3b0591SJens Wiklander     xxx_restartable functions in ECP, ECDSA, PK and X.509 (CRL not supported
15633d3b0591SJens Wiklander     yet), and to existing functions in ECDH and SSL (currently only
15643d3b0591SJens Wiklander     implemented client-side, for ECDHE-ECDSA ciphersuites in TLS 1.2,
15653d3b0591SJens Wiklander     including client authentication).
15663d3b0591SJens Wiklander   * Add support for Arm CPU DSP extensions to accelerate asymmetric key
15673d3b0591SJens Wiklander     operations. On CPUs where the extensions are available, they can accelerate
15683d3b0591SJens Wiklander     MPI multiplications used in ECC and RSA cryptography. Contributed by
15693d3b0591SJens Wiklander     Aurelien Jarno.
15703d3b0591SJens Wiklander   * Extend RSASSA-PSS signature to allow a smaller salt size. Previously, PSS
15713d3b0591SJens Wiklander     signature always used a salt with the same length as the hash, and returned
15723d3b0591SJens Wiklander     an error if this was not possible. Now the salt size may be up to two bytes
15733d3b0591SJens Wiklander     shorter. This allows the library to support all hash and signature sizes
15743d3b0591SJens Wiklander     that comply with FIPS 186-4, including SHA-512 with a 1024-bit key.
15753d3b0591SJens Wiklander   * Add support for 128-bit keys in CTR_DRBG. Note that using keys shorter
15763d3b0591SJens Wiklander     than 256 bits limits the security of generated material to 128 bits.
15773d3b0591SJens Wiklander
15783d3b0591SJens WiklanderAPI Changes
15793d3b0591SJens Wiklander   * Add a common error code of `MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED` for
15803d3b0591SJens Wiklander     a feature that is not supported by underlying alternative
15813d3b0591SJens Wiklander     implementations implementing cryptographic primitives. This is useful for
15823d3b0591SJens Wiklander     hardware accelerators that don't implement all options or features.
15833d3b0591SJens Wiklander
15843d3b0591SJens WiklanderNew deprecations
15853d3b0591SJens Wiklander   * All module specific errors following the form
15863d3b0591SJens Wiklander     MBEDTLS_ERR_XXX_FEATURE_UNAVAILABLE that indicate a feature is not
15873d3b0591SJens Wiklander     supported are deprecated and are now replaced by the new equivalent
15883d3b0591SJens Wiklander     platform error.
15893d3b0591SJens Wiklander   * All module specific generic hardware acceleration errors following the
15903d3b0591SJens Wiklander     form MBEDTLS_ERR_XXX_HW_ACCEL_FAILED that are deprecated and are replaced
15913d3b0591SJens Wiklander     by the equivalent plaform error.
15923d3b0591SJens Wiklander   * Deprecate the function mbedtls_mpi_is_prime() in favor of
15933d3b0591SJens Wiklander     mbedtls_mpi_is_prime_ext() which allows specifying the number of
15943d3b0591SJens Wiklander     Miller-Rabin rounds.
15953d3b0591SJens Wiklander
15963d3b0591SJens WiklanderBugfix
15973d3b0591SJens Wiklander   * Fix wrong order of freeing in programs/ssl/ssl_server2 example
15983d3b0591SJens Wiklander     application leading to a memory leak in case both
15993d3b0591SJens Wiklander     MBEDTLS_MEMORY_BUFFER_ALLOC_C and MBEDTLS_MEMORY_BACKTRACE are set.
16003d3b0591SJens Wiklander     Fixes #2069.
16013d3b0591SJens Wiklander   * Fix a bug in the update function for SSL ticket keys which previously
16023d3b0591SJens Wiklander     invalidated keys of a lifetime of less than a 1s. Fixes #1968.
16033d3b0591SJens Wiklander   * Fix failure in hmac_drbg in the benchmark sample application, when
16043d3b0591SJens Wiklander     MBEDTLS_THREADING_C is defined. Found by TrinityTonic, #1095
16053d3b0591SJens Wiklander   * Fix a bug in the record decryption routine ssl_decrypt_buf()
16063d3b0591SJens Wiklander     which lead to accepting properly authenticated but improperly
16073d3b0591SJens Wiklander     padded records in case of CBC ciphersuites using Encrypt-then-MAC.
16083d3b0591SJens Wiklander   * Fix memory leak and freeing without initialization in the example
16093d3b0591SJens Wiklander     program programs/x509/cert_write. Fixes #1422.
16103d3b0591SJens Wiklander   * Ignore IV in mbedtls_cipher_set_iv() when the cipher mode is
16113d3b0591SJens Wiklander     MBEDTLS_MODE_ECB. Found by ezdevelop. Fixes #1091.
16123d3b0591SJens Wiklander   * Zeroize memory used for buffering or reassembling handshake messages
16133d3b0591SJens Wiklander     after use.
16143d3b0591SJens Wiklander   * Use `mbedtls_platform_zeroize()` instead of `memset()` for zeroization
16153d3b0591SJens Wiklander     of sensitive data in the example programs aescrypt2 and crypt_and_hash.
16163d3b0591SJens Wiklander   * Change the default string format used for various X.509 DN attributes to
16173d3b0591SJens Wiklander     UTF8String. Previously, the use of the PrintableString format led to
16183d3b0591SJens Wiklander     wildcards and non-ASCII characters being unusable in some DN attributes.
16193d3b0591SJens Wiklander     Reported by raprepo in #1860 and by kevinpt in #468. Fix contributed by
16203d3b0591SJens Wiklander     Thomas-Dee.
16213d3b0591SJens Wiklander   * Fix compilation failure for configurations which use compile time
16223d3b0591SJens Wiklander     replacements of standard calloc/free functions through the macros
16233d3b0591SJens Wiklander     MBEDTLS_PLATFORM_CALLOC_MACRO and MBEDTLS_PLATFORM_FREE_MACRO.
16243d3b0591SJens Wiklander     Reported by ole-de and ddhome2006. Fixes #882, #1642 and #1706.
16253d3b0591SJens Wiklander
16263d3b0591SJens WiklanderChanges
16273d3b0591SJens Wiklander   * Removed support for Yotta as a build tool.
16283d3b0591SJens Wiklander   * Add tests for session resumption in DTLS.
16293d3b0591SJens Wiklander   * Close a test gap in (D)TLS between the client side and the server side:
16303d3b0591SJens Wiklander     test the handling of large packets and small packets on the client side
16313d3b0591SJens Wiklander     in the same way as on the server side.
16323d3b0591SJens Wiklander   * Change the dtls_client and dtls_server samples to work by default over
16333d3b0591SJens Wiklander     IPv6 and optionally by a build option over IPv4.
16343d3b0591SJens Wiklander   * Change the use of Windows threading to use Microsoft Visual C++ runtime
16353d3b0591SJens Wiklander     calls, rather than Win32 API calls directly. This is necessary to avoid
16363d3b0591SJens Wiklander     conflict with C runtime usage. Found and fixed by irwir.
16373d3b0591SJens Wiklander   * Remember the string format of X.509 DN attributes when replicating
16383d3b0591SJens Wiklander     X.509 DNs. Previously, DN attributes were always written in their default
16393d3b0591SJens Wiklander     string format (mostly PrintableString), which could lead to CRTs being
16403d3b0591SJens Wiklander     created which used PrintableStrings in the issuer field even though the
16413d3b0591SJens Wiklander     signing CA used UTF8Strings in its subject field; while X.509 compliant,
16423d3b0591SJens Wiklander     such CRTs were rejected in some applications, e.g. some versions of
16433d3b0591SJens Wiklander     Firefox, curl and GnuTLS. Reported in #1033 by Moschn. Fix contributed by
16443d3b0591SJens Wiklander     Thomas-Dee.
16453d3b0591SJens Wiklander   * Improve documentation of mbedtls_ssl_get_verify_result().
16463d3b0591SJens Wiklander     Fixes #517 reported by github-monoculture.
16473d3b0591SJens Wiklander   * Add MBEDTLS_MPI_GEN_PRIME_FLAG_LOW_ERR flag to mbedtls_mpi_gen_prime() and
16483d3b0591SJens Wiklander     use it to reduce error probability in RSA key generation to levels mandated
16493d3b0591SJens Wiklander     by FIPS-186-4.
16503d3b0591SJens Wiklander
16513d3b0591SJens Wiklander= mbed TLS 2.13.1 branch released 2018-09-06
16523d3b0591SJens Wiklander
16533d3b0591SJens WiklanderAPI Changes
16543d3b0591SJens Wiklander   * Extend the platform module with an abstraction mbedtls_platform_gmtime_r()
16553d3b0591SJens Wiklander     whose implementation should behave as a thread-safe version of gmtime().
16563d3b0591SJens Wiklander     This allows users to configure such an implementation at compile time when
16573d3b0591SJens Wiklander     the target system cannot be deduced automatically, by setting the option
16583d3b0591SJens Wiklander     MBEDTLS_PLATFORM_GMTIME_R_ALT. At this stage Mbed TLS is only able to
16593d3b0591SJens Wiklander     automatically select implementations for Windows and POSIX C libraries.
16603d3b0591SJens Wiklander
16613d3b0591SJens WiklanderBugfix
16623d3b0591SJens Wiklander   * Fix build failures on platforms where only gmtime() is available but
16633d3b0591SJens Wiklander     neither gmtime_r() nor gmtime_s() are present. Fixes #1907.
16643d3b0591SJens Wiklander
16653d3b0591SJens Wiklander= mbed TLS 2.13.0 branch released 2018-08-31
16663d3b0591SJens Wiklander
16673d3b0591SJens WiklanderSecurity
16683d3b0591SJens Wiklander   * Fix an issue in the X.509 module which could lead to a buffer overread
16693d3b0591SJens Wiklander     during certificate extensions parsing. In case of receiving malformed
16703d3b0591SJens Wiklander     input (extensions length field equal to 0), an illegal read of one byte
16713d3b0591SJens Wiklander     beyond the input buffer is made. Found and analyzed by Nathan Crandall.
16723d3b0591SJens Wiklander
16733d3b0591SJens WiklanderFeatures
16743d3b0591SJens Wiklander   * Add support for fragmentation of outgoing DTLS handshake messages. This
16753d3b0591SJens Wiklander     is controlled by the maximum fragment length as set locally or negotiated
16763d3b0591SJens Wiklander     with the peer, as well as by a new per-connection MTU option, set using
16773d3b0591SJens Wiklander     mbedtls_ssl_set_mtu().
16783d3b0591SJens Wiklander   * Add support for auto-adjustment of MTU to a safe value during the
16793d3b0591SJens Wiklander     handshake when flights do not get through (RFC 6347, section 4.1.1.1,
16803d3b0591SJens Wiklander     last paragraph).
16813d3b0591SJens Wiklander   * Add support for packing multiple records within a single datagram,
16823d3b0591SJens Wiklander     enabled by default.
16833d3b0591SJens Wiklander   * Add support for buffering out-of-order handshake messages in DTLS.
16843d3b0591SJens Wiklander     The maximum amount of RAM used for this can be controlled by the
16853d3b0591SJens Wiklander     compile-time constant MBEDTLS_SSL_DTLS_MAX_BUFFERING defined
16863d3b0591SJens Wiklander     in mbedtls/config.h.
16873d3b0591SJens Wiklander
16883d3b0591SJens WiklanderAPI Changes
16893d3b0591SJens Wiklander   * Add function mbedtls_ssl_set_datagram_packing() to configure
16903d3b0591SJens Wiklander     the use of datagram packing (enabled by default).
16913d3b0591SJens Wiklander
16923d3b0591SJens WiklanderBugfix
16933d3b0591SJens Wiklander   * Fix a potential memory leak in mbedtls_ssl_setup() function. An allocation
16943d3b0591SJens Wiklander     failure in the function could lead to other buffers being leaked.
16953d3b0591SJens Wiklander   * Fixes an issue with MBEDTLS_CHACHAPOLY_C which would not compile if
16963d3b0591SJens Wiklander     MBEDTLS_ARC4_C and MBEDTLS_CIPHER_NULL_CIPHER weren't also defined. #1890
16973d3b0591SJens Wiklander   * Fix a memory leak in ecp_mul_comb() if ecp_precompute_comb() fails.
16983d3b0591SJens Wiklander     Fix contributed by Espressif Systems.
16993d3b0591SJens Wiklander   * Add ecc extensions only if an ecc based ciphersuite is used.
17003d3b0591SJens Wiklander     This improves compliance to RFC 4492, and as a result, solves
17013d3b0591SJens Wiklander     interoperability issues with BouncyCastle. Raised by milenamil in #1157.
17023d3b0591SJens Wiklander   * Replace printf with mbedtls_printf in the ARIA module. Found by
17033d3b0591SJens Wiklander     TrinityTonic in #1908.
17043d3b0591SJens Wiklander   * Fix potential use-after-free in mbedtls_ssl_get_max_frag_len()
17053d3b0591SJens Wiklander     and mbedtls_ssl_get_record_expansion() after a session reset. Fixes #1941.
17063d3b0591SJens Wiklander   * Fix a bug that caused SSL/TLS clients to incorrectly abort the handshake
17073d3b0591SJens Wiklander     with TLS versions 1.1 and earlier when the server requested authentication
17083d3b0591SJens Wiklander     without providing a list of CAs. This was due to an overly strict bounds
17093d3b0591SJens Wiklander     check in parsing the CertificateRequest message,
17103d3b0591SJens Wiklander     introduced in Mbed TLS 2.12.0. Fixes #1954.
17113d3b0591SJens Wiklander   * Fix a miscalculation of the maximum record expansion in
17123d3b0591SJens Wiklander     mbedtls_ssl_get_record_expansion() in case of ChachaPoly ciphersuites,
17133d3b0591SJens Wiklander     or CBC ciphersuites in (D)TLS versions 1.1 or higher. Fixes #1913, #1914.
17143d3b0591SJens Wiklander   * Fix undefined shifts with negative values in certificates parsing
17153d3b0591SJens Wiklander     (found by Catena cyber using oss-fuzz)
17163d3b0591SJens Wiklander   * Fix memory leak and free without initialization in pk_encrypt
17173d3b0591SJens Wiklander     and pk_decrypt example programs. Reported by Brace Stout. Fixes #1128.
17183d3b0591SJens Wiklander   * Remove redundant else statement. Raised by irwir. Fixes #1776.
17193d3b0591SJens Wiklander
17203d3b0591SJens WiklanderChanges
17213d3b0591SJens Wiklander   * Copy headers preserving timestamps when doing a "make install".
17223d3b0591SJens Wiklander     Contributed by xueruini.
17233d3b0591SJens Wiklander   * Allow the forward declaration of public structs. Contributed by Dawid
17243d3b0591SJens Wiklander     Drozd. Fixes #1215 raised by randombit.
17253d3b0591SJens Wiklander   * Improve compatibility with some alternative CCM implementations by using
17263d3b0591SJens Wiklander     CCM test vectors from RAM.
17273d3b0591SJens Wiklander   * Add support for buffering of out-of-order handshake messages.
17283d3b0591SJens Wiklander   * Add warnings to the documentation of the HKDF module to reduce the risk
17293d3b0591SJens Wiklander     of misusing the mbedtls_hkdf_extract() and mbedtls_hkdf_expand()
17303d3b0591SJens Wiklander     functions. Fixes #1775. Reported by Brian J. Murray.
17313d3b0591SJens Wiklander
17323d3b0591SJens Wiklander= mbed TLS 2.12.0 branch released 2018-07-25
17333d3b0591SJens Wiklander
17343d3b0591SJens WiklanderSecurity
17353d3b0591SJens Wiklander   * Fix a vulnerability in TLS ciphersuites based on CBC and using SHA-384,
17363d3b0591SJens Wiklander     in (D)TLS 1.0 to 1.2, that allowed an active network attacker to
17373d3b0591SJens Wiklander     partially recover the plaintext of messages under some conditions by
17383d3b0591SJens Wiklander     exploiting timing measurements. With DTLS, the attacker could perform
17393d3b0591SJens Wiklander     this recovery by sending many messages in the same connection. With TLS
17403d3b0591SJens Wiklander     or if mbedtls_ssl_conf_dtls_badmac_limit() was used, the attack only
17413d3b0591SJens Wiklander     worked if the same secret (for example a HTTP Cookie) has been repeatedly
17423d3b0591SJens Wiklander     sent over connections manipulated by the attacker. Connections using GCM
17433d3b0591SJens Wiklander     or CCM instead of CBC, using hash sizes other than SHA-384, or using
17443d3b0591SJens Wiklander     Encrypt-then-Mac (RFC 7366) were not affected. The vulnerability was
17453d3b0591SJens Wiklander     caused by a miscalculation (for SHA-384) in a countermeasure to the
17463d3b0591SJens Wiklander     original Lucky 13 attack. Found by Kenny Paterson, Eyal Ronen and Adi
17473d3b0591SJens Wiklander     Shamir.
17483d3b0591SJens Wiklander   * Fix a vulnerability in TLS ciphersuites based on CBC, in (D)TLS 1.0 to
17493d3b0591SJens Wiklander     1.2, that allowed a local attacker, able to execute code on the local
17503d3b0591SJens Wiklander     machine as well as manipulate network packets, to partially recover the
17513d3b0591SJens Wiklander     plaintext of messages under some conditions by using a cache attack
17525b25c76aSJerome Forissier     targeting an internal MD/SHA buffer. With TLS or if
17533d3b0591SJens Wiklander     mbedtls_ssl_conf_dtls_badmac_limit() was used, the attack only worked if
17543d3b0591SJens Wiklander     the same secret (for example a HTTP Cookie) has been repeatedly sent over
17553d3b0591SJens Wiklander     connections manipulated by the attacker. Connections using GCM or CCM
17563d3b0591SJens Wiklander     instead of CBC or using Encrypt-then-Mac (RFC 7366) were not affected.
17573d3b0591SJens Wiklander     Found by Kenny Paterson, Eyal Ronen and Adi Shamir.
17583d3b0591SJens Wiklander   * Add a counter-measure against a vulnerability in TLS ciphersuites based
17593d3b0591SJens Wiklander     on CBC, in (D)TLS 1.0 to 1.2, that allowed a local attacker, able to
17603d3b0591SJens Wiklander     execute code on the local machine as well as manipulate network packets,
17613d3b0591SJens Wiklander     to partially recover the plaintext of messages under some conditions (see
17623d3b0591SJens Wiklander     previous entry) by using a cache attack targeting the SSL input record
17633d3b0591SJens Wiklander     buffer. Connections using GCM or CCM instead of CBC or using
17643d3b0591SJens Wiklander     Encrypt-then-Mac (RFC 7366) were not affected. Found by Kenny Paterson,
17653d3b0591SJens Wiklander     Eyal Ronen and Adi Shamir.
17663d3b0591SJens Wiklander
17673d3b0591SJens WiklanderFeatures
17683d3b0591SJens Wiklander   * Add new crypto primitives from RFC 7539: stream cipher Chacha20, one-time
17693d3b0591SJens Wiklander     authenticator Poly1305 and AEAD construct Chacha20-Poly1305. Contributed
17703d3b0591SJens Wiklander     by Daniel King.
17713d3b0591SJens Wiklander   * Add support for CHACHA20-POLY1305 ciphersuites from RFC 7905.
17723d3b0591SJens Wiklander   * Add platform support for the Haiku OS. (https://www.haiku-os.org).
17733d3b0591SJens Wiklander     Contributed by Augustin Cavalier.
17743d3b0591SJens Wiklander   * Make the receive and transmit buffers independent sizes, for situations
17753d3b0591SJens Wiklander     where the outgoing buffer can be fixed at a smaller size than the incoming
17763d3b0591SJens Wiklander     buffer, which can save some RAM. If buffer lengths are kept equal, there
17773d3b0591SJens Wiklander     is no functional difference. Contributed by Angus Gratton, and also
17783d3b0591SJens Wiklander     independently contributed again by Paul Sokolovsky.
17793d3b0591SJens Wiklander   * Add support for key wrapping modes based on AES as defined by
17803d3b0591SJens Wiklander     NIST SP 800-38F algorithms KW and KWP and by RFC 3394 and RFC 5649.
17813d3b0591SJens Wiklander
17823d3b0591SJens WiklanderBugfix
17833d3b0591SJens Wiklander   * Fix the key_app_writer example which was writing a leading zero byte which
17843d3b0591SJens Wiklander     was creating an invalid ASN.1 tag. Found by Aryeh R. Fixes #1257.
17853d3b0591SJens Wiklander   * Fix compilation error on C++, because of a variable named new.
17863d3b0591SJens Wiklander     Found and fixed by Hirotaka Niisato in #1783.
17873d3b0591SJens Wiklander   * Fix "no symbols" warning issued by ranlib when building on Mac OS X. Fix
17883d3b0591SJens Wiklander     contributed by tabascoeye.
17893d3b0591SJens Wiklander   * Clarify documentation for mbedtls_ssl_write() to include 0 as a valid
17903d3b0591SJens Wiklander     return value. Found by @davidwu2000. #839
17913d3b0591SJens Wiklander   * Fix a memory leak in mbedtls_x509_csr_parse(), found by catenacyber,
17923d3b0591SJens Wiklander     Philippe Antoine. Fixes #1623.
17933d3b0591SJens Wiklander   * Remove unused headers included in x509.c. Found by Chris Hanson and fixed
17943d3b0591SJens Wiklander     by Brendan Shanks. Part of a fix for #992.
17953d3b0591SJens Wiklander   * Fix compilation error when MBEDTLS_ARC4_C is disabled and
17963d3b0591SJens Wiklander     MBEDTLS_CIPHER_NULL_CIPHER is enabled. Found by TrinityTonic in #1719.
17973d3b0591SJens Wiklander   * Added length checks to some TLS parsing functions. Found and fixed by
17983d3b0591SJens Wiklander     Philippe Antoine from Catena cyber. #1663.
17993d3b0591SJens Wiklander   * Fix the inline assembly for the MPI multiply helper function for i386 and
18003d3b0591SJens Wiklander     i386 with SSE2. Found by László Langó. Fixes #1550
18013d3b0591SJens Wiklander   * Fix namespacing in header files. Remove the `mbedtls` namespacing in
18023d3b0591SJens Wiklander     the `#include` in the header files. Resolves #857
18033d3b0591SJens Wiklander   * Fix compiler warning of 'use before initialisation' in
18043d3b0591SJens Wiklander     mbedtls_pk_parse_key(). Found by Martin Boye Petersen and fixed by Dawid
18053d3b0591SJens Wiklander     Drozd. #1098
18063d3b0591SJens Wiklander   * Fix decryption for zero length messages (which contain all padding) when a
18073d3b0591SJens Wiklander     CBC based ciphersuite is used together with Encrypt-then-MAC. Previously,
18083d3b0591SJens Wiklander     such a message was wrongly reported as an invalid record and therefore lead
18093d3b0591SJens Wiklander     to the connection being terminated. Seen most often with OpenSSL using
18103d3b0591SJens Wiklander     TLS 1.0. Reported by @kFYatek and by Conor Murphy on the forum. Fix
18113d3b0591SJens Wiklander     contributed by Espressif Systems. Fixes #1632
18123d3b0591SJens Wiklander   * Fix ssl_client2 example to send application data with 0-length content
18133d3b0591SJens Wiklander     when the request_size argument is set to 0 as stated in the documentation.
18143d3b0591SJens Wiklander     Fixes #1833.
18153d3b0591SJens Wiklander   * Correct the documentation for `mbedtls_ssl_get_session()`. This API has
18163d3b0591SJens Wiklander     deep copy of the session, and the peer certificate is not lost. Fixes #926.
18173d3b0591SJens Wiklander   * Fix build using -std=c99. Fixed by Nick Wilson.
18183d3b0591SJens Wiklander
18193d3b0591SJens WiklanderChanges
18203d3b0591SJens Wiklander   * Fail when receiving a TLS alert message with an invalid length, or invalid
18213d3b0591SJens Wiklander     zero-length messages when using TLS 1.2. Contributed by Espressif Systems.
18223d3b0591SJens Wiklander   * Change the default behaviour of mbedtls_hkdf_extract() to return an error
18233d3b0591SJens Wiklander     when calling with a NULL salt and non-zero salt_len. Contributed by
18243d3b0591SJens Wiklander     Brian J Murray
18253d3b0591SJens Wiklander   * Change the shebang line in Perl scripts to look up perl in the PATH.
18263d3b0591SJens Wiklander     Contributed by fbrosson.
18273d3b0591SJens Wiklander   * Allow overriding the time on Windows via the platform-time abstraction.
18283d3b0591SJens Wiklander     Fixed by Nick Wilson.
18293d3b0591SJens Wiklander   * Use gmtime_r/gmtime_s for thread-safety. Fixed by Nick Wilson.
18303d3b0591SJens Wiklander
18313d3b0591SJens Wiklander= mbed TLS 2.11.0 branch released 2018-06-18
18323d3b0591SJens Wiklander
18333d3b0591SJens WiklanderFeatures
18343d3b0591SJens Wiklander   * Add additional block mode, OFB (Output Feedback), to the AES module and
18353d3b0591SJens Wiklander     cipher abstraction module.
18363d3b0591SJens Wiklander   * Implement the HMAC-based extract-and-expand key derivation function
18373d3b0591SJens Wiklander     (HKDF) per RFC 5869. Contributed by Thomas Fossati.
18383d3b0591SJens Wiklander   * Add support for the CCM* block cipher mode as defined in IEEE Std. 802.15.4.
18393d3b0591SJens Wiklander   * Add support for the XTS block cipher mode with AES (AES-XTS).
18403d3b0591SJens Wiklander     Contributed by Aorimn in pull request #414.
18413d3b0591SJens Wiklander   * In TLS servers, support offloading private key operations to an external
18423d3b0591SJens Wiklander     cryptoprocessor. Private key operations can be asynchronous to allow
18433d3b0591SJens Wiklander     non-blocking operation of the TLS server stack.
18443d3b0591SJens Wiklander
18453d3b0591SJens WiklanderBugfix
18463d3b0591SJens Wiklander   * Fix the cert_write example to handle certificates signed with elliptic
18473d3b0591SJens Wiklander     curves as well as RSA. Fixes #777 found by dbedev.
18483d3b0591SJens Wiklander   * Fix for redefinition of _WIN32_WINNT to avoid overriding a definition
18493d3b0591SJens Wiklander     used by user applications. Found and fixed by Fabio Alessandrelli.
18503d3b0591SJens Wiklander   * Fix compilation warnings with IAR toolchain, on 32 bit platform.
18513d3b0591SJens Wiklander     Reported by rahmanih in #683
18523d3b0591SJens Wiklander   * Fix braces in mbedtls_memory_buffer_alloc_status(). Found by sbranden, #552.
18533d3b0591SJens Wiklander
18543d3b0591SJens WiklanderChanges
18553d3b0591SJens Wiklander   * Changed CMake defaults for IAR to treat all compiler warnings as errors.
18563d3b0591SJens Wiklander   * Changed the Clang parameters used in the CMake build files to work for
18573d3b0591SJens Wiklander     versions later than 3.6. Versions of Clang earlier than this may no longer
18583d3b0591SJens Wiklander     work. Fixes #1072
18593d3b0591SJens Wiklander
18603d3b0591SJens Wiklander= mbed TLS 2.10.0 branch released 2018-06-06
18613d3b0591SJens Wiklander
18623d3b0591SJens WiklanderFeatures
18633d3b0591SJens Wiklander   * Add support for ARIA cipher (RFC 5794) and associated TLS ciphersuites
18643d3b0591SJens Wiklander     (RFC 6209). Disabled by default, see MBEDTLS_ARIA_C in config.h
18653d3b0591SJens Wiklander
18663d3b0591SJens WiklanderAPI Changes
18673d3b0591SJens Wiklander   * Extend the platform module with a util component that contains
18683d3b0591SJens Wiklander     functionality shared by multiple Mbed TLS modules. At this stage
18693d3b0591SJens Wiklander     platform_util.h (and its associated platform_util.c) only contain
18703d3b0591SJens Wiklander     mbedtls_platform_zeroize(), which is a critical function from a security
18713d3b0591SJens Wiklander     point of view. mbedtls_platform_zeroize() needs to be regularly tested
18723d3b0591SJens Wiklander     against compilers to ensure that calls to it are not removed from the
18733d3b0591SJens Wiklander     output binary as part of redundant code elimination optimizations.
18743d3b0591SJens Wiklander     Therefore, mbedtls_platform_zeroize() is moved to the platform module to
18753d3b0591SJens Wiklander     facilitate testing and maintenance.
18763d3b0591SJens Wiklander
18773d3b0591SJens WiklanderBugfix
18783d3b0591SJens Wiklander   * Fix an issue with MicroBlaze support in bn_mul.h which was causing the
18793d3b0591SJens Wiklander     build to fail. Found by zv-io. Fixes #1651.
18803d3b0591SJens Wiklander
18813d3b0591SJens WiklanderChanges
18823d3b0591SJens Wiklander   * Support TLS testing in out-of-source builds using cmake. Fixes #1193.
18833d3b0591SJens Wiklander   * Fix redundant declaration of mbedtls_ssl_list_ciphersuites. Raised by
18843d3b0591SJens Wiklander     TrinityTonic. #1359.
18853d3b0591SJens Wiklander
18863d3b0591SJens Wiklander= mbed TLS 2.9.0 branch released 2018-04-30
18873d3b0591SJens Wiklander
18883d3b0591SJens WiklanderSecurity
18893d3b0591SJens Wiklander   * Fix an issue in the X.509 module which could lead to a buffer overread
18903d3b0591SJens Wiklander     during certificate validation. Additionally, the issue could also lead to
18913d3b0591SJens Wiklander     unnecessary callback checks being made or to some validation checks to be
18923d3b0591SJens Wiklander     omitted. The overread could be triggered remotely, while the other issues
18933d3b0591SJens Wiklander     would require a non DER-compliant certificate to be correctly signed by a
18943d3b0591SJens Wiklander     trusted CA, or a trusted CA with a non DER-compliant certificate. Found by
18953d3b0591SJens Wiklander     luocm. Fixes #825.
18963d3b0591SJens Wiklander   * Fix the buffer length assertion in the ssl_parse_certificate_request()
18973d3b0591SJens Wiklander     function which led to an arbitrary overread of the message buffer. The
18983d3b0591SJens Wiklander     overreads could be caused by receiving a malformed message at the point
18993d3b0591SJens Wiklander     where an optional signature algorithms list is expected when the signature
19003d3b0591SJens Wiklander     algorithms section is too short. In builds with debug output, the overread
19013d3b0591SJens Wiklander     data is output with the debug data.
19023d3b0591SJens Wiklander   * Fix a client-side bug in the validation of the server's ciphersuite choice
19033d3b0591SJens Wiklander     which could potentially lead to the client accepting a ciphersuite it didn't
19043d3b0591SJens Wiklander     offer or a ciphersuite that cannot be used with the TLS or DTLS version
19053d3b0591SJens Wiklander     chosen by the server. This could lead to corruption of internal data
19063d3b0591SJens Wiklander     structures for some configurations.
19073d3b0591SJens Wiklander
19083d3b0591SJens WiklanderFeatures
19093d3b0591SJens Wiklander   * Add an option, MBEDTLS_AES_FEWER_TABLES, to dynamically compute smaller AES
19103d3b0591SJens Wiklander     tables during runtime, thereby reducing the RAM/ROM footprint by ~6KiB.
19113d3b0591SJens Wiklander     Suggested and contributed by jkivilin in pull request #394.
19123d3b0591SJens Wiklander   * Add initial support for Curve448 (RFC 7748). Only mbedtls_ecp_mul() and
19133d3b0591SJens Wiklander     ECDH primitive functions (mbedtls_ecdh_gen_public(),
19143d3b0591SJens Wiklander     mbedtls_ecdh_compute_shared()) are supported for now. Contributed by
19153d3b0591SJens Wiklander     Nicholas Wilson in pull request #348.
19163d3b0591SJens Wiklander
19173d3b0591SJens WiklanderAPI Changes
19183d3b0591SJens Wiklander   * Extend the public API with the function of mbedtls_net_poll() to allow user
19193d3b0591SJens Wiklander     applications to wait for a network context to become ready before reading
19203d3b0591SJens Wiklander     or writing.
19213d3b0591SJens Wiklander   * Add function mbedtls_ssl_check_pending() to the public API to allow
19223d3b0591SJens Wiklander     a check for whether more more data is pending to be processed in the
19233d3b0591SJens Wiklander     internal message buffers.
19243d3b0591SJens Wiklander     This function is necessary to determine when it is safe to idle on the
19253d3b0591SJens Wiklander     underlying transport in case event-driven IO is used.
19263d3b0591SJens Wiklander
19273d3b0591SJens WiklanderBugfix
19283d3b0591SJens Wiklander   * Fix a spurious uninitialized variable warning in cmac.c. Fix independently
19293d3b0591SJens Wiklander     contributed by Brian J Murray and David Brown.
19303d3b0591SJens Wiklander   * Add missing dependencies in test suites that led to build failures
19313d3b0591SJens Wiklander     in configurations that omit certain hashes or public-key algorithms.
19323d3b0591SJens Wiklander     Fixes #1040.
19333d3b0591SJens Wiklander   * Fix C89 incompatibility in benchmark.c. Contributed by Brendan Shanks.
19343d3b0591SJens Wiklander     #1353
19353d3b0591SJens Wiklander   * Add missing dependencies for MBEDTLS_HAVE_TIME_DATE and
19363d3b0591SJens Wiklander     MBEDTLS_VERSION_FEATURES in some test suites. Contributed by
19373d3b0591SJens Wiklander     Deomid Ryabkov. Fixes #1299, #1475.
19383d3b0591SJens Wiklander   * Fix the Makefile build process for building shared libraries on Mac OS X.
19393d3b0591SJens Wiklander     Fixed by mnacamura.
19403d3b0591SJens Wiklander   * Fix parsing of PKCS#8 encoded Elliptic Curve keys. Previously Mbed TLS was
19413d3b0591SJens Wiklander     unable to parse keys which had only the optional parameters field of the
19423d3b0591SJens Wiklander     ECPrivateKey structure. Found by Jethro Beekman, fixed in #1379.
19433d3b0591SJens Wiklander   * Return the plaintext data more quickly on unpadded CBC decryption, as
19443d3b0591SJens Wiklander     stated in the mbedtls_cipher_update() documentation. Contributed by
19453d3b0591SJens Wiklander     Andy Leiserson.
19463d3b0591SJens Wiklander   * Fix overriding and ignoring return values when parsing and writing to
19473d3b0591SJens Wiklander     a file in pk_sign program. Found by kevlut in #1142.
19483d3b0591SJens Wiklander   * Restrict usage of error code MBEDTLS_ERR_SSL_WANT_READ to situations
19493d3b0591SJens Wiklander     where data needs to be fetched from the underlying transport in order
19503d3b0591SJens Wiklander     to make progress. Previously, this error code was also occasionally
19513d3b0591SJens Wiklander     returned when unexpected messages were being discarded, ignoring that
19523d3b0591SJens Wiklander     further messages could potentially already be pending to be processed
19533d3b0591SJens Wiklander     in the internal buffers; these cases led to deadlocks when event-driven
19543d3b0591SJens Wiklander     I/O was used. Found and reported by Hubert Mis in #772.
19553d3b0591SJens Wiklander   * Fix buffer length assertions in the ssl_parse_certificate_request()
19563d3b0591SJens Wiklander     function which leads to a potential one byte overread of the message
19573d3b0591SJens Wiklander     buffer.
19583d3b0591SJens Wiklander   * Fix invalid buffer sizes passed to zlib during record compression and
19593d3b0591SJens Wiklander     decompression.
19603d3b0591SJens Wiklander   * Fix the soversion of libmbedcrypto to match the soversion of the
19613d3b0591SJens Wiklander     maintained 2.7 branch. The soversion was increased in Mbed TLS
19623d3b0591SJens Wiklander     version 2.7.1 to reflect breaking changes in that release, but the
19633d3b0591SJens Wiklander     increment was missed in 2.8.0 and later releases outside of the 2.7 branch.
19643d3b0591SJens Wiklander
19653d3b0591SJens WiklanderChanges
19663d3b0591SJens Wiklander   * Remove some redundant code in bignum.c. Contributed by Alexey Skalozub.
19673d3b0591SJens Wiklander   * Support cmake builds where Mbed TLS is a subproject. Fix contributed
19683d3b0591SJens Wiklander     independently by Matthieu Volat and Arne Schwabe.
19693d3b0591SJens Wiklander   * Improve testing in configurations that omit certain hashes or
19703d3b0591SJens Wiklander     public-key algorithms. Includes contributions by Gert van Dijk.
19713d3b0591SJens Wiklander   * Improve negative testing of X.509 parsing.
19723d3b0591SJens Wiklander   * Do not define global mutexes around readdir() and gmtime() in
19733d3b0591SJens Wiklander     configurations where the feature is disabled. Found and fixed by Gergely
19743d3b0591SJens Wiklander     Budai.
19753d3b0591SJens Wiklander   * Harden the function mbedtls_ssl_config_free() against misuse, so that it
19763d3b0591SJens Wiklander     doesn't leak memory if the user doesn't use mbedtls_ssl_conf_psk() and
19773d3b0591SJens Wiklander     instead incorrectly manipulates the configuration structure directly.
19783d3b0591SJens Wiklander     Found and fix submitted by junyeonLEE in #1220.
19793d3b0591SJens Wiklander   * Provide an empty implementation of mbedtls_pkcs5_pbes2() when
19803d3b0591SJens Wiklander     MBEDTLS_ASN1_PARSE_C is not enabled. This allows the use of PBKDF2
19813d3b0591SJens Wiklander     without PBES2. Fixed by Marcos Del Sol Vives.
19823d3b0591SJens Wiklander   * Add the order of the base point as N in the mbedtls_ecp_group structure
19833d3b0591SJens Wiklander     for Curve25519 (other curves had it already). Contributed by Nicholas
19843d3b0591SJens Wiklander     Wilson #481
19853d3b0591SJens Wiklander   * Improve the documentation of mbedtls_net_accept(). Contributed by Ivan
19863d3b0591SJens Wiklander     Krylov.
19873d3b0591SJens Wiklander   * Improve the documentation of mbedtls_ssl_write(). Suggested by
19883d3b0591SJens Wiklander     Paul Sokolovsky in #1356.
19893d3b0591SJens Wiklander   * Add an option in the Makefile to support ar utilities where the operation
19903d3b0591SJens Wiklander     letter must not be prefixed by '-', such as LLVM. Found and fixed by
19913d3b0591SJens Wiklander     Alex Hixon.
19923d3b0591SJens Wiklander   * Allow configuring the shared library extension by setting the DLEXT
19933d3b0591SJens Wiklander     environment variable when using the project makefiles.
19943d3b0591SJens Wiklander   * Optimize unnecessary zeroing in mbedtls_mpi_copy. Based on a contribution
19953d3b0591SJens Wiklander     by Alexey Skalozub in #405.
19963d3b0591SJens Wiklander   * In the SSL module, when f_send, f_recv or f_recv_timeout report
19973d3b0591SJens Wiklander     transmitting more than the required length, return an error. Raised by
19983d3b0591SJens Wiklander     Sam O'Connor in #1245.
19993d3b0591SJens Wiklander   * Improve robustness of mbedtls_ssl_derive_keys against the use of
20003d3b0591SJens Wiklander     HMAC functions with non-HMAC ciphersuites. Independently contributed
20013d3b0591SJens Wiklander     by Jiayuan Chen in #1377. Fixes #1437.
20023d3b0591SJens Wiklander   * Improve security of RSA key generation by including criteria from
20033d3b0591SJens Wiklander     FIPS 186-4. Contributed by Jethro Beekman. #1380
20043d3b0591SJens Wiklander   * Declare functions in header files even when an alternative implementation
20053d3b0591SJens Wiklander     of the corresponding module is activated by defining the corresponding
20063d3b0591SJens Wiklander     MBEDTLS_XXX_ALT macro. This means that alternative implementations do
20073d3b0591SJens Wiklander     not need to copy the declarations, and ensures that they will have the
20083d3b0591SJens Wiklander     same API.
20093d3b0591SJens Wiklander   * Add platform setup and teardown calls in test suites.
20103d3b0591SJens Wiklander
20113d3b0591SJens Wiklander= mbed TLS 2.8.0 branch released 2018-03-16
20123d3b0591SJens Wiklander
20133d3b0591SJens WiklanderDefault behavior changes
20143d3b0591SJens Wiklander   * The truncated HMAC extension now conforms to RFC 6066. This means
20153d3b0591SJens Wiklander     that when both sides of a TLS connection negotiate the truncated
20163d3b0591SJens Wiklander     HMAC extension, Mbed TLS can now interoperate with other
20173d3b0591SJens Wiklander     compliant implementations, but this breaks interoperability with
20183d3b0591SJens Wiklander     prior versions of Mbed TLS. To restore the old behavior, enable
20193d3b0591SJens Wiklander     the (deprecated) option MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT in
20203d3b0591SJens Wiklander     config.h. Found by Andreas Walz (ivESK, Offenburg University of
20213d3b0591SJens Wiklander     Applied Sciences).
20223d3b0591SJens Wiklander
20233d3b0591SJens WiklanderSecurity
20243d3b0591SJens Wiklander   * Fix implementation of the truncated HMAC extension. The previous
20253d3b0591SJens Wiklander     implementation allowed an offline 2^80 brute force attack on the
20263d3b0591SJens Wiklander     HMAC key of a single, uninterrupted connection (with no
20273d3b0591SJens Wiklander     resumption of the session).
20283d3b0591SJens Wiklander   * Verify results of RSA private key operations to defend
20293d3b0591SJens Wiklander     against Bellcore glitch attack.
20303d3b0591SJens Wiklander   * Fix a buffer overread in ssl_parse_server_key_exchange() that could cause
20313d3b0591SJens Wiklander     a crash on invalid input.
20323d3b0591SJens Wiklander   * Fix a buffer overread in ssl_parse_server_psk_hint() that could cause a
20333d3b0591SJens Wiklander     crash on invalid input.
20343d3b0591SJens Wiklander   * Fix CRL parsing to reject CRLs containing unsupported critical
20353d3b0591SJens Wiklander     extensions. Found by Falko Strenzke and Evangelos Karatsiolis.
20363d3b0591SJens Wiklander
20373d3b0591SJens WiklanderFeatures
20383d3b0591SJens Wiklander   * Extend PKCS#8 interface by introducing support for the entire SHA
20393d3b0591SJens Wiklander     algorithms family when encrypting private keys using PKCS#5 v2.0.
20403d3b0591SJens Wiklander     This allows reading encrypted PEM files produced by software that
20413d3b0591SJens Wiklander     uses PBKDF2-SHA2, such as OpenSSL 1.1. Submitted by Antonio Quartulli,
20423d3b0591SJens Wiklander     OpenVPN Inc. Fixes #1339
20433d3b0591SJens Wiklander   * Add support for public keys encoded in PKCS#1 format. #1122
20443d3b0591SJens Wiklander
20453d3b0591SJens WiklanderNew deprecations
20463d3b0591SJens Wiklander   * Deprecate support for record compression (configuration option
20473d3b0591SJens Wiklander     MBEDTLS_ZLIB_SUPPORT).
20483d3b0591SJens Wiklander
20493d3b0591SJens WiklanderBugfix
20503d3b0591SJens Wiklander   * Fix the name of a DHE parameter that was accidentally changed in 2.7.0.
20513d3b0591SJens Wiklander     Fixes #1358.
20523d3b0591SJens Wiklander   * Fix test_suite_pk to work on 64-bit ILP32 systems. #849
20533d3b0591SJens Wiklander   * Fix mbedtls_x509_crt_profile_suiteb, which used to reject all certificates
20543d3b0591SJens Wiklander     with flag MBEDTLS_X509_BADCERT_BAD_PK even when the key type was correct.
20553d3b0591SJens Wiklander     In the context of SSL, this resulted in handshake failure. Reported by
20563d3b0591SJens Wiklander     daniel in the Mbed TLS forum. #1351
20573d3b0591SJens Wiklander   * Fix Windows x64 builds with the included mbedTLS.sln file. #1347
20583d3b0591SJens Wiklander   * Fix setting version TLSv1 as minimal version, even if TLS 1
20593d3b0591SJens Wiklander     is not enabled. Set MBEDTLS_SSL_MIN_MAJOR_VERSION
20603d3b0591SJens Wiklander     and MBEDTLS_SSL_MIN_MINOR_VERSION instead of
20613d3b0591SJens Wiklander     MBEDTLS_SSL_MAJOR_VERSION_3 and MBEDTLS_SSL_MINOR_VERSION_1. #664
20623d3b0591SJens Wiklander   * Fix compilation error on Mingw32 when _TRUNCATE is defined. Use _TRUNCATE
20633d3b0591SJens Wiklander     only if __MINGW32__ not defined. Fix suggested by Thomas Glanzmann and
20643d3b0591SJens Wiklander     Nick Wilson on issue #355
20653d3b0591SJens Wiklander   * In test_suite_pk, pass valid parameters when testing for hash length
20663d3b0591SJens Wiklander     overflow. #1179
20673d3b0591SJens Wiklander   * Fix memory allocation corner cases in memory_buffer_alloc.c module. Found
20683d3b0591SJens Wiklander     by Guido Vranken. #639
20693d3b0591SJens Wiklander   * Log correct number of ciphersuites used in Client Hello message. #918
20703d3b0591SJens Wiklander   * Fix X509 CRT parsing that would potentially accept an invalid tag when
20713d3b0591SJens Wiklander     parsing the subject alternative names.
20723d3b0591SJens Wiklander   * Fix a possible arithmetic overflow in ssl_parse_server_key_exchange()
20733d3b0591SJens Wiklander     that could cause a key exchange to fail on valid data.
20743d3b0591SJens Wiklander   * Fix a possible arithmetic overflow in ssl_parse_server_psk_hint() that
20753d3b0591SJens Wiklander     could cause a key exchange to fail on valid data.
20763d3b0591SJens Wiklander   * Don't define mbedtls_aes_decrypt and mbedtls_aes_encrypt under
20773d3b0591SJens Wiklander     MBEDTLS_DEPRECATED_REMOVED. #1388
20783d3b0591SJens Wiklander   * Fix a 1-byte heap buffer overflow (read-only) during private key parsing.
20793d3b0591SJens Wiklander     Found through fuzz testing.
20803d3b0591SJens Wiklander
20813d3b0591SJens WiklanderChanges
20823d3b0591SJens Wiklander   * Fix tag lengths and value ranges in the documentation of CCM encryption.
20833d3b0591SJens Wiklander     Contributed by Mathieu Briand.
20843d3b0591SJens Wiklander   * Fix typo in a comment ctr_drbg.c. Contributed by Paul Sokolovsky.
20853d3b0591SJens Wiklander   * Remove support for the library reference configuration for picocoin.
20863d3b0591SJens Wiklander   * MD functions deprecated in 2.7.0 are no longer inline, to provide
20873d3b0591SJens Wiklander     a migration path for those depending on the library's ABI.
20883d3b0591SJens Wiklander   * Clarify the documentation of mbedtls_ssl_setup.
20893d3b0591SJens Wiklander   * Use (void) when defining functions with no parameters. Contributed by
20903d3b0591SJens Wiklander     Joris Aerts. #678
20913d3b0591SJens Wiklander
20923d3b0591SJens Wiklander= mbed TLS 2.7.0 branch released 2018-02-03
20933d3b0591SJens Wiklander
20943d3b0591SJens WiklanderSecurity
20953d3b0591SJens Wiklander   * Fix a heap corruption issue in the implementation of the truncated HMAC
20963d3b0591SJens Wiklander     extension. When the truncated HMAC extension is enabled and CBC is used,
20973d3b0591SJens Wiklander     sending a malicious application packet could be used to selectively corrupt
20983d3b0591SJens Wiklander     6 bytes on the peer's heap, which could potentially lead to crash or remote
20993d3b0591SJens Wiklander     code execution. The issue could be triggered remotely from either side in
21003d3b0591SJens Wiklander     both TLS and DTLS. CVE-2018-0488
21013d3b0591SJens Wiklander   * Fix a buffer overflow in RSA-PSS verification when the hash was too large
21023d3b0591SJens Wiklander     for the key size, which could potentially lead to crash or remote code
21033d3b0591SJens Wiklander     execution. Found by Seth Terashima, Qualcomm Product Security Initiative,
21043d3b0591SJens Wiklander     Qualcomm Technologies Inc. CVE-2018-0487
21053d3b0591SJens Wiklander   * Fix buffer overflow in RSA-PSS verification when the unmasked data is all
21063d3b0591SJens Wiklander     zeros.
21073d3b0591SJens Wiklander   * Fix an unsafe bounds check in ssl_parse_client_psk_identity() when adding
21083d3b0591SJens Wiklander     64 KiB to the address of the SSL buffer and causing a wrap around.
21093d3b0591SJens Wiklander   * Fix a potential heap buffer overflow in mbedtls_ssl_write(). When the (by
21103d3b0591SJens Wiklander     default enabled) maximum fragment length extension is disabled in the
21113d3b0591SJens Wiklander     config and the application data buffer passed to mbedtls_ssl_write
21123d3b0591SJens Wiklander     is larger than the internal message buffer (16384 bytes by default), the
21133d3b0591SJens Wiklander     latter overflows. The exploitability of this issue depends on whether the
21143d3b0591SJens Wiklander     application layer can be forced into sending such large packets. The issue
21153d3b0591SJens Wiklander     was independently reported by Tim Nordell via e-mail and by Florin Petriuc
21163d3b0591SJens Wiklander     and sjorsdewit on GitHub. Fix proposed by Florin Petriuc in #1022.
21173d3b0591SJens Wiklander     Fixes #707.
21183d3b0591SJens Wiklander   * Add a provision to prevent compiler optimizations breaking the time
21193d3b0591SJens Wiklander     constancy of mbedtls_ssl_safer_memcmp().
21203d3b0591SJens Wiklander   * Ensure that buffers are cleared after use if they contain sensitive data.
21213d3b0591SJens Wiklander     Changes were introduced in multiple places in the library.
21223d3b0591SJens Wiklander   * Set PEM buffer to zero before freeing it, to avoid decoded private keys
21233d3b0591SJens Wiklander     being leaked to memory after release.
21243d3b0591SJens Wiklander   * Fix dhm_check_range() failing to detect trivial subgroups and potentially
21253d3b0591SJens Wiklander     leaking 1 bit of the private key. Reported by prashantkspatil.
21263d3b0591SJens Wiklander   * Make mbedtls_mpi_read_binary() constant-time with respect to the input
21273d3b0591SJens Wiklander     data. Previously, trailing zero bytes were detected and omitted for the
21283d3b0591SJens Wiklander     sake of saving memory, but potentially leading to slight timing
21293d3b0591SJens Wiklander     differences. Reported by Marco Macchetti, Kudelski Group.
21303d3b0591SJens Wiklander   * Wipe stack buffer temporarily holding EC private exponent
21313d3b0591SJens Wiklander     after keypair generation.
21323d3b0591SJens Wiklander   * Fix a potential heap buffer over-read in ALPN extension parsing
21333d3b0591SJens Wiklander     (server-side). Could result in application crash, but only if an ALPN
21343d3b0591SJens Wiklander     name larger than 16 bytes had been configured on the server.
21353d3b0591SJens Wiklander   * Change default choice of DHE parameters from untrustworthy RFC 5114
21363d3b0591SJens Wiklander     to RFC 3526 containing parameters generated in a nothing-up-my-sleeve
21373d3b0591SJens Wiklander     manner.
21383d3b0591SJens Wiklander
21393d3b0591SJens WiklanderFeatures
21403d3b0591SJens Wiklander   * Allow comments in test data files.
21413d3b0591SJens Wiklander   * The selftest program can execute a subset of the tests based on command
21423d3b0591SJens Wiklander     line arguments.
21433d3b0591SJens Wiklander   * New unit tests for timing. Improve the self-test to be more robust
21443d3b0591SJens Wiklander     when run on a heavily-loaded machine.
21453d3b0591SJens Wiklander   * Add alternative implementation support for CCM and CMAC (MBEDTLS_CCM_ALT,
21463d3b0591SJens Wiklander     MBEDTLS_CMAC_ALT). Submitted by Steven Cooreman, Silicon Labs.
21473d3b0591SJens Wiklander   * Add support for alternative implementations of GCM, selected by the
21483d3b0591SJens Wiklander     configuration flag MBEDTLS_GCM_ALT.
21493d3b0591SJens Wiklander   * Add support for alternative implementations for ECDSA, controlled by new
21503d3b0591SJens Wiklander     configuration flags MBEDTLS_ECDSA_SIGN_ALT, MBEDTLS_ECDSA_VERIFY_ALT and
21513d3b0591SJens Wiklander     MBEDTLS_ECDSDA_GENKEY_AT in config.h.
21523d3b0591SJens Wiklander     The following functions from the ECDSA module can be replaced
21533d3b0591SJens Wiklander     with alternative implementation:
21543d3b0591SJens Wiklander     mbedtls_ecdsa_sign(), mbedtls_ecdsa_verify() and mbedtls_ecdsa_genkey().
21553d3b0591SJens Wiklander   * Add support for alternative implementation of ECDH, controlled by the
21563d3b0591SJens Wiklander     new configuration flags MBEDTLS_ECDH_COMPUTE_SHARED_ALT and
21573d3b0591SJens Wiklander     MBEDTLS_ECDH_GEN_PUBLIC_ALT in config.h.
21583d3b0591SJens Wiklander     The following functions from the ECDH module can be replaced
21593d3b0591SJens Wiklander     with an alternative implementation:
21603d3b0591SJens Wiklander     mbedtls_ecdh_gen_public() and mbedtls_ecdh_compute_shared().
21613d3b0591SJens Wiklander   * Add support for alternative implementation of ECJPAKE, controlled by
21623d3b0591SJens Wiklander     the new configuration flag MBEDTLS_ECJPAKE_ALT.
21633d3b0591SJens Wiklander   * Add mechanism to provide alternative implementation of the DHM module.
21643d3b0591SJens Wiklander
21653d3b0591SJens WiklanderAPI Changes
21663d3b0591SJens Wiklander   * Extend RSA interface by multiple functions allowing structure-
21673d3b0591SJens Wiklander     independent setup and export of RSA contexts. Most notably,
21683d3b0591SJens Wiklander     mbedtls_rsa_import() and mbedtls_rsa_complete() are introduced for setting
21693d3b0591SJens Wiklander     up RSA contexts from partial key material and having them completed to the
21703d3b0591SJens Wiklander     needs of the implementation automatically. This allows to setup private RSA
21713d3b0591SJens Wiklander     contexts from keys consisting of N,D,E only, even if P,Q are needed for the
21723d3b0591SJens Wiklander     purpose or CRT and/or blinding.
21733d3b0591SJens Wiklander   * The configuration option MBEDTLS_RSA_ALT can be used to define alternative
21743d3b0591SJens Wiklander     implementations of the RSA interface declared in rsa.h.
21753d3b0591SJens Wiklander   * The following functions in the message digest modules (MD2, MD4, MD5,
21763d3b0591SJens Wiklander     SHA1, SHA256, SHA512) have been deprecated and replaced as shown below.
21773d3b0591SJens Wiklander     The new functions change the return type from void to int to allow
21783d3b0591SJens Wiklander     returning error codes when using MBEDTLS_<MODULE>_ALT.
21793d3b0591SJens Wiklander     mbedtls_<MODULE>_starts() -> mbedtls_<MODULE>_starts_ret()
21803d3b0591SJens Wiklander     mbedtls_<MODULE>_update() -> mbedtls_<MODULE>_update_ret()
21813d3b0591SJens Wiklander     mbedtls_<MODULE>_finish() -> mbedtls_<MODULE>_finish_ret()
21823d3b0591SJens Wiklander     mbedtls_<MODULE>_process() -> mbedtls_internal_<MODULE>_process()
21833d3b0591SJens Wiklander
21843d3b0591SJens WiklanderNew deprecations
21853d3b0591SJens Wiklander   * Deprecate usage of RSA primitives with non-matching key-type
21863d3b0591SJens Wiklander     (e.g. signing with a public key).
21873d3b0591SJens Wiklander   * Direct manipulation of structure fields of RSA contexts is deprecated.
21883d3b0591SJens Wiklander     Users are advised to use the extended RSA API instead.
21893d3b0591SJens Wiklander   * Deprecate usage of message digest functions that return void
21903d3b0591SJens Wiklander     (mbedtls_<MODULE>_starts, mbedtls_<MODULE>_update,
21913d3b0591SJens Wiklander     mbedtls_<MODULE>_finish and mbedtls_<MODULE>_process where <MODULE> is
21923d3b0591SJens Wiklander     any of MD2, MD4, MD5, SHA1, SHA256, SHA512) in favor of functions
21933d3b0591SJens Wiklander     that can return an error code.
21943d3b0591SJens Wiklander   * Deprecate untrustworthy DHE parameters from RFC 5114. Superseded by
21953d3b0591SJens Wiklander     parameters from RFC 3526 or the newly added parameters from RFC 7919.
21963d3b0591SJens Wiklander   * Deprecate hex string DHE constants MBEDTLS_DHM_RFC3526_MODP_2048_P etc.
21973d3b0591SJens Wiklander     Supserseded by binary encoded constants MBEDTLS_DHM_RFC3526_MODP_2048_P_BIN
21983d3b0591SJens Wiklander     etc.
21993d3b0591SJens Wiklander   * Deprecate mbedtls_ssl_conf_dh_param() for setting default DHE parameters
22003d3b0591SJens Wiklander     from hex strings. Superseded by mbedtls_ssl_conf_dh_param_bin()
22013d3b0591SJens Wiklander     accepting DHM parameters in binary form, matching the new constants.
22023d3b0591SJens Wiklander
22033d3b0591SJens WiklanderBugfix
22043d3b0591SJens Wiklander   * Fix ssl_parse_record_header() to silently discard invalid DTLS records
22053d3b0591SJens Wiklander     as recommended in RFC 6347 Section 4.1.2.7.
22063d3b0591SJens Wiklander   * Fix memory leak in mbedtls_ssl_set_hostname() when called multiple times.
22073d3b0591SJens Wiklander     Found by projectgus and Jethro Beekman, #836.
22083d3b0591SJens Wiklander   * Fix usage help in ssl_server2 example. Found and fixed by Bei Lin.
2209817466cbSJens Wiklander   * Parse signature algorithm extension when renegotiating. Previously,
2210817466cbSJens Wiklander     renegotiated handshakes would only accept signatures using SHA-1
2211817466cbSJens Wiklander     regardless of the peer's preferences, or fail if SHA-1 was disabled.
22123d3b0591SJens Wiklander   * Fix leap year calculation in x509_date_is_valid() to ensure that invalid
22133d3b0591SJens Wiklander     dates on leap years with 100 and 400 intervals are handled correctly. Found
22143d3b0591SJens Wiklander     by Nicholas Wilson. #694
22153d3b0591SJens Wiklander   * Fix some invalid RSA-PSS signatures with keys of size 8N+1 that were
22163d3b0591SJens Wiklander     accepted. Generating these signatures required the private key.
22173d3b0591SJens Wiklander   * Fix out-of-memory problem when parsing 4096-bit PKCS8-encrypted RSA keys.
22183d3b0591SJens Wiklander     Found independently by Florian in the mbed TLS forum and by Mishamax.
22193d3b0591SJens Wiklander     #878, #1019.
22203d3b0591SJens Wiklander   * Fix variable used before assignment compilation warnings with IAR
22213d3b0591SJens Wiklander     toolchain. Found by gkerrien38.
22223d3b0591SJens Wiklander   * Fix unchecked return codes from AES, DES and 3DES functions in
22233d3b0591SJens Wiklander     pem_aes_decrypt(), pem_des_decrypt() and pem_des3_decrypt() respectively.
22243d3b0591SJens Wiklander     If a call to one of the functions of the cryptographic primitive modules
22253d3b0591SJens Wiklander     failed, the error may not be noticed by the function
22263d3b0591SJens Wiklander     mbedtls_pem_read_buffer() causing it to return invalid values. Found by
22273d3b0591SJens Wiklander     Guido Vranken. #756
22283d3b0591SJens Wiklander   * Include configuration file in md.h, to fix compilation warnings.
22293d3b0591SJens Wiklander     Reported by aaronmdjones in #1001
22303d3b0591SJens Wiklander   * Correct extraction of signature-type from PK instance in X.509 CRT and CSR
22313d3b0591SJens Wiklander     writing routines that prevented these functions to work with alternative
22323d3b0591SJens Wiklander     RSA implementations. Raised by J.B. in the Mbed TLS forum. Fixes #1011.
22333d3b0591SJens Wiklander   * Don't print X.509 version tag for v1 CRT's, and omit extensions for
22343d3b0591SJens Wiklander     non-v3 CRT's.
22353d3b0591SJens Wiklander   * Fix bugs in RSA test suite under MBEDTLS_NO_PLATFORM_ENTROPY. #1023 #1024
22363d3b0591SJens Wiklander   * Fix net_would_block() to avoid modification by errno through fcntl() call.
22373d3b0591SJens Wiklander     Found by nkolban. Fixes #845.
22383d3b0591SJens Wiklander   * Fix handling of handshake messages in mbedtls_ssl_read() in case
22393d3b0591SJens Wiklander     MBEDTLS_SSL_RENEGOTIATION is disabled. Found by erja-gp.
22403d3b0591SJens Wiklander   * Add a check for invalid private parameters in mbedtls_ecdsa_sign().
22413d3b0591SJens Wiklander     Reported by Yolan Romailler.
22423d3b0591SJens Wiklander   * Fix word size check in in pk.c to not depend on MBEDTLS_HAVE_INT64.
22433d3b0591SJens Wiklander   * Fix incorrect unit in benchmark output. #850
22443d3b0591SJens Wiklander   * Add size-checks for record and handshake message content, securing
22453d3b0591SJens Wiklander     fragile yet non-exploitable code-paths.
22463d3b0591SJens Wiklander   * Fix crash when calling mbedtls_ssl_cache_free() twice. Found by
22473d3b0591SJens Wiklander     MilenkoMitrovic, #1104
22483d3b0591SJens Wiklander   * Fix mbedtls_timing_alarm(0) on Unix and MinGW.
22493d3b0591SJens Wiklander   * Fix use of uninitialized memory in mbedtls_timing_get_timer() when reset=1.
22503d3b0591SJens Wiklander   * Fix possible memory leaks in mbedtls_gcm_self_test().
22513d3b0591SJens Wiklander   * Added missing return code checks in mbedtls_aes_self_test().
22523d3b0591SJens Wiklander   * Fix issues in RSA key generation program programs/x509/rsa_genkey and the
22533d3b0591SJens Wiklander     RSA test suite where the failure of CTR DRBG initialization lead to
22543d3b0591SJens Wiklander     freeing an RSA context and several MPI's without proper initialization
22553d3b0591SJens Wiklander     beforehand.
22563d3b0591SJens Wiklander   * Fix error message in programs/pkey/gen_key.c. Found and fixed by Chris Xue.
22573d3b0591SJens Wiklander   * Fix programs/pkey/dh_server.c so that it actually works with dh_client.c.
22583d3b0591SJens Wiklander     Found and fixed by Martijn de Milliano.
22593d3b0591SJens Wiklander   * Fix an issue in the cipher decryption with the mode
22603d3b0591SJens Wiklander     MBEDTLS_PADDING_ONE_AND_ZEROS that sometimes accepted invalid padding.
22613d3b0591SJens Wiklander     Note, this padding mode is not used by the TLS protocol. Found and fixed by
22623d3b0591SJens Wiklander     Micha Kraus.
22633d3b0591SJens Wiklander   * Fix the entropy.c module to not call mbedtls_sha256_starts() or
22643d3b0591SJens Wiklander     mbedtls_sha512_starts() in the mbedtls_entropy_init() function.
22653d3b0591SJens Wiklander   * Fix the entropy.c module to ensure that mbedtls_sha256_init() or
22663d3b0591SJens Wiklander     mbedtls_sha512_init() is called before operating on the relevant context
22673d3b0591SJens Wiklander     structure. Do not assume that zeroizing a context is a correct way to
22683d3b0591SJens Wiklander     reset it. Found independently by ccli8 on Github.
22693d3b0591SJens Wiklander   * In mbedtls_entropy_free(), properly free the message digest context.
22703d3b0591SJens Wiklander   * Fix status handshake status message in programs/ssl/dtls_client.c. Found
22713d3b0591SJens Wiklander     and fixed by muddog.
22723d3b0591SJens Wiklander
22733d3b0591SJens WiklanderChanges
22743d3b0591SJens Wiklander   * Extend cert_write example program by options to set the certificate version
22753d3b0591SJens Wiklander     and the message digest. Further, allow enabling/disabling of authority
22763d3b0591SJens Wiklander     identifier, subject identifier and basic constraints extensions.
22773d3b0591SJens Wiklander   * Only check for necessary RSA structure fields in `mbedtls_rsa_private`. In
22783d3b0591SJens Wiklander     particular, don't require P,Q if neither CRT nor blinding are
22793d3b0591SJens Wiklander     used. Reported and fix proposed independently by satur9nine and sliai
22803d3b0591SJens Wiklander     on GitHub.
22813d3b0591SJens Wiklander   * Only run AES-192 self-test if AES-192 is available. Fixes #963.
22823d3b0591SJens Wiklander   * Tighten the RSA PKCS#1 v1.5 signature verification code and remove the
22833d3b0591SJens Wiklander     undeclared dependency of the RSA module on the ASN.1 module.
22843d3b0591SJens Wiklander   * Update all internal usage of deprecated message digest functions to the
22853d3b0591SJens Wiklander     new ones with return codes. In particular, this modifies the
22863d3b0591SJens Wiklander     mbedtls_md_info_t structure. Propagate errors from these functions
22873d3b0591SJens Wiklander     everywhere except some locations in the ssl_tls.c module.
22883d3b0591SJens Wiklander   * Improve CTR_DRBG error handling by propagating underlying AES errors.
22893d3b0591SJens Wiklander   * Add MBEDTLS_ERR_XXX_HW_ACCEL_FAILED error codes for all cryptography
22903d3b0591SJens Wiklander     modules where the software implementation can be replaced by a hardware
22913d3b0591SJens Wiklander     implementation.
22923d3b0591SJens Wiklander   * Add explicit warnings for the use of MD2, MD4, MD5, SHA-1, DES and ARC4
22933d3b0591SJens Wiklander     throughout the library.
2294817466cbSJens Wiklander
2295817466cbSJens Wiklander= mbed TLS 2.6.0 branch released 2017-08-10
2296817466cbSJens Wiklander
2297817466cbSJens WiklanderSecurity
2298817466cbSJens Wiklander   * Fix authentication bypass in SSL/TLS: when authmode is set to optional,
2299817466cbSJens Wiklander     mbedtls_ssl_get_verify_result() would incorrectly return 0 when the peer's
2300817466cbSJens Wiklander     X.509 certificate chain had more than MBEDTLS_X509_MAX_INTERMEDIATE_CA
2301817466cbSJens Wiklander     (default: 8) intermediates, even when it was not trusted. This could be
2302817466cbSJens Wiklander     triggered remotely from either side. (With authmode set to 'required'
2303817466cbSJens Wiklander     (the default), the handshake was correctly aborted).
2304817466cbSJens Wiklander   * Reliably wipe sensitive data after use in the AES example applications
2305817466cbSJens Wiklander     programs/aes/aescrypt2 and programs/aes/crypt_and_hash.
2306817466cbSJens Wiklander     Found by Laurent Simon.
2307817466cbSJens Wiklander
2308817466cbSJens WiklanderFeatures
2309817466cbSJens Wiklander   * Add the functions mbedtls_platform_setup() and mbedtls_platform_teardown()
2310817466cbSJens Wiklander     and the context struct mbedtls_platform_context to perform
2311817466cbSJens Wiklander     platform-specific setup and teardown operations. The macro
2312817466cbSJens Wiklander     MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT allows the functions to be overridden
2313817466cbSJens Wiklander     by the user in a platform_alt.h file. These new functions are required in
2314817466cbSJens Wiklander     some embedded environments to provide a means of initialising underlying
2315817466cbSJens Wiklander     cryptographic acceleration hardware.
2316817466cbSJens Wiklander
2317817466cbSJens WiklanderAPI Changes
2318817466cbSJens Wiklander   * Reverted API/ABI breaking changes introduced in mbed TLS 2.5.1, to make the
2319817466cbSJens Wiklander     API consistent with mbed TLS 2.5.0. Specifically removed the inline
2320817466cbSJens Wiklander     qualifier from the functions mbedtls_aes_decrypt, mbedtls_aes_encrypt,
2321817466cbSJens Wiklander     mbedtls_ssl_ciphersuite_uses_ec and mbedtls_ssl_ciphersuite_uses_psk. Found
2322817466cbSJens Wiklander     by James Cowgill. #978
2323817466cbSJens Wiklander   * Certificate verification functions now set flags to -1 in case the full
2324817466cbSJens Wiklander     chain was not verified due to an internal error (including in the verify
2325817466cbSJens Wiklander     callback) or chain length limitations.
2326817466cbSJens Wiklander   * With authmode set to optional, the TLS handshake is now aborted if the
2327817466cbSJens Wiklander     verification of the peer's certificate failed due to an overlong chain or
2328817466cbSJens Wiklander     a fatal error in the verify callback.
2329817466cbSJens Wiklander
2330817466cbSJens WiklanderBugfix
2331817466cbSJens Wiklander   * Add a check if iv_len is zero in GCM, and return an error if it is zero.
2332817466cbSJens Wiklander     Reported by roberto. #716
2333817466cbSJens Wiklander   * Replace preprocessor condition from #if defined(MBEDTLS_THREADING_PTHREAD)
2334817466cbSJens Wiklander     to #if defined(MBEDTLS_THREADING_C) as the library cannot assume they will
2335817466cbSJens Wiklander     always be implemented by pthread support. #696
2336817466cbSJens Wiklander   * Fix a resource leak on Windows platforms in mbedtls_x509_crt_parse_path(),
2337817466cbSJens Wiklander     in the case of an error. Found by redplait. #590
2338817466cbSJens Wiklander   * Add MBEDTLS_MPI_CHK to check for error value of mbedtls_mpi_fill_random.
2339817466cbSJens Wiklander     Reported and fix suggested by guidovranken. #740
2340817466cbSJens Wiklander   * Fix conditional preprocessor directives in bignum.h to enable 64-bit
2341817466cbSJens Wiklander     compilation when using ARM Compiler 6.
2342817466cbSJens Wiklander   * Fix a potential integer overflow in the version verification for DER
2343817466cbSJens Wiklander     encoded X.509 CRLs. The overflow could enable maliciously constructed CRLs
2344817466cbSJens Wiklander     to bypass the version verification check. Found by Peng Li/Yueh-Hsun Lin,
2345817466cbSJens Wiklander     KNOX Security, Samsung Research America
2346817466cbSJens Wiklander   * Fix potential integer overflow in the version verification for DER
2347817466cbSJens Wiklander     encoded X.509 CSRs. The overflow could enable maliciously constructed CSRs
2348817466cbSJens Wiklander     to bypass the version verification check. Found by Peng Li/Yueh-Hsun Lin,
2349817466cbSJens Wiklander     KNOX Security, Samsung Research America
2350817466cbSJens Wiklander   * Fix a potential integer overflow in the version verification for DER
2351817466cbSJens Wiklander     encoded X.509 certificates. The overflow could enable maliciously
2352817466cbSJens Wiklander     constructed certificates to bypass the certificate verification check.
2353817466cbSJens Wiklander   * Fix a call to the libc function time() to call the platform abstraction
2354817466cbSJens Wiklander     function mbedtls_time() instead. Found by wairua. #666
2355817466cbSJens Wiklander   * Avoid shadowing of time and index functions through mbed TLS function
2356817466cbSJens Wiklander     arguments. Found by inestlerode. #557.
2357817466cbSJens Wiklander
2358817466cbSJens WiklanderChanges
2359817466cbSJens Wiklander   * Added config.h option MBEDTLS_NO_UDBL_DIVISION, to prevent the use of
2360817466cbSJens Wiklander     64-bit division. This is useful on embedded platforms where 64-bit division
2361817466cbSJens Wiklander     created a dependency on external libraries. #708
2362817466cbSJens Wiklander   * Removed mutexes from ECP hardware accelerator code. Now all hardware
2363817466cbSJens Wiklander     accelerator code in the library leaves concurrency handling to the
2364817466cbSJens Wiklander     platform. Reported by Steven Cooreman. #863
2365817466cbSJens Wiklander   * Define the macro MBEDTLS_AES_ROM_TABLES in the configuration file
2366817466cbSJens Wiklander     config-no-entropy.h to reduce the RAM footprint.
2367817466cbSJens Wiklander   * Added a test script that can be hooked into git that verifies commits
2368817466cbSJens Wiklander     before they are pushed.
2369817466cbSJens Wiklander   * Improve documentation of PKCS1 decryption functions.
2370817466cbSJens Wiklander
2371817466cbSJens Wiklander= mbed TLS 2.5.1 released 2017-06-21
2372817466cbSJens Wiklander
2373817466cbSJens WiklanderSecurity
2374817466cbSJens Wiklander   * Fixed unlimited overread of heap-based buffer in mbedtls_ssl_read().
2375817466cbSJens Wiklander     The issue could only happen client-side with renegotiation enabled.
2376817466cbSJens Wiklander     Could result in DoS (application crash) or information leak
2377817466cbSJens Wiklander     (if the application layer sent data read from mbedtls_ssl_read()
2378817466cbSJens Wiklander     back to the server or to a third party). Can be triggered remotely.
2379817466cbSJens Wiklander   * Removed SHA-1 and RIPEMD-160 from the default hash algorithms for
2380817466cbSJens Wiklander     certificate verification. SHA-1 can be turned back on with a compile-time
2381817466cbSJens Wiklander     option if needed.
2382817466cbSJens Wiklander   * Fixed offset in FALLBACK_SCSV parsing that caused TLS server to fail to
2383817466cbSJens Wiklander     detect it sometimes. Reported by Hugo Leisink. #810
2384817466cbSJens Wiklander   * Tighten parsing of RSA PKCS#1 v1.5 signatures, to avoid a
2385817466cbSJens Wiklander     potential Bleichenbacher/BERserk-style attack.
2386817466cbSJens Wiklander
2387817466cbSJens WiklanderBugfix
2388817466cbSJens Wiklander   * Remove size zero arrays from ECJPAKE test suite. Size zero arrays are not
2389817466cbSJens Wiklander     valid C and they prevented the test from compiling in Visual Studio 2015
2390817466cbSJens Wiklander     and with GCC using the -Wpedantic compilation option.
2391817466cbSJens Wiklander   * Fix insufficient support for signature-hash-algorithm extension,
2392817466cbSJens Wiklander     resulting in compatibility problems with Chrome. Found by hfloyrd. #823
2393817466cbSJens Wiklander   * Fix behaviour that hid the original cause of fatal alerts in some cases
2394817466cbSJens Wiklander     when sending the alert failed. The fix makes sure not to hide the error
2395817466cbSJens Wiklander     that triggered the alert.
2396817466cbSJens Wiklander   * Fix SSLv3 renegotiation behaviour and stop processing data received from
2397817466cbSJens Wiklander     peer after sending a fatal alert to refuse a renegotiation attempt.
2398817466cbSJens Wiklander     Previous behaviour was to keep processing data even after the alert has
2399817466cbSJens Wiklander     been sent.
2400817466cbSJens Wiklander   * Accept empty trusted CA chain in authentication mode
24013d3b0591SJens Wiklander     MBEDTLS_SSL_VERIFY_OPTIONAL. Found by Jethro Beekman. #864
2402817466cbSJens Wiklander   * Fix implementation of mbedtls_ssl_parse_certificate() to not annihilate
2403817466cbSJens Wiklander     fatal errors in authentication mode MBEDTLS_SSL_VERIFY_OPTIONAL and to
2404817466cbSJens Wiklander     reflect bad EC curves within verification result.
2405817466cbSJens Wiklander   * Fix bug that caused the modular inversion function to accept the invalid
2406817466cbSJens Wiklander     modulus 1 and therefore to hang. Found by blaufish. #641.
2407817466cbSJens Wiklander   * Fix incorrect sign computation in modular exponentiation when the base is
2408817466cbSJens Wiklander     a negative MPI. Previously the result was always negative. Found by Guido
2409817466cbSJens Wiklander     Vranken.
2410817466cbSJens Wiklander   * Fix a numerical underflow leading to stack overflow in mpi_read_file()
2411817466cbSJens Wiklander     that was triggered uppon reading an empty line. Found by Guido Vranken.
2412817466cbSJens Wiklander
2413817466cbSJens WiklanderChanges
2414817466cbSJens Wiklander   * Send fatal alerts in more cases. The previous behaviour was to skip
2415817466cbSJens Wiklander     sending the fatal alert and just drop the connection.
2416817466cbSJens Wiklander   * Clarify ECDSA documentation and improve the sample code to avoid
2417817466cbSJens Wiklander     misunderstanding and potentially dangerous use of the API. Pointed out
2418817466cbSJens Wiklander     by Jean-Philippe Aumasson.
2419817466cbSJens Wiklander
2420817466cbSJens Wiklander= mbed TLS 2.5.0 branch released 2017-05-17
2421817466cbSJens Wiklander
2422817466cbSJens WiklanderSecurity
2423817466cbSJens Wiklander   * Wipe stack buffers in RSA private key operations
2424817466cbSJens Wiklander     (rsa_rsaes_pkcs1_v15_decrypt(), rsa_rsaes_oaep_decrypt). Found by Laurent
2425817466cbSJens Wiklander     Simon.
2426817466cbSJens Wiklander   * Add exponent blinding to RSA private operations as a countermeasure
2427817466cbSJens Wiklander     against side-channel attacks like the cache attack described in
2428817466cbSJens Wiklander     https://arxiv.org/abs/1702.08719v2.
2429817466cbSJens Wiklander     Found and fix proposed by Michael Schwarz, Samuel Weiser, Daniel Gruss,
2430817466cbSJens Wiklander     Clémentine Maurice and Stefan Mangard.
2431817466cbSJens Wiklander
2432817466cbSJens WiklanderFeatures
2433817466cbSJens Wiklander   * Add hardware acceleration support for the Elliptic Curve Point module.
2434817466cbSJens Wiklander     This involved exposing parts of the internal interface to enable
2435817466cbSJens Wiklander     replacing the core functions and adding and alternative, module level
2436817466cbSJens Wiklander     replacement support for enabling the extension of the interface.
2437817466cbSJens Wiklander   * Add a new configuration option to 'mbedtls_ssl_config' to enable
2438817466cbSJens Wiklander     suppressing the CA list in Certificate Request messages. The default
2439817466cbSJens Wiklander     behaviour has not changed, namely every configured CAs name is included.
2440817466cbSJens Wiklander
2441817466cbSJens WiklanderAPI Changes
2442817466cbSJens Wiklander   * The following functions in the AES module have been deprecated and replaced
2443817466cbSJens Wiklander     by the functions shown below. The new functions change the return type from
2444817466cbSJens Wiklander     void to int to allow returning error codes when using MBEDTLS_AES_ALT,
2445817466cbSJens Wiklander     MBEDTLS_AES_DECRYPT_ALT or MBEDTLS_AES_ENCRYPT_ALT.
2446817466cbSJens Wiklander     mbedtls_aes_decrypt() -> mbedtls_internal_aes_decrypt()
2447817466cbSJens Wiklander     mbedtls_aes_encrypt() -> mbedtls_internal_aes_encrypt()
2448817466cbSJens Wiklander
2449817466cbSJens WiklanderBugfix
2450817466cbSJens Wiklander   * Remove macros from compat-1.3.h that correspond to deleted items from most
2451817466cbSJens Wiklander     recent versions of the library. Found by Kyle Keen.
2452817466cbSJens Wiklander   * Fixed issue in the Threading module that prevented mutexes from
2453817466cbSJens Wiklander     initialising. Found by sznaider. #667 #843
2454817466cbSJens Wiklander   * Add checks in the PK module for the RSA functions on 64-bit systems.
2455817466cbSJens Wiklander     The PK and RSA modules use different types for passing hash length and
2456817466cbSJens Wiklander     without these checks the type cast could lead to data loss. Found by Guido
2457817466cbSJens Wiklander     Vranken.
2458817466cbSJens Wiklander
2459817466cbSJens Wiklander= mbed TLS 2.4.2 branch released 2017-03-08
2460817466cbSJens Wiklander
2461817466cbSJens WiklanderSecurity
2462817466cbSJens Wiklander   * Add checks to prevent signature forgeries for very large messages while
2463817466cbSJens Wiklander     using RSA through the PK module in 64-bit systems. The issue was caused by
2464817466cbSJens Wiklander     some data loss when casting a size_t to an unsigned int value in the
2465817466cbSJens Wiklander     functions rsa_verify_wrap(), rsa_sign_wrap(), rsa_alt_sign_wrap() and
2466817466cbSJens Wiklander     mbedtls_pk_sign(). Found by Jean-Philippe Aumasson.
2467817466cbSJens Wiklander   * Fixed potential livelock during the parsing of a CRL in PEM format in
2468817466cbSJens Wiklander     mbedtls_x509_crl_parse(). A string containing a CRL followed by trailing
2469817466cbSJens Wiklander     characters after the footer could result in the execution of an infinite
2470817466cbSJens Wiklander     loop. The issue can be triggered remotely. Found by Greg Zaverucha,
2471817466cbSJens Wiklander     Microsoft.
2472817466cbSJens Wiklander   * Removed MD5 from the allowed hash algorithms for CertificateRequest and
2473817466cbSJens Wiklander     CertificateVerify messages, to prevent SLOTH attacks against TLS 1.2.
2474817466cbSJens Wiklander     Introduced by interoperability fix for #513.
2475817466cbSJens Wiklander   * Fixed a bug that caused freeing a buffer that was allocated on the stack,
2476817466cbSJens Wiklander     when verifying the validity of a key on secp224k1. This could be
2477817466cbSJens Wiklander     triggered remotely for example with a maliciously constructed certificate
2478817466cbSJens Wiklander     and potentially could lead to remote code execution on some platforms.
2479817466cbSJens Wiklander     Reported independently by rongsaws and Aleksandar Nikolic, Cisco Talos
2480817466cbSJens Wiklander     team. #569 CVE-2017-2784
2481817466cbSJens Wiklander
2482817466cbSJens WiklanderBugfix
2483817466cbSJens Wiklander   * Fix output certificate verification flags set by x509_crt_verify_top() when
2484817466cbSJens Wiklander     traversing a chain of trusted CA. The issue would cause both flags,
2485817466cbSJens Wiklander     MBEDTLS_X509_BADCERT_NOT_TRUSTED and MBEDTLS_X509_BADCERT_EXPIRED, to be
2486817466cbSJens Wiklander     set when the verification conditions are not met regardless of the cause.
2487817466cbSJens Wiklander     Found by Harm Verhagen and inestlerode. #665 #561
2488817466cbSJens Wiklander   * Fix the redefinition of macro ssl_set_bio to an undefined symbol
2489817466cbSJens Wiklander     mbedtls_ssl_set_bio_timeout in compat-1.3.h, by removing it.
2490817466cbSJens Wiklander     Found by omlib-lin. #673
2491817466cbSJens Wiklander   * Fix unused variable/function compilation warnings in pem.c, x509_crt.c and
2492817466cbSJens Wiklander     x509_csr.c that are reported when building mbed TLS with a config.h that
2493817466cbSJens Wiklander     does not define MBEDTLS_PEM_PARSE_C. Found by omnium21. #562
2494817466cbSJens Wiklander   * Fix incorrect renegotiation condition in ssl_check_ctr_renegotiate() that
2495817466cbSJens Wiklander     would compare 64 bits of the record counter instead of 48 bits as indicated
2496817466cbSJens Wiklander     in RFC 6347 Section 4.3.1. This could cause the execution of the
2497817466cbSJens Wiklander     renegotiation routines at unexpected times when the protocol is DTLS. Found
2498817466cbSJens Wiklander     by wariua. #687
2499817466cbSJens Wiklander   * Fixed multiple buffer overreads in mbedtls_pem_read_buffer() when parsing
2500817466cbSJens Wiklander     the input string in PEM format to extract the different components. Found
2501817466cbSJens Wiklander     by Eyal Itkin.
2502817466cbSJens Wiklander   * Fixed potential arithmetic overflow in mbedtls_ctr_drbg_reseed() that could
2503817466cbSJens Wiklander     cause buffer bound checks to be bypassed. Found by Eyal Itkin.
2504817466cbSJens Wiklander   * Fixed potential arithmetic overflows in mbedtls_cipher_update() that could
2505817466cbSJens Wiklander     cause buffer bound checks to be bypassed. Found by Eyal Itkin.
2506817466cbSJens Wiklander   * Fixed potential arithmetic overflow in mbedtls_md2_update() that could
2507817466cbSJens Wiklander     cause buffer bound checks to be bypassed. Found by Eyal Itkin.
2508817466cbSJens Wiklander   * Fixed potential arithmetic overflow in mbedtls_base64_decode() that could
2509817466cbSJens Wiklander     cause buffer bound checks to be bypassed. Found by Eyal Itkin.
2510817466cbSJens Wiklander   * Fixed heap overreads in mbedtls_x509_get_time(). Found by Peng
2511817466cbSJens Wiklander     Li/Yueh-Hsun Lin, KNOX Security, Samsung Research America.
2512817466cbSJens Wiklander   * Fix potential memory leak in mbedtls_x509_crl_parse(). The leak was caused
2513817466cbSJens Wiklander     by missing calls to mbedtls_pem_free() in cases when a
2514817466cbSJens Wiklander     MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT error was encountered. Found and
2515817466cbSJens Wiklander     fix proposed by Guido Vranken. #722
2516817466cbSJens Wiklander   * Fixed the templates used to generate project and solution files for Visual
2517817466cbSJens Wiklander     Studio 2015 as well as the files themselves, to remove a build warning
2518817466cbSJens Wiklander     generated in Visual Studio 2015. Reported by Steve Valliere. #742
2519817466cbSJens Wiklander   * Fix a resource leak in ssl_cookie, when using MBEDTLS_THREADING_C.
2520817466cbSJens Wiklander     Raised and fix suggested by Alan Gillingham in the mbed TLS forum. #771
2521817466cbSJens Wiklander   * Fix 1 byte buffer overflow in mbedtls_mpi_write_string() when the MPI
2522817466cbSJens Wiklander     number to write in hexadecimal is negative and requires an odd number of
2523817466cbSJens Wiklander     digits. Found and fixed by Guido Vranken.
2524817466cbSJens Wiklander   * Fix unlisted DES configuration dependency in some pkparse test cases. Found
2525817466cbSJens Wiklander     by inestlerode. #555
2526817466cbSJens Wiklander
2527817466cbSJens Wiklander= mbed TLS 2.4.1 branch released 2016-12-13
2528817466cbSJens Wiklander
2529817466cbSJens WiklanderChanges
2530817466cbSJens Wiklander   * Update to CMAC test data, taken from - NIST Special Publication 800-38B -
2531817466cbSJens Wiklander     Recommendation for Block Cipher Modes of Operation: The CMAC Mode for
2532817466cbSJens Wiklander     Authentication – October  2016
2533817466cbSJens Wiklander
2534817466cbSJens Wiklander= mbed TLS 2.4.0 branch released 2016-10-17
2535817466cbSJens Wiklander
2536817466cbSJens WiklanderSecurity
2537817466cbSJens Wiklander   * Removed the MBEDTLS_SSL_AEAD_RANDOM_IV option, because it was not compliant
2538817466cbSJens Wiklander     with RFC-5116 and could lead to session key recovery in very long TLS
2539817466cbSJens Wiklander     sessions. "Nonce-Disrespecting Adversaries Practical Forgery Attacks on GCM in
2540817466cbSJens Wiklander     TLS" - H. Bock, A. Zauner, S. Devlin, J. Somorovsky, P. Jovanovic.
2541817466cbSJens Wiklander     https://eprint.iacr.org/2016/475.pdf
2542817466cbSJens Wiklander   * Fixed potential stack corruption in mbedtls_x509write_crt_der() and
2543817466cbSJens Wiklander     mbedtls_x509write_csr_der() when the signature is copied to the buffer
2544817466cbSJens Wiklander     without checking whether there is enough space in the destination. The
2545817466cbSJens Wiklander     issue cannot be triggered remotely. Found by Jethro Beekman.
2546817466cbSJens Wiklander
2547817466cbSJens WiklanderFeatures
2548817466cbSJens Wiklander   * Added support for CMAC for AES and 3DES and AES-CMAC-PRF-128, as defined by
2549817466cbSJens Wiklander     NIST SP 800-38B, RFC-4493 and RFC-4615.
2550817466cbSJens Wiklander   * Added hardware entropy selftest to verify that the hardware entropy source
2551817466cbSJens Wiklander     is functioning correctly.
2552817466cbSJens Wiklander   * Added a script to print build environment info for diagnostic use in test
2553817466cbSJens Wiklander     scripts, which is also now called by all.sh.
2554817466cbSJens Wiklander   * Added the macro MBEDTLS_X509_MAX_FILE_PATH_LEN that enables the user to
2555817466cbSJens Wiklander     configure the maximum length of a file path that can be buffered when
2556817466cbSJens Wiklander     calling mbedtls_x509_crt_parse_path().
2557817466cbSJens Wiklander   * Added a configuration file config-no-entropy.h that configures the subset of
2558817466cbSJens Wiklander     library features that do not require an entropy source.
2559817466cbSJens Wiklander   * Added the macro MBEDTLS_ENTROPY_MIN_HARDWARE in config.h. This allows users
2560817466cbSJens Wiklander     to configure the minimum number of bytes for entropy sources using the
2561817466cbSJens Wiklander     mbedtls_hardware_poll() function.
2562817466cbSJens Wiklander
2563817466cbSJens WiklanderBugfix
2564817466cbSJens Wiklander   * Fix for platform time abstraction to avoid dependency issues where a build
2565817466cbSJens Wiklander     may need time but not the standard C library abstraction, and added
2566817466cbSJens Wiklander     configuration consistency checks to check_config.h
2567817466cbSJens Wiklander   * Fix dependency issue in Makefile to allow parallel builds.
2568817466cbSJens Wiklander   * Fix incorrect handling of block lengths in crypt_and_hash.c sample program,
2569817466cbSJens Wiklander     when GCM is used. Found by udf2457. #441
2570817466cbSJens Wiklander   * Fix for key exchanges based on ECDH-RSA or ECDH-ECDSA which weren't
2571817466cbSJens Wiklander     enabled unless others were also present. Found by David Fernandez. #428
2572817466cbSJens Wiklander   * Fix for out-of-tree builds using CMake. Found by jwurzer, and fix based on
2573817466cbSJens Wiklander     a contribution from Tobias Tangemann. #541
2574817466cbSJens Wiklander   * Fixed cert_app.c sample program for debug output and for use when no root
2575817466cbSJens Wiklander     certificates are provided.
2576817466cbSJens Wiklander   * Fix conditional statement that would cause a 1 byte overread in
2577817466cbSJens Wiklander     mbedtls_asn1_get_int(). Found and fixed by Guido Vranken. #599
2578817466cbSJens Wiklander   * Fixed pthread implementation to avoid unintended double initialisations
2579817466cbSJens Wiklander     and double frees. Found by Niklas Amnebratt.
2580817466cbSJens Wiklander   * Fixed the sample applications gen_key.c, cert_req.c and cert_write.c for
2581817466cbSJens Wiklander     builds where the configuration MBEDTLS_PEM_WRITE_C is not defined. Found
2582817466cbSJens Wiklander     by inestlerode. #559.
2583817466cbSJens Wiklander   * Fix mbedtls_x509_get_sig() to update the ASN1 type in the mbedtls_x509_buf
2584817466cbSJens Wiklander     data structure until after error checks are successful. Found by
2585817466cbSJens Wiklander     subramanyam-c. #622
2586817466cbSJens Wiklander   * Fix documentation and implementation missmatch for function arguments of
2587817466cbSJens Wiklander     mbedtls_gcm_finish(). Found by cmiatpaar. #602
2588817466cbSJens Wiklander   * Guarantee that P>Q at RSA key generation. Found by inestlerode. #558
2589817466cbSJens Wiklander   * Fix potential byte overread when verifying malformed SERVER_HELLO in
2590817466cbSJens Wiklander     ssl_parse_hello_verify_request() for DTLS. Found by Guido Vranken.
2591817466cbSJens Wiklander   * Fix check for validity of date when parsing in mbedtls_x509_get_time().
2592817466cbSJens Wiklander     Found by subramanyam-c. #626
2593817466cbSJens Wiklander   * Fix compatibility issue with Internet Explorer client authentication,
2594817466cbSJens Wiklander     where the limited hash choices prevented the client from sending its
2595817466cbSJens Wiklander     certificate. Found by teumas. #513
2596817466cbSJens Wiklander   * Fix compilation without MBEDTLS_SELF_TEST enabled.
2597817466cbSJens Wiklander
2598817466cbSJens WiklanderChanges
2599817466cbSJens Wiklander   * Extended test coverage of special cases, and added new timing test suite.
2600817466cbSJens Wiklander   * Removed self-tests from the basic-built-test.sh script, and added all
2601817466cbSJens Wiklander     missing self-tests to the test suites, to ensure self-tests are only
2602817466cbSJens Wiklander     executed once.
2603817466cbSJens Wiklander   * Added support for 3 and 4 byte lengths to mbedtls_asn1_write_len().
2604817466cbSJens Wiklander   * Added support for a Yotta specific configuration file -
2605817466cbSJens Wiklander     through the symbol YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE.
2606817466cbSJens Wiklander   * Added optimization for code space for X.509/OID based on configured
2607817466cbSJens Wiklander     features. Contributed by Aviv Palivoda.
2608817466cbSJens Wiklander   * Renamed source file library/net.c to library/net_sockets.c to avoid
2609817466cbSJens Wiklander     naming collision in projects which also have files with the common name
2610817466cbSJens Wiklander     net.c. For consistency, the corresponding header file, net.h, is marked as
2611817466cbSJens Wiklander     deprecated, and its contents moved to net_sockets.h.
2612817466cbSJens Wiklander   * Changed the strategy for X.509 certificate parsing and validation, to no
2613817466cbSJens Wiklander     longer disregard certificates with unrecognised fields.
2614817466cbSJens Wiklander
2615817466cbSJens Wiklander= mbed TLS 2.3.0 branch released 2016-06-28
2616817466cbSJens Wiklander
2617817466cbSJens WiklanderSecurity
2618817466cbSJens Wiklander   * Fix missing padding length check in mbedtls_rsa_rsaes_pkcs1_v15_decrypt
2619817466cbSJens Wiklander     required by PKCS1 v2.2
2620817466cbSJens Wiklander   * Fix potential integer overflow to buffer overflow in
2621817466cbSJens Wiklander     mbedtls_rsa_rsaes_pkcs1_v15_encrypt and mbedtls_rsa_rsaes_oaep_encrypt
2622817466cbSJens Wiklander     (not triggerable remotely in (D)TLS).
2623817466cbSJens Wiklander   * Fix a potential integer underflow to buffer overread in
2624817466cbSJens Wiklander     mbedtls_rsa_rsaes_oaep_decrypt. It is not triggerable remotely in
2625817466cbSJens Wiklander     SSL/TLS.
2626817466cbSJens Wiklander
2627817466cbSJens WiklanderFeatures
2628817466cbSJens Wiklander   * Support for platform abstraction of the standard C library time()
2629817466cbSJens Wiklander     function.
2630817466cbSJens Wiklander
2631817466cbSJens WiklanderBugfix
2632817466cbSJens Wiklander   * Fix bug in mbedtls_mpi_add_mpi() that caused wrong results when the three
2633817466cbSJens Wiklander     arguments where the same (in-place doubling). Found and fixed by Janos
2634817466cbSJens Wiklander     Follath. #309
2635817466cbSJens Wiklander   * Fix potential build failures related to the 'apidoc' target, introduced
2636817466cbSJens Wiklander     in the previous patch release. Found by Robert Scheck. #390 #391
2637817466cbSJens Wiklander   * Fix issue in Makefile that prevented building using armar. #386
26385b25c76aSJerome Forissier   * Fix memory leak that occurred only when ECJPAKE was enabled and ECDHE and
2639817466cbSJens Wiklander     ECDSA was disabled in config.h . The leak didn't occur by default.
2640817466cbSJens Wiklander   * Fix an issue that caused valid certificates to be rejected whenever an
2641817466cbSJens Wiklander     expired or not yet valid certificate was parsed before a valid certificate
2642817466cbSJens Wiklander     in the trusted certificate list.
2643817466cbSJens Wiklander   * Fix bug in mbedtls_x509_crt_parse that caused trailing extra data in the
2644817466cbSJens Wiklander     buffer after DER certificates to be included in the raw representation.
2645817466cbSJens Wiklander   * Fix issue that caused a hang when generating RSA keys of odd bitlength
2646817466cbSJens Wiklander   * Fix bug in mbedtls_rsa_rsaes_pkcs1_v15_encrypt that made null pointer
2647817466cbSJens Wiklander     dereference possible.
2648817466cbSJens Wiklander   * Fix issue that caused a crash if invalid curves were passed to
2649817466cbSJens Wiklander     mbedtls_ssl_conf_curves. #373
2650817466cbSJens Wiklander   * Fix issue in ssl_fork_server which was preventing it from functioning. #429
2651817466cbSJens Wiklander   * Fix memory leaks in test framework
2652817466cbSJens Wiklander   * Fix test in ssl-opt.sh that does not run properly with valgrind
2653817466cbSJens Wiklander   * Fix unchecked calls to mmbedtls_md_setup(). Fix by Brian Murray. #502
2654817466cbSJens Wiklander
2655817466cbSJens WiklanderChanges
2656817466cbSJens Wiklander   * On ARM platforms, when compiling with -O0 with GCC, Clang or armcc5,
2657817466cbSJens Wiklander     don't use the optimized assembly for bignum multiplication. This removes
2658817466cbSJens Wiklander     the need to pass -fomit-frame-pointer to avoid a build error with -O0.
2659817466cbSJens Wiklander   * Disabled SSLv3 in the default configuration.
2660817466cbSJens Wiklander   * Optimized mbedtls_mpi_zeroize() for MPI integer size. (Fix by Alexey
2661817466cbSJens Wiklander     Skalozub).
2662817466cbSJens Wiklander   * Fix non-compliance server extension handling. Extensions for SSLv3 are now
2663817466cbSJens Wiklander     ignored, as required by RFC6101.
2664817466cbSJens Wiklander
2665817466cbSJens Wiklander= mbed TLS 2.2.1 released 2016-01-05
2666817466cbSJens Wiklander
2667817466cbSJens WiklanderSecurity
2668817466cbSJens Wiklander   * Fix potential double free when mbedtls_asn1_store_named_data() fails to
2669817466cbSJens Wiklander     allocate memory. Only used for certificate generation, not triggerable
2670817466cbSJens Wiklander     remotely in SSL/TLS. Found by Rafał Przywara. #367
2671817466cbSJens Wiklander   * Disable MD5 handshake signatures in TLS 1.2 by default to prevent the
2672817466cbSJens Wiklander     SLOTH attack on TLS 1.2 server authentication (other attacks from the
2673817466cbSJens Wiklander     SLOTH paper do not apply to any version of mbed TLS or PolarSSL).
2674817466cbSJens Wiklander     https://www.mitls.org/pages/attacks/SLOTH
2675817466cbSJens Wiklander
2676817466cbSJens WiklanderBugfix
2677817466cbSJens Wiklander   * Fix over-restrictive length limit in GCM. Found by Andreas-N. #362
2678817466cbSJens Wiklander   * Fix bug in certificate validation that caused valid chains to be rejected
2679817466cbSJens Wiklander     when the first intermediate certificate has pathLenConstraint=0. Found by
2680817466cbSJens Wiklander     Nicholas Wilson. Introduced in mbed TLS 2.2.0. #280
2681817466cbSJens Wiklander   * Removed potential leak in mbedtls_rsa_rsassa_pkcs1_v15_sign(), found by
2682817466cbSJens Wiklander     JayaraghavendranK. #372
2683817466cbSJens Wiklander   * Fix suboptimal handling of unexpected records that caused interop issues
2684817466cbSJens Wiklander     with some peers over unreliable links. Avoid dropping an entire DTLS
2685817466cbSJens Wiklander     datagram if a single record in a datagram is unexpected, instead only
2686817466cbSJens Wiklander     drop the record and look at subsequent records (if any are present) in
2687817466cbSJens Wiklander     the same datagram. Found by jeannotlapin. #345
2688817466cbSJens Wiklander
2689817466cbSJens Wiklander= mbed TLS 2.2.0 released 2015-11-04
2690817466cbSJens Wiklander
2691817466cbSJens WiklanderSecurity
2692817466cbSJens Wiklander   * Fix potential double free if mbedtls_ssl_conf_psk() is called more than
2693817466cbSJens Wiklander     once and some allocation fails. Cannot be forced remotely. Found by Guido
2694817466cbSJens Wiklander     Vranken, Intelworks.
2695817466cbSJens Wiklander   * Fix potential heap corruption on Windows when
2696817466cbSJens Wiklander     mbedtls_x509_crt_parse_path() is passed a path longer than 2GB. Cannot be
2697817466cbSJens Wiklander     triggered remotely. Found by Guido Vranken, Intelworks.
2698817466cbSJens Wiklander   * Fix potential buffer overflow in some asn1_write_xxx() functions.
2699817466cbSJens Wiklander     Cannot be triggered remotely unless you create X.509 certificates based
2700817466cbSJens Wiklander     on untrusted input or write keys of untrusted origin. Found by Guido
2701817466cbSJens Wiklander     Vranken, Intelworks.
2702817466cbSJens Wiklander   * The X509 max_pathlen constraint was not enforced on intermediate
2703817466cbSJens Wiklander     certificates. Found by Nicholas Wilson, fix and tests provided by
2704817466cbSJens Wiklander     Janos Follath. #280 and #319
2705817466cbSJens Wiklander
2706817466cbSJens WiklanderFeatures
2707817466cbSJens Wiklander   * Experimental support for EC J-PAKE as defined in Thread 1.0.0.
2708817466cbSJens Wiklander     Disabled by default as the specification might still change.
2709817466cbSJens Wiklander   * Added a key extraction callback to accees the master secret and key
2710817466cbSJens Wiklander     block. (Potential uses include EAP-TLS and Thread.)
2711817466cbSJens Wiklander
2712817466cbSJens WiklanderBugfix
2713817466cbSJens Wiklander   * Self-signed certificates were not excluded from pathlen counting,
2714817466cbSJens Wiklander     resulting in some valid X.509 being incorrectly rejected. Found and fix
2715817466cbSJens Wiklander     provided by Janos Follath. #319
2716817466cbSJens Wiklander   * Fix build error with configurations where ECDHE-PSK is the only key
2717817466cbSJens Wiklander     exchange. Found and fix provided by Chris Hammond. #270
2718817466cbSJens Wiklander   * Fix build error with configurations where RSA, RSA-PSK, ECDH-RSA or
2719817466cbSJens Wiklander     ECHD-ECDSA if the only key exchange. Multiple reports. #310
2720817466cbSJens Wiklander   * Fixed a bug causing some handshakes to fail due to some non-fatal alerts
2721817466cbSJens Wiklander     not being properly ignored. Found by mancha and Kasom Koht-arsa, #308
2722817466cbSJens Wiklander   * mbedtls_x509_crt_verify(_with_profile)() now also checks the key type and
2723817466cbSJens Wiklander     size/curve against the profile. Before that, there was no way to set a
2724817466cbSJens Wiklander     minimum key size for end-entity certificates with RSA keys. Found by
2725817466cbSJens Wiklander     Matthew Page of Scannex Electronics Ltd.
2726817466cbSJens Wiklander   * Fix failures in MPI on Sparc(64) due to use of bad assembly code.
2727817466cbSJens Wiklander     Found by Kurt Danielson. #292
2728817466cbSJens Wiklander   * Fix typo in name of the extKeyUsage OID. Found by inestlerode, #314
2729817466cbSJens Wiklander   * Fix bug in ASN.1 encoding of booleans that caused generated CA
2730817466cbSJens Wiklander     certificates to be rejected by some applications, including OS X
2731817466cbSJens Wiklander     Keychain. Found and fixed by Jonathan Leroy, Inikup.
2732817466cbSJens Wiklander
2733817466cbSJens WiklanderChanges
2734817466cbSJens Wiklander   * Improved performance of mbedtls_ecp_muladd() when one of the scalars is 1
2735817466cbSJens Wiklander     or -1.
2736817466cbSJens Wiklander
2737817466cbSJens Wiklander= mbed TLS 2.1.2 released 2015-10-06
2738817466cbSJens Wiklander
2739817466cbSJens WiklanderSecurity
2740817466cbSJens Wiklander   * Added fix for CVE-2015-5291 to prevent heap corruption due to buffer
2741817466cbSJens Wiklander     overflow of the hostname or session ticket. Found by Guido Vranken,
2742817466cbSJens Wiklander     Intelworks.
2743817466cbSJens Wiklander   * Fix potential double-free if mbedtls_ssl_set_hs_psk() is called more than
2744817466cbSJens Wiklander     once in the same handhake and mbedtls_ssl_conf_psk() was used.
2745817466cbSJens Wiklander     Found and patch provided by Guido Vranken, Intelworks. Cannot be forced
2746817466cbSJens Wiklander     remotely.
2747817466cbSJens Wiklander   * Fix stack buffer overflow in pkcs12 decryption (used by
2748817466cbSJens Wiklander     mbedtls_pk_parse_key(file)() when the password is > 129 bytes.
2749817466cbSJens Wiklander     Found by Guido Vranken, Intelworks. Not triggerable remotely.
2750817466cbSJens Wiklander   * Fix potential buffer overflow in mbedtls_mpi_read_string().
2751817466cbSJens Wiklander     Found by Guido Vranken, Intelworks. Not exploitable remotely in the context
2752817466cbSJens Wiklander     of TLS, but might be in other uses. On 32 bit machines, requires reading a
2753817466cbSJens Wiklander     string of close to or larger than 1GB to exploit; on 64 bit machines, would
2754817466cbSJens Wiklander     require reading a string of close to or larger than 2^62 bytes.
2755817466cbSJens Wiklander   * Fix potential random memory allocation in mbedtls_pem_read_buffer()
2756817466cbSJens Wiklander     on crafted PEM input data. Found and fix provided by Guido Vranken,
2757817466cbSJens Wiklander     Intelworks. Not triggerable remotely in TLS. Triggerable remotely if you
2758817466cbSJens Wiklander     accept PEM data from an untrusted source.
2759817466cbSJens Wiklander   * Fix possible heap buffer overflow in base64_encoded() when the input
2760817466cbSJens Wiklander     buffer is 512MB or larger on 32-bit platforms. Found by Guido Vranken,
2761817466cbSJens Wiklander     Intelworks. Not trigerrable remotely in TLS.
2762817466cbSJens Wiklander   * Fix potential double-free if mbedtls_conf_psk() is called repeatedly on
2763817466cbSJens Wiklander     the same mbedtls_ssl_config object and memory allocation fails. Found by
2764817466cbSJens Wiklander     Guido Vranken, Intelworks. Cannot be forced remotely.
2765817466cbSJens Wiklander   * Fix potential heap buffer overflow in servers that perform client
2766817466cbSJens Wiklander     authentication against a crafted CA cert. Cannot be triggered remotely
2767817466cbSJens Wiklander     unless you allow third parties to pick trust CAs for client auth.
2768817466cbSJens Wiklander     Found by Guido Vranken, Intelworks.
2769817466cbSJens Wiklander
2770817466cbSJens WiklanderBugfix
2771817466cbSJens Wiklander   * Fix compile error in net.c with musl libc. Found and patch provided by
2772817466cbSJens Wiklander     zhasha (#278).
2773817466cbSJens Wiklander   * Fix macroization of 'inline' keyword when building as C++. (#279)
2774817466cbSJens Wiklander
2775817466cbSJens WiklanderChanges
2776817466cbSJens Wiklander   * Added checking of hostname length in mbedtls_ssl_set_hostname() to ensure
2777817466cbSJens Wiklander     domain names are compliant with RFC 1035.
2778817466cbSJens Wiklander   * Fixed paths for check_config.h in example config files. (Found by bachp)
2779817466cbSJens Wiklander     (#291)
2780817466cbSJens Wiklander
2781817466cbSJens Wiklander= mbed TLS 2.1.1 released 2015-09-17
2782817466cbSJens Wiklander
2783817466cbSJens WiklanderSecurity
2784817466cbSJens Wiklander   * Add countermeasure against Lenstra's RSA-CRT attack for PKCS#1 v1.5
2785817466cbSJens Wiklander     signatures. (Found by Florian Weimer, Red Hat.)
2786817466cbSJens Wiklander     https://securityblog.redhat.com/2015/09/02/factoring-rsa-keys-with-tls-perfect-forward-secrecy/
2787817466cbSJens Wiklander   * Fix possible client-side NULL pointer dereference (read) when the client
2788817466cbSJens Wiklander     tries to continue the handshake after it failed (a misuse of the API).
2789817466cbSJens Wiklander     (Found and patch provided by Fabian Foerg, Gotham Digital Science using
2790817466cbSJens Wiklander     afl-fuzz.)
2791817466cbSJens Wiklander
2792817466cbSJens WiklanderBugfix
2793817466cbSJens Wiklander   * Fix warning when using a 64bit platform. (found by embedthis) (#275)
2794817466cbSJens Wiklander   * Fix off-by-one error in parsing Supported Point Format extension that
2795817466cbSJens Wiklander     caused some handshakes to fail.
2796817466cbSJens Wiklander
2797817466cbSJens WiklanderChanges
2798817466cbSJens Wiklander   * Made X509 profile pointer const in mbedtls_ssl_conf_cert_profile() to allow
2799817466cbSJens Wiklander     use of mbedtls_x509_crt_profile_next. (found by NWilson)
2800817466cbSJens Wiklander   * When a client initiates a reconnect from the same port as a live
2801817466cbSJens Wiklander     connection, if cookie verification is available
2802817466cbSJens Wiklander     (MBEDTLS_SSL_DTLS_HELLO_VERIFY defined in config.h, and usable cookie
2803817466cbSJens Wiklander     callbacks set with mbedtls_ssl_conf_dtls_cookies()), this will be
2804817466cbSJens Wiklander     detected and mbedtls_ssl_read() will return
2805817466cbSJens Wiklander     MBEDTLS_ERR_SSL_CLIENT_RECONNECT - it is then possible to start a new
2806817466cbSJens Wiklander     handshake with the same context. (See RFC 6347 section 4.2.8.)
2807817466cbSJens Wiklander
2808817466cbSJens Wiklander= mbed TLS 2.1.0 released 2015-09-04
2809817466cbSJens Wiklander
2810817466cbSJens WiklanderFeatures
2811817466cbSJens Wiklander   * Added support for yotta as a build system.
2812817466cbSJens Wiklander   * Primary open source license changed to Apache 2.0 license.
2813817466cbSJens Wiklander
2814817466cbSJens WiklanderBugfix
2815817466cbSJens Wiklander   * Fix segfault in the benchmark program when benchmarking DHM.
2816817466cbSJens Wiklander   * Fix build error with CMake and pre-4.5 versions of GCC (found by Hugo
2817817466cbSJens Wiklander     Leisink).
2818817466cbSJens Wiklander   * Fix bug when parsing a ServerHello without extensions (found by David
2819817466cbSJens Wiklander     Sears).
2820817466cbSJens Wiklander   * Fix bug in CMake lists that caused libmbedcrypto.a not to be installed
2821817466cbSJens Wiklander     (found by Benoit Lecocq).
2822817466cbSJens Wiklander   * Fix bug in Makefile that caused libmbedcrypto and libmbedx509 not to be
2823817466cbSJens Wiklander     installed (found by Rawi666).
2824817466cbSJens Wiklander   * Fix compile error with armcc 5 with --gnu option.
2825817466cbSJens Wiklander   * Fix bug in Makefile that caused programs not to be installed correctly
2826817466cbSJens Wiklander     (found by robotanarchy) (#232).
2827817466cbSJens Wiklander   * Fix bug in Makefile that prevented from installing without building the
2828817466cbSJens Wiklander     tests (found by robotanarchy) (#232).
2829817466cbSJens Wiklander   * Fix missing -static-libgcc when building shared libraries for Windows
2830817466cbSJens Wiklander     with make.
2831817466cbSJens Wiklander   * Fix link error when building shared libraries for Windows with make.
2832817466cbSJens Wiklander   * Fix error when loading libmbedtls.so.
2833817466cbSJens Wiklander   * Fix bug in mbedtls_ssl_conf_default() that caused the default preset to
2834817466cbSJens Wiklander     be always used (found by dcb314) (#235)
2835817466cbSJens Wiklander   * Fix bug in mbedtls_rsa_public() and mbedtls_rsa_private() that could
2836817466cbSJens Wiklander     result trying to unlock an unlocked mutex on invalid input (found by
2837817466cbSJens Wiklander     Fredrik Axelsson) (#257)
2838817466cbSJens Wiklander   * Fix -Wshadow warnings (found by hnrkp) (#240)
2839817466cbSJens Wiklander   * Fix memory corruption on client with overlong PSK identity, around
2840817466cbSJens Wiklander     SSL_MAX_CONTENT_LEN or higher - not triggerrable remotely (found by
2841817466cbSJens Wiklander     Aleksandrs Saveljevs) (#238)
2842817466cbSJens Wiklander   * Fix unused function warning when using MBEDTLS_MDx_ALT or
2843817466cbSJens Wiklander     MBEDTLS_SHAxxx_ALT (found by Henrik) (#239)
2844817466cbSJens Wiklander   * Fix memory corruption in pkey programs (found by yankuncheng) (#210)
2845817466cbSJens Wiklander
2846817466cbSJens WiklanderChanges
2847817466cbSJens Wiklander   * The PEM parser now accepts a trailing space at end of lines (#226).
2848817466cbSJens Wiklander   * It is now possible to #include a user-provided configuration file at the
2849817466cbSJens Wiklander     end of the default config.h by defining MBEDTLS_USER_CONFIG_FILE on the
2850817466cbSJens Wiklander     compiler's command line.
2851817466cbSJens Wiklander   * When verifying a certificate chain, if an intermediate certificate is
2852817466cbSJens Wiklander     trusted, no later cert is checked. (suggested by hannes-landeholm)
2853817466cbSJens Wiklander     (#220).
2854817466cbSJens Wiklander   * Prepend a "thread identifier" to debug messages (issue pointed out by
2855817466cbSJens Wiklander     Hugo Leisink) (#210).
2856817466cbSJens Wiklander   * Add mbedtls_ssl_get_max_frag_len() to query the current maximum fragment
2857817466cbSJens Wiklander     length.
2858817466cbSJens Wiklander
2859817466cbSJens Wiklander= mbed TLS 2.0.0 released 2015-07-13
2860817466cbSJens Wiklander
2861817466cbSJens WiklanderFeatures
2862817466cbSJens Wiklander   * Support for DTLS 1.0 and 1.2 (RFC 6347).
2863817466cbSJens Wiklander   * Ability to override core functions from MDx, SHAx, AES and DES modules
2864817466cbSJens Wiklander     with custom implementation (eg hardware accelerated), complementing the
2865817466cbSJens Wiklander     ability to override the whole module.
2866817466cbSJens Wiklander   * New server-side implementation of session tickets that rotate keys to
2867817466cbSJens Wiklander     preserve forward secrecy, and allows sharing across multiple contexts.
2868817466cbSJens Wiklander   * Added a concept of X.509 cerificate verification profile that controls
2869817466cbSJens Wiklander     which algorithms and key sizes (curves for ECDSA) are acceptable.
2870817466cbSJens Wiklander   * Expanded configurability of security parameters in the SSL module with
2871817466cbSJens Wiklander     mbedtls_ssl_conf_dhm_min_bitlen() and mbedtls_ssl_conf_sig_hashes().
2872817466cbSJens Wiklander   * Introduced a concept of presets for SSL security-relevant configuration
2873817466cbSJens Wiklander     parameters.
2874817466cbSJens Wiklander
2875817466cbSJens WiklanderAPI Changes
2876817466cbSJens Wiklander   * The library has been split into libmbedcrypto, libmbedx509, libmbedtls.
2877817466cbSJens Wiklander     You now need to link to all of them if you use TLS for example.
2878817466cbSJens Wiklander   * All public identifiers moved to the mbedtls_* or MBEDTLS_* namespace.
2879817466cbSJens Wiklander     Some names have been further changed to make them more consistent.
28805b25c76aSJerome Forissier     Migration helpers scripts/rename.pl and include/mbedtls/compat-1.3.h are
2881817466cbSJens Wiklander     provided. Full list of renamings in scripts/data_files/rename-1.3-2.0.txt
2882817466cbSJens Wiklander   * Renamings of fields inside structures, not covered by the previous list:
2883817466cbSJens Wiklander     mbedtls_cipher_info_t.key_length -> key_bitlen
2884817466cbSJens Wiklander     mbedtls_cipher_context_t.key_length -> key_bitlen
2885817466cbSJens Wiklander     mbedtls_ecp_curve_info.size -> bit_size
2886817466cbSJens Wiklander   * Headers are now found in the 'mbedtls' directory (previously 'polarssl').
2887817466cbSJens Wiklander   * The following _init() functions that could return errors have
2888817466cbSJens Wiklander     been split into an _init() that returns void and another function that
2889817466cbSJens Wiklander     should generally be the first function called on this context after init:
2890817466cbSJens Wiklander     mbedtls_ssl_init() -> mbedtls_ssl_setup()
2891817466cbSJens Wiklander     mbedtls_ccm_init() -> mbedtls_ccm_setkey()
2892817466cbSJens Wiklander     mbedtls_gcm_init() -> mbedtls_gcm_setkey()
2893817466cbSJens Wiklander     mbedtls_hmac_drbg_init() -> mbedtls_hmac_drbg_seed(_buf)()
2894817466cbSJens Wiklander     mbedtls_ctr_drbg_init()  -> mbedtls_ctr_drbg_seed()
2895817466cbSJens Wiklander     Note that for mbedtls_ssl_setup(), you need to be done setting up the
2896817466cbSJens Wiklander     ssl_config structure before calling it.
2897817466cbSJens Wiklander   * Most ssl_set_xxx() functions (all except ssl_set_bio(), ssl_set_hostname(),
2898817466cbSJens Wiklander     ssl_set_session() and ssl_set_client_transport_id(), plus
2899817466cbSJens Wiklander     ssl_legacy_renegotiation()) have been renamed to mbedtls_ssl_conf_xxx()
2900817466cbSJens Wiklander     (see rename.pl and compat-1.3.h above) and their first argument's type
2901817466cbSJens Wiklander     changed from ssl_context to ssl_config.
2902817466cbSJens Wiklander   * ssl_set_bio() changed signature (contexts merged, order switched, one
2903817466cbSJens Wiklander     additional callback for read-with-timeout).
2904817466cbSJens Wiklander   * The following functions have been introduced and must be used in callback
2905817466cbSJens Wiklander     implementations (SNI, PSK) instead of their *conf counterparts:
2906817466cbSJens Wiklander     mbedtls_ssl_set_hs_own_cert()
2907817466cbSJens Wiklander     mbedtls_ssl_set_hs_ca_chain()
2908817466cbSJens Wiklander     mbedtls_ssl_set_hs_psk()
2909817466cbSJens Wiklander   * mbedtls_ssl_conf_ca_chain() lost its last argument (peer_cn), now set
2910817466cbSJens Wiklander     using mbedtls_ssl_set_hostname().
2911817466cbSJens Wiklander   * mbedtls_ssl_conf_session_cache() changed prototype (only one context
2912817466cbSJens Wiklander     pointer, parameters reordered).
2913817466cbSJens Wiklander   * On server, mbedtls_ssl_conf_session_tickets_cb() must now be used in
2914817466cbSJens Wiklander     place of mbedtls_ssl_conf_session_tickets() to enable session tickets.
2915817466cbSJens Wiklander   * The SSL debug callback gained two new arguments (file name, line number).
2916817466cbSJens Wiklander   * Debug modes were removed.
2917817466cbSJens Wiklander   * mbedtls_ssl_conf_truncated_hmac() now returns void.
2918817466cbSJens Wiklander   * mbedtls_memory_buffer_alloc_init() now returns void.
2919817466cbSJens Wiklander   * X.509 verification flags are now an uint32_t. Affect the signature of:
2920817466cbSJens Wiklander     mbedtls_ssl_get_verify_result()
2921817466cbSJens Wiklander     mbedtls_x509_ctr_verify_info()
2922817466cbSJens Wiklander     mbedtls_x509_crt_verify() (flags, f_vrfy -> needs to be updated)
2923817466cbSJens Wiklander     mbedtls_ssl_conf_verify() (f_vrfy -> needs to be updated)
2924817466cbSJens Wiklander   * The following functions changed prototype to avoid an in-out length
2925817466cbSJens Wiklander     parameter:
2926817466cbSJens Wiklander     mbedtls_base64_encode()
2927817466cbSJens Wiklander     mbedtls_base64_decode()
2928817466cbSJens Wiklander     mbedtls_mpi_write_string()
2929817466cbSJens Wiklander     mbedtls_dhm_calc_secret()
2930817466cbSJens Wiklander   * In the NET module, all "int" and "int *" arguments for file descriptors
2931817466cbSJens Wiklander     changed type to "mbedtls_net_context *".
2932817466cbSJens Wiklander   * net_accept() gained new arguments for the size of the client_ip buffer.
2933817466cbSJens Wiklander   * In the threading layer, mbedtls_mutex_init() and mbedtls_mutex_free() now
2934817466cbSJens Wiklander     return void.
29355b25c76aSJerome Forissier   * ecdsa_write_signature() gained an additional md_alg argument and
2936817466cbSJens Wiklander     ecdsa_write_signature_det() was deprecated.
2937817466cbSJens Wiklander   * pk_sign() no longer accepts md_alg == POLARSSL_MD_NONE with ECDSA.
2938817466cbSJens Wiklander   * Last argument of x509_crt_check_key_usage() and
2939817466cbSJens Wiklander     mbedtls_x509write_crt_set_key_usage() changed from int to unsigned.
2940817466cbSJens Wiklander   * test_ca_list (from certs.h) is renamed to test_cas_pem and is only
2941817466cbSJens Wiklander     available if POLARSSL_PEM_PARSE_C is defined (it never worked without).
2942817466cbSJens Wiklander   * Test certificates in certs.c are no longer guaranteed to be nul-terminated
2943817466cbSJens Wiklander     strings; use the new *_len variables instead of strlen().
2944817466cbSJens Wiklander   * Functions mbedtls_x509_xxx_parse(), mbedtls_pk_parse_key(),
2945817466cbSJens Wiklander     mbedtls_pk_parse_public_key() and mbedtls_dhm_parse_dhm() now expect the
2946817466cbSJens Wiklander     length parameter to include the terminating null byte for PEM input.
2947817466cbSJens Wiklander   * Signature of mpi_mul_mpi() changed to make the last argument unsigned
2948817466cbSJens Wiklander   * calloc() is now used instead of malloc() everywhere. API of platform
2949817466cbSJens Wiklander     layer and the memory_buffer_alloc module changed accordingly.
2950817466cbSJens Wiklander     (Thanks to Mansour Moufid for helping with the replacement.)
2951817466cbSJens Wiklander   * Change SSL_DISABLE_RENEGOTIATION config.h flag to SSL_RENEGOTIATION
2952817466cbSJens Wiklander     (support for renegotiation now needs explicit enabling in config.h).
2953817466cbSJens Wiklander   * Split MBEDTLS_HAVE_TIME into MBEDTLS_HAVE_TIME and MBEDTLS_HAVE_TIME_DATE
2954817466cbSJens Wiklander     in config.h
2955817466cbSJens Wiklander   * net_connect() and net_bind() have a new 'proto' argument to choose
2956817466cbSJens Wiklander     between TCP and UDP, using the macros NET_PROTO_TCP or NET_PROTO_UDP.
2957817466cbSJens Wiklander     Their 'port' argument type is changed to a string.
2958817466cbSJens Wiklander   * Some constness fixes
2959817466cbSJens Wiklander
2960817466cbSJens WiklanderRemovals
2961817466cbSJens Wiklander   * Removed mbedtls_ecp_group_read_string(). Only named groups are supported.
2962817466cbSJens Wiklander   * Removed mbedtls_ecp_sub() and mbedtls_ecp_add(), use
2963817466cbSJens Wiklander     mbedtls_ecp_muladd().
2964817466cbSJens Wiklander   * Removed individual mdX_hmac, shaX_hmac, mdX_file and shaX_file functions
2965817466cbSJens Wiklander     (use generic functions from md.h)
2966817466cbSJens Wiklander   * Removed mbedtls_timing_msleep(). Use mbedtls_net_usleep() or a custom
2967817466cbSJens Wiklander     waiting function.
2968817466cbSJens Wiklander   * Removed test DHM parameters from the test certs module.
2969817466cbSJens Wiklander   * Removed the PBKDF2 module (use PKCS5).
2970817466cbSJens Wiklander   * Removed POLARSSL_ERROR_STRERROR_BC (use mbedtls_strerror()).
2971817466cbSJens Wiklander   * Removed compat-1.2.h (helper for migrating from 1.2 to 1.3).
2972817466cbSJens Wiklander   * Removed openssl.h (very partial OpenSSL compatibility layer).
2973817466cbSJens Wiklander   * Configuration options POLARSSL_HAVE_LONGLONG was removed (now always on).
2974817466cbSJens Wiklander   * Configuration options POLARSSL_HAVE_INT8 and POLARSSL_HAVE_INT16 have
2975817466cbSJens Wiklander     been removed (compiler is required to support 32-bit operations).
2976817466cbSJens Wiklander   * Configuration option POLARSSL_HAVE_IPV6 was removed (always enabled).
2977817466cbSJens Wiklander   * Removed test program o_p_test, the script compat.sh does more.
2978817466cbSJens Wiklander   * Removed test program ssl_test, superseded by ssl-opt.sh.
2979817466cbSJens Wiklander   * Removed helper script active-config.pl
2980817466cbSJens Wiklander
2981817466cbSJens WiklanderNew deprecations
2982817466cbSJens Wiklander   * md_init_ctx() is deprecated in favour of md_setup(), that adds a third
2983817466cbSJens Wiklander     argument (allowing memory savings if HMAC is not used)
2984817466cbSJens Wiklander
2985817466cbSJens WiklanderSemi-API changes (technically public, morally private)
2986817466cbSJens Wiklander   * Renamed a few headers to include _internal in the name. Those headers are
2987817466cbSJens Wiklander     not supposed to be included by users.
2988817466cbSJens Wiklander   * Changed md_info_t into an opaque structure (use md_get_xxx() accessors).
2989817466cbSJens Wiklander   * Changed pk_info_t into an opaque structure.
2990817466cbSJens Wiklander   * Changed cipher_base_t into an opaque structure.
2991817466cbSJens Wiklander   * Removed sig_oid2 and rename sig_oid1 to sig_oid in x509_crt and x509_crl.
2992817466cbSJens Wiklander   * x509_crt.key_usage changed from unsigned char to unsigned int.
2993817466cbSJens Wiklander   * Removed r and s from ecdsa_context
2994817466cbSJens Wiklander   * Removed mode from des_context and des3_context
2995817466cbSJens Wiklander
2996817466cbSJens WiklanderDefault behavior changes
2997817466cbSJens Wiklander   * The default minimum TLS version is now TLS 1.0.
2998817466cbSJens Wiklander   * RC4 is now blacklisted by default in the SSL/TLS layer, and excluded from the
2999817466cbSJens Wiklander     default ciphersuite list returned by ssl_list_ciphersuites()
3000817466cbSJens Wiklander   * Support for receiving SSLv2 ClientHello is now disabled by default at
3001817466cbSJens Wiklander     compile time.
3002817466cbSJens Wiklander   * The default authmode for SSL/TLS clients is now REQUIRED.
3003817466cbSJens Wiklander   * Support for RSA_ALT contexts in the PK layer is now optional. Since is is
3004817466cbSJens Wiklander     enabled in the default configuration, this is only noticeable if using a
3005817466cbSJens Wiklander     custom config.h
3006817466cbSJens Wiklander   * Default DHM parameters server-side upgraded from 1024 to 2048 bits.
3007817466cbSJens Wiklander   * A minimum RSA key size of 2048 bits is now enforced during ceritificate
3008817466cbSJens Wiklander     chain verification.
3009817466cbSJens Wiklander   * Negotiation of truncated HMAC is now disabled by default on server too.
3010817466cbSJens Wiklander   * The following functions are now case-sensitive:
3011817466cbSJens Wiklander     mbedtls_cipher_info_from_string()
3012817466cbSJens Wiklander     mbedtls_ecp_curve_info_from_name()
3013817466cbSJens Wiklander     mbedtls_md_info_from_string()
3014817466cbSJens Wiklander     mbedtls_ssl_ciphersuite_from_string()
3015817466cbSJens Wiklander     mbedtls_version_check_feature()
3016817466cbSJens Wiklander
3017817466cbSJens WiklanderRequirement changes
3018817466cbSJens Wiklander   * The minimum MSVC version required is now 2010 (better C99 support).
3019817466cbSJens Wiklander   * The NET layer now unconditionnaly relies on getaddrinfo() and select().
3020817466cbSJens Wiklander   * Compiler is required to support C99 types such as long long and uint32_t.
3021817466cbSJens Wiklander
3022817466cbSJens WiklanderAPI changes from the 1.4 preview branch
3023817466cbSJens Wiklander   * ssl_set_bio_timeout() was removed, split into mbedtls_ssl_set_bio() with
3024817466cbSJens Wiklander     new prototype, and mbedtls_ssl_set_read_timeout().
3025817466cbSJens Wiklander   * The following functions now return void:
3026817466cbSJens Wiklander     mbedtls_ssl_conf_transport()
3027817466cbSJens Wiklander     mbedtls_ssl_conf_max_version()
3028817466cbSJens Wiklander     mbedtls_ssl_conf_min_version()
3029817466cbSJens Wiklander   * DTLS no longer hard-depends on TIMING_C, but uses a callback interface
3030817466cbSJens Wiklander     instead, see mbedtls_ssl_set_timer_cb(), with the Timing module providing
3031817466cbSJens Wiklander     an example implementation, see mbedtls_timing_delay_context and
3032817466cbSJens Wiklander     mbedtls_timing_set/get_delay().
3033817466cbSJens Wiklander   * With UDP sockets, it is no longer necessary to call net_bind() again
3034817466cbSJens Wiklander     after a successful net_accept().
3035817466cbSJens Wiklander
3036817466cbSJens WiklanderChanges
3037817466cbSJens Wiklander   * mbedtls_ctr_drbg_random() and mbedtls_hmac_drbg_random() are now
3038817466cbSJens Wiklander     thread-safe if MBEDTLS_THREADING_C is enabled.
3039817466cbSJens Wiklander   * Reduced ROM fooprint of SHA-256 and added an option to reduce it even
3040817466cbSJens Wiklander     more (at the expense of performance) MBEDTLS_SHA256_SMALLER.
3041817466cbSJens Wiklander
3042817466cbSJens Wiklander= mbed TLS 1.3 branch
3043817466cbSJens Wiklander
3044817466cbSJens WiklanderSecurity
3045817466cbSJens Wiklander   * With authmode set to SSL_VERIFY_OPTIONAL, verification of keyUsage and
3046817466cbSJens Wiklander     extendedKeyUsage on the leaf certificate was lost (results not accessible
3047817466cbSJens Wiklander     via ssl_get_verify_results()).
3048817466cbSJens Wiklander   * Add countermeasure against "Lucky 13 strikes back" cache-based attack,
3049817466cbSJens Wiklander     https://dl.acm.org/citation.cfm?id=2714625
3050817466cbSJens Wiklander
3051817466cbSJens WiklanderFeatures
3052817466cbSJens Wiklander   * Improve ECC performance by using more efficient doubling formulas
3053817466cbSJens Wiklander     (contributed by Peter Dettman).
3054817466cbSJens Wiklander   * Add x509_crt_verify_info() to display certificate verification results.
3055817466cbSJens Wiklander   * Add support for reading DH parameters with privateValueLength included
3056817466cbSJens Wiklander     (contributed by Daniel Kahn Gillmor).
3057817466cbSJens Wiklander   * Add support for bit strings in X.509 names (request by Fredrik Axelsson).
3058817466cbSJens Wiklander   * Add support for id-at-uniqueIdentifier in X.509 names.
3059817466cbSJens Wiklander   * Add support for overriding snprintf() (except on Windows) and exit() in
3060817466cbSJens Wiklander     the platform layer.
3061817466cbSJens Wiklander   * Add an option to use macros instead of function pointers in the platform
3062817466cbSJens Wiklander     layer (helps get rid of unwanted references).
3063817466cbSJens Wiklander   * Improved Makefiles for Windows targets by fixing library targets and making
3064817466cbSJens Wiklander     cross-compilation easier (thanks to Alon Bar-Lev).
3065817466cbSJens Wiklander   * The benchmark program also prints heap usage for public-key primitives
3066817466cbSJens Wiklander     if POLARSSL_MEMORY_BUFFER_ALLOC_C and POLARSSL_MEMORY_DEBUG are defined.
3067817466cbSJens Wiklander   * New script ecc-heap.sh helps measuring the impact of ECC parameters on
3068817466cbSJens Wiklander     speed and RAM (heap only for now) usage.
3069817466cbSJens Wiklander   * New script memory.sh helps measuring the ROM and RAM requirements of two
3070817466cbSJens Wiklander     reduced configurations (PSK-CCM and NSA suite B).
3071817466cbSJens Wiklander   * Add config flag POLARSSL_DEPRECATED_WARNING (off by default) to produce
3072817466cbSJens Wiklander     warnings on use of deprecated functions (with GCC and Clang only).
3073817466cbSJens Wiklander   * Add config flag POLARSSL_DEPRECATED_REMOVED (off by default) to produce
3074817466cbSJens Wiklander     errors on use of deprecated functions.
3075817466cbSJens Wiklander
3076817466cbSJens WiklanderBugfix
3077817466cbSJens Wiklander   * Fix compile errors with PLATFORM_NO_STD_FUNCTIONS.
3078817466cbSJens Wiklander   * Fix compile error with PLATFORM_EXIT_ALT (thanks to Rafał Przywara).
3079817466cbSJens Wiklander   * Fix bug in entropy.c when THREADING_C is also enabled that caused
3080817466cbSJens Wiklander     entropy_free() to crash (thanks to Rafał Przywara).
3081817466cbSJens Wiklander   * Fix memory leak when gcm_setkey() and ccm_setkey() are used more than
3082817466cbSJens Wiklander     once on the same context.
3083817466cbSJens Wiklander   * Fix bug in ssl_mail_client when password is longer that username (found
3084817466cbSJens Wiklander     by Bruno Pape).
3085817466cbSJens Wiklander   * Fix undefined behaviour (memcmp( NULL, NULL, 0 );) in X.509 modules
3086817466cbSJens Wiklander     (detected by Clang's 3.6 UBSan).
3087817466cbSJens Wiklander   * mpi_size() and mpi_msb() would segfault when called on an mpi that is
3088817466cbSJens Wiklander     initialized but not set (found by pravic).
3089817466cbSJens Wiklander   * Fix detection of support for getrandom() on Linux (reported by syzzer) by
3090817466cbSJens Wiklander     doing it at runtime (using uname) rather that compile time.
3091817466cbSJens Wiklander   * Fix handling of symlinks by "make install" (found by Gaël PORTAY).
3092817466cbSJens Wiklander   * Fix potential NULL pointer dereference (not trigerrable remotely) when
3093817466cbSJens Wiklander     ssl_write() is called before the handshake is finished (introduced in
3094817466cbSJens Wiklander     1.3.10) (first reported by Martin Blumenstingl).
3095817466cbSJens Wiklander   * Fix bug in pk_parse_key() that caused some valid private EC keys to be
3096817466cbSJens Wiklander     rejected.
3097817466cbSJens Wiklander   * Fix bug in Via Padlock support (found by Nikos Mavrogiannopoulos).
3098817466cbSJens Wiklander   * Fix thread safety bug in RSA operations (found by Fredrik Axelsson).
3099817466cbSJens Wiklander   * Fix hardclock() (only used in the benchmarking program) with some
3100817466cbSJens Wiklander     versions of mingw64 (found by kxjhlele).
3101817466cbSJens Wiklander   * Fix warnings from mingw64 in timing.c (found by kxjklele).
3102817466cbSJens Wiklander   * Fix potential unintended sign extension in asn1_get_len() on 64-bit
3103817466cbSJens Wiklander     platforms.
3104817466cbSJens Wiklander   * Fix potential memory leak in ssl_set_psk() (found by Mansour Moufid).
3105817466cbSJens Wiklander   * Fix compile error when POLARSSL_SSL_DISABLE_RENEGOTATION and
3106817466cbSJens Wiklander     POLARSSL_SSL_SSESSION_TICKETS where both enabled in config.h (introduced
3107817466cbSJens Wiklander     in 1.3.10).
3108817466cbSJens Wiklander   * Add missing extern "C" guard in aesni.h (reported by amir zamani).
3109817466cbSJens Wiklander   * Add missing dependency on SHA-256 in some x509 programs (reported by
3110817466cbSJens Wiklander     Gergely Budai).
3111817466cbSJens Wiklander   * Fix bug related to ssl_set_curves(): the client didn't check that the
3112817466cbSJens Wiklander     curve picked by the server was actually allowed.
3113817466cbSJens Wiklander
3114817466cbSJens WiklanderChanges
3115817466cbSJens Wiklander   * Remove bias in mpi_gen_prime (contributed by Pascal Junod).
3116817466cbSJens Wiklander   * Remove potential sources of timing variations (some contributed by Pascal
3117817466cbSJens Wiklander     Junod).
3118817466cbSJens Wiklander   * Options POLARSSL_HAVE_INT8 and POLARSSL_HAVE_INT16 are deprecated.
3119817466cbSJens Wiklander   * Enabling POLARSSL_NET_C without POLARSSL_HAVE_IPV6 is deprecated.
3120817466cbSJens Wiklander   * compat-1.2.h and openssl.h are deprecated.
3121817466cbSJens Wiklander   * Adjusting/overriding CFLAGS and LDFLAGS with the make build system is now
3122817466cbSJens Wiklander     more flexible (warning: OFLAGS is not used any more) (see the README)
3123817466cbSJens Wiklander     (contributed by Alon Bar-Lev).
3124817466cbSJens Wiklander   * ssl_set_own_cert() no longer calls pk_check_pair() since the
3125817466cbSJens Wiklander     performance impact was bad for some users (this was introduced in 1.3.10).
3126817466cbSJens Wiklander   * Move from SHA-1 to SHA-256 in example programs using signatures
3127817466cbSJens Wiklander     (suggested by Thorsten Mühlfelder).
3128817466cbSJens Wiklander   * Remove some unneeded inclusions of header files from the standard library
3129817466cbSJens Wiklander     "minimize" others (eg use stddef.h if only size_t is needed).
3130817466cbSJens Wiklander   * Change #include lines in test files to use double quotes instead of angle
3131817466cbSJens Wiklander     brackets for uniformity with the rest of the code.
3132817466cbSJens Wiklander   * Remove dependency on sscanf() in X.509 parsing modules.
3133817466cbSJens Wiklander
3134817466cbSJens Wiklander= mbed TLS 1.3.10 released 2015-02-09
3135817466cbSJens WiklanderSecurity
3136817466cbSJens Wiklander   * NULL pointer dereference in the buffer-based allocator when the buffer is
3137817466cbSJens Wiklander     full and polarssl_free() is called (found by Mark Hasemeyer)
3138817466cbSJens Wiklander     (only possible if POLARSSL_MEMORY_BUFFER_ALLOC_C is enabled, which it is
3139817466cbSJens Wiklander     not by default).
3140817466cbSJens Wiklander   * Fix remotely-triggerable uninitialised pointer dereference caused by
3141817466cbSJens Wiklander     crafted X.509 certificate (TLS server is not affected if it doesn't ask for a
3142817466cbSJens Wiklander     client certificate) (found using Codenomicon Defensics).
3143817466cbSJens Wiklander   * Fix remotely-triggerable memory leak caused by crafted X.509 certificates
3144817466cbSJens Wiklander     (TLS server is not affected if it doesn't ask for a client certificate)
3145817466cbSJens Wiklander     (found using Codenomicon Defensics).
3146817466cbSJens Wiklander   * Fix potential stack overflow while parsing crafted X.509 certificates
3147817466cbSJens Wiklander     (TLS server is not affected if it doesn't ask for a client certificate)
3148817466cbSJens Wiklander     (found using Codenomicon Defensics).
3149817466cbSJens Wiklander   * Fix timing difference that could theoretically lead to a
3150817466cbSJens Wiklander     Bleichenbacher-style attack in the RSA and RSA-PSK key exchanges
3151817466cbSJens Wiklander     (reported by Sebastian Schinzel).
3152817466cbSJens Wiklander
3153817466cbSJens WiklanderFeatures
3154817466cbSJens Wiklander   * Add support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv).
3155817466cbSJens Wiklander   * Add support for Extended Master Secret (draft-ietf-tls-session-hash).
3156817466cbSJens Wiklander   * Add support for Encrypt-then-MAC (RFC 7366).
3157817466cbSJens Wiklander   * Add function pk_check_pair() to test if public and private keys match.
3158817466cbSJens Wiklander   * Add x509_crl_parse_der().
3159817466cbSJens Wiklander   * Add compile-time option POLARSSL_X509_MAX_INTERMEDIATE_CA to limit the
3160817466cbSJens Wiklander     length of an X.509 verification chain.
3161817466cbSJens Wiklander   * Support for renegotiation can now be disabled at compile-time
3162817466cbSJens Wiklander   * Support for 1/n-1 record splitting, a countermeasure against BEAST.
3163817466cbSJens Wiklander   * Certificate selection based on signature hash, preferring SHA-1 over SHA-2
3164817466cbSJens Wiklander     for pre-1.2 clients when multiple certificates are available.
3165817466cbSJens Wiklander   * Add support for getrandom() syscall on recent Linux kernels with Glibc or
3166817466cbSJens Wiklander     a compatible enough libc (eg uClibc).
3167817466cbSJens Wiklander   * Add ssl_set_arc4_support() to make it easier to disable RC4 at runtime
3168817466cbSJens Wiklander     while using the default ciphersuite list.
3169817466cbSJens Wiklander   * Added new error codes and debug messages about selection of
3170817466cbSJens Wiklander     ciphersuite/certificate.
3171817466cbSJens Wiklander
3172817466cbSJens WiklanderBugfix
3173817466cbSJens Wiklander   * Stack buffer overflow if ctr_drbg_update() is called with too large
3174817466cbSJens Wiklander     add_len (found by Jean-Philippe Aumasson) (not triggerable remotely).
3175817466cbSJens Wiklander   * Possible buffer overflow of length at most POLARSSL_MEMORY_ALIGN_MULTIPLE
3176817466cbSJens Wiklander     if memory_buffer_alloc_init() was called with buf not aligned and len not
3177817466cbSJens Wiklander     a multiple of POLARSSL_MEMORY_ALIGN_MULTIPLE (not triggerable remotely).
3178817466cbSJens Wiklander   * User set CFLAGS were ignored by Cmake with gcc (introduced in 1.3.9, found
3179817466cbSJens Wiklander     by Julian Ospald).
3180817466cbSJens Wiklander   * Fix potential undefined behaviour in Camellia.
3181817466cbSJens Wiklander   * Fix potential failure in ECDSA signatures when POLARSSL_ECP_MAX_BITS is a
3182817466cbSJens Wiklander     multiple of 8 (found by Gergely Budai).
3183817466cbSJens Wiklander   * Fix unchecked return code in x509_crt_parse_path() on Windows (found by
3184817466cbSJens Wiklander     Peter Vaskovic).
3185817466cbSJens Wiklander   * Fix assembly selection for MIPS64 (thanks to James Cowgill).
3186817466cbSJens Wiklander   * ssl_get_verify_result() now works even if the handshake was aborted due
3187817466cbSJens Wiklander     to a failed verification (found by Fredrik Axelsson).
3188817466cbSJens Wiklander   * Skip writing and parsing signature_algorithm extension if none of the
3189817466cbSJens Wiklander     key exchanges enabled needs certificates. This fixes a possible interop
3190817466cbSJens Wiklander     issue with some servers when a zero-length extension was sent. (Reported
3191817466cbSJens Wiklander     by Peter Dettman.)
3192817466cbSJens Wiklander   * On a 0-length input, base64_encode() did not correctly set output length
3193817466cbSJens Wiklander     (found by Hendrik van den Boogaard).
3194817466cbSJens Wiklander
3195817466cbSJens WiklanderChanges
3196817466cbSJens Wiklander   * Use deterministic nonces for AEAD ciphers in TLS by default (possible to
3197817466cbSJens Wiklander     switch back to random with POLARSSL_SSL_AEAD_RANDOM_IV in config.h).
3198817466cbSJens Wiklander   * Blind RSA private operations even when POLARSSL_RSA_NO_CRT is defined.
3199817466cbSJens Wiklander   * ssl_set_own_cert() now returns an error on key-certificate mismatch.
3200817466cbSJens Wiklander   * Forbid repeated extensions in X.509 certificates.
3201817466cbSJens Wiklander   * debug_print_buf() now prints a text view in addition to hexadecimal.
3202817466cbSJens Wiklander   * A specific error is now returned when there are ciphersuites in common
3203817466cbSJens Wiklander     but none of them is usable due to external factors such as no certificate
3204817466cbSJens Wiklander     with a suitable (extended)KeyUsage or curve or no PSK set.
3205817466cbSJens Wiklander   * It is now possible to disable negotiation of truncated HMAC server-side
3206817466cbSJens Wiklander     at runtime with ssl_set_truncated_hmac().
3207817466cbSJens Wiklander   * Example programs for SSL client and server now disable SSLv3 by default.
3208817466cbSJens Wiklander   * Example programs for SSL client and server now disable RC4 by default.
3209817466cbSJens Wiklander   * Use platform.h in all test suites and programs.
3210817466cbSJens Wiklander
3211817466cbSJens Wiklander= PolarSSL 1.3.9 released 2014-10-20
3212817466cbSJens WiklanderSecurity
3213817466cbSJens Wiklander   * Lowest common hash was selected from signature_algorithms extension in
3214817466cbSJens Wiklander     TLS 1.2 (found by Darren Bane) (introduced in 1.3.8).
3215817466cbSJens Wiklander   * Remotely-triggerable memory leak when parsing some X.509 certificates
3216817466cbSJens Wiklander     (server is not affected if it doesn't ask for a client certificate)
3217817466cbSJens Wiklander     (found using Codenomicon Defensics).
3218817466cbSJens Wiklander   * Remotely-triggerable memory leak when parsing crafted ClientHello
3219817466cbSJens Wiklander     (not affected if ECC support was compiled out) (found using Codenomicon
3220817466cbSJens Wiklander     Defensics).
3221817466cbSJens Wiklander
3222817466cbSJens WiklanderBugfix
3223817466cbSJens Wiklander   * Support escaping of commas in x509_string_to_names()
3224817466cbSJens Wiklander   * Fix compile error in ssl_pthread_server (found by Julian Ospald).
3225817466cbSJens Wiklander   * Fix net_accept() regarding non-blocking sockets (found by Luca Pesce).
3226817466cbSJens Wiklander   * Don't print uninitialised buffer in ssl_mail_client (found by Marc Abel).
3227817466cbSJens Wiklander   * Fix warnings from Clang's scan-build (contributed by Alfred Klomp).
3228817466cbSJens Wiklander   * Fix compile error in timing.c when POLARSSL_NET_C and POLARSSL_SELFTEST
3229817466cbSJens Wiklander     are defined but not POLARSSL_HAVE_TIME (found by Stephane Di Vito).
3230817466cbSJens Wiklander   * Remove non-existent file from VS projects (found by Peter Vaskovic).
3231817466cbSJens Wiklander   * ssl_read() could return non-application data records on server while
3232817466cbSJens Wiklander     renegotation was pending, and on client when a HelloRequest was received.
3233817466cbSJens Wiklander   * Server-initiated renegotiation would fail with non-blocking I/O if the
3234817466cbSJens Wiklander     write callback returned WANT_WRITE when requesting renegotiation.
3235817466cbSJens Wiklander   * ssl_close_notify() could send more than one message in some circumstances
3236817466cbSJens Wiklander     with non-blocking I/O.
3237817466cbSJens Wiklander   * Fix compiler warnings on iOS (found by Sander Niemeijer).
3238817466cbSJens Wiklander   * x509_crt_parse() did not increase total_failed on PEM error
3239817466cbSJens Wiklander   * Fix compile error with armcc in mpi_is_prime()
3240817466cbSJens Wiklander   * Fix potential bad read in parsing ServerHello (found by Adrien
3241817466cbSJens Wiklander     Vialletelle).
3242817466cbSJens Wiklander
3243817466cbSJens WiklanderChanges
3244817466cbSJens Wiklander   * Ciphersuites using SHA-256 or SHA-384 now require TLS 1.x (there is no
3245817466cbSJens Wiklander     standard defining how to use SHA-2 with SSL 3.0).
3246817466cbSJens Wiklander   * Ciphersuites using RSA-PSK key exchange new require TLS 1.x (the spec is
3247817466cbSJens Wiklander     ambiguous on how to encode some packets with SSL 3.0).
3248817466cbSJens Wiklander   * Made buffer size in pk_write_(pub)key_pem() more dynamic, eg smaller if
3249817466cbSJens Wiklander     RSA is disabled, larger if POLARSSL_MPI_MAX_SIZE is larger.
3250817466cbSJens Wiklander   * ssl_read() now returns POLARSSL_ERR_NET_WANT_READ rather than
3251817466cbSJens Wiklander     POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE on harmless alerts.
3252817466cbSJens Wiklander   * POLARSSL_MPI_MAX_SIZE now defaults to 1024 in order to allow 8192 bits
3253817466cbSJens Wiklander     RSA keys.
3254817466cbSJens Wiklander   * Accept spaces at end of line or end of buffer in base64_decode().
3255817466cbSJens Wiklander   * X.509 certificates with more than one AttributeTypeAndValue per
3256817466cbSJens Wiklander     RelativeDistinguishedName are not accepted any more.
3257817466cbSJens Wiklander
3258817466cbSJens Wiklander= PolarSSL 1.3.8 released 2014-07-11
3259817466cbSJens WiklanderSecurity
3260817466cbSJens Wiklander   * Fix length checking for AEAD ciphersuites (found by Codenomicon).
3261817466cbSJens Wiklander     It was possible to crash the server (and client) using crafted messages
3262817466cbSJens Wiklander     when a GCM suite was chosen.
3263817466cbSJens Wiklander
3264817466cbSJens WiklanderFeatures
3265817466cbSJens Wiklander   * Add CCM module and cipher mode to Cipher Layer
3266817466cbSJens Wiklander   * Support for CCM and CCM_8 ciphersuites
3267817466cbSJens Wiklander   * Support for parsing and verifying RSASSA-PSS signatures in the X.509
3268817466cbSJens Wiklander     modules (certificates, CRLs and CSRs).
3269817466cbSJens Wiklander   * Blowfish in the cipher layer now supports variable length keys.
3270817466cbSJens Wiklander   * Add example config.h for PSK with CCM, optimized for low RAM usage.
3271817466cbSJens Wiklander   * Optimize for RAM usage in example config.h for NSA Suite B profile.
3272817466cbSJens Wiklander   * Add POLARSSL_REMOVE_ARC4_CIPHERSUITES to allow removing RC4 ciphersuites
3273817466cbSJens Wiklander     from the default list (inactive by default).
3274817466cbSJens Wiklander   * Add server-side enforcement of sent renegotiation requests
3275817466cbSJens Wiklander     (ssl_set_renegotiation_enforced())
3276817466cbSJens Wiklander   * Add SSL_CIPHERSUITES config.h flag to allow specifying a list of
3277817466cbSJens Wiklander     ciphersuites to use and save some memory if the list is small.
3278817466cbSJens Wiklander
3279817466cbSJens WiklanderChanges
3280817466cbSJens Wiklander   * Add LINK_WITH_PTHREAD option in CMake for explicit linking that is
3281817466cbSJens Wiklander     required on some platforms (e.g. OpenBSD)
3282817466cbSJens Wiklander   * Migrate zeroizing of data to polarssl_zeroize() instead of memset()
3283817466cbSJens Wiklander     against unwanted compiler optimizations
3284817466cbSJens Wiklander   * md_list() now returns hashes strongest first
3285817466cbSJens Wiklander   * Selection of hash for signing ServerKeyExchange in TLS 1.2 now picks
3286817466cbSJens Wiklander     strongest offered by client.
3287817466cbSJens Wiklander   * All public contexts have _init() and _free() functions now for simpler
3288817466cbSJens Wiklander     usage pattern
3289817466cbSJens Wiklander
3290817466cbSJens WiklanderBugfix
3291817466cbSJens Wiklander   * Fix in debug_print_msg()
3292817466cbSJens Wiklander   * Enforce alignment in the buffer allocator even if buffer is not aligned
3293817466cbSJens Wiklander   * Remove less-than-zero checks on unsigned numbers
3294817466cbSJens Wiklander   * Stricter check on SSL ClientHello internal sizes compared to actual packet
3295817466cbSJens Wiklander     size (found by TrustInSoft)
3296817466cbSJens Wiklander   * Fix WSAStartup() return value check (found by Peter Vaskovic)
3297817466cbSJens Wiklander   * Other minor issues (found by Peter Vaskovic)
3298817466cbSJens Wiklander   * Fix symlink command for cross compiling with CMake (found by Andre
3299817466cbSJens Wiklander     Heinecke)
3300817466cbSJens Wiklander   * Fix DER output of gen_key app (found by Gergely Budai)
3301817466cbSJens Wiklander   * Very small records were incorrectly rejected when truncated HMAC was in
3302817466cbSJens Wiklander     use with some ciphersuites and versions (RC4 in all versions, CBC with
3303817466cbSJens Wiklander     versions < TLS 1.1).
3304817466cbSJens Wiklander   * Very large records using more than 224 bytes of padding were incorrectly
3305817466cbSJens Wiklander     rejected with CBC-based ciphersuites and TLS >= 1.1
3306817466cbSJens Wiklander   * Very large records using less padding could cause a buffer overread of up
3307817466cbSJens Wiklander     to 32 bytes with CBC-based ciphersuites and TLS >= 1.1
3308817466cbSJens Wiklander   * Restore ability to use a v1 cert as a CA if trusted locally. (This had
3309817466cbSJens Wiklander     been removed in 1.3.6.)
3310817466cbSJens Wiklander   * Restore ability to locally trust a self-signed cert that is not a proper
3311817466cbSJens Wiklander     CA for use as an end entity certificate. (This had been removed in
3312817466cbSJens Wiklander     1.3.6.)
3313817466cbSJens Wiklander   * Fix preprocessor checks for bn_mul PPC asm (found by Barry K. Nathan).
3314817466cbSJens Wiklander   * Use \n\t rather than semicolons for bn_mul asm, since some assemblers
3315817466cbSJens Wiklander     interpret semicolons as comment delimiters (found by Barry K. Nathan).
3316817466cbSJens Wiklander   * Fix off-by-one error in parsing Supported Point Format extension that
3317817466cbSJens Wiklander     caused some handshakes to fail.
3318817466cbSJens Wiklander   * Fix possible miscomputation of the premaster secret with DHE-PSK key
3319817466cbSJens Wiklander     exchange that caused some handshakes to fail with other implementations.
3320817466cbSJens Wiklander     (Failure rate <= 1/255 with common DHM moduli.)
3321817466cbSJens Wiklander   * Disable broken Sparc64 bn_mul assembly (found by Florian Obser).
3322817466cbSJens Wiklander   * Fix base64_decode() to return and check length correctly (in case of
3323817466cbSJens Wiklander     tight buffers)
3324817466cbSJens Wiklander   * Fix mpi_write_string() to write "00" as hex output for empty MPI (found
3325817466cbSJens Wiklander     by Hui Dong)
3326817466cbSJens Wiklander
3327817466cbSJens Wiklander= PolarSSL 1.3.7 released on 2014-05-02
3328817466cbSJens WiklanderFeatures
3329817466cbSJens Wiklander   * debug_set_log_mode() added to determine raw or full logging
3330817466cbSJens Wiklander   * debug_set_threshold() added to ignore messages over threshold level
3331817466cbSJens Wiklander   * version_check_feature() added to check for compile-time options at
3332817466cbSJens Wiklander     run-time
3333817466cbSJens Wiklander
3334817466cbSJens WiklanderChanges
3335817466cbSJens Wiklander   * POLARSSL_CONFIG_OPTIONS has been removed. All values are individually
3336817466cbSJens Wiklander     checked and filled in the relevant module headers
3337817466cbSJens Wiklander   * Debug module only outputs full lines instead of parts
3338817466cbSJens Wiklander   * Better support for the different Attribute Types from IETF PKIX (RFC 5280)
3339817466cbSJens Wiklander   * AES-NI now compiles with "old" assemblers too
3340817466cbSJens Wiklander   * Ciphersuites based on RC4 now have the lowest priority by default
3341817466cbSJens Wiklander
3342817466cbSJens WiklanderBugfix
3343817466cbSJens Wiklander   * Only iterate over actual certificates in ssl_write_certificate_request()
3344817466cbSJens Wiklander     (found by Matthew Page)
3345817466cbSJens Wiklander   * Typos in platform.c and pkcs11.c (found by Daniel Phillips and Steffan
3346817466cbSJens Wiklander     Karger)
3347817466cbSJens Wiklander   * cert_write app should use subject of issuer certificate as issuer of cert
3348817466cbSJens Wiklander   * Fix false reject in padding check in ssl_decrypt_buf() for CBC
3349817466cbSJens Wiklander     ciphersuites, for full SSL frames of data.
3350817466cbSJens Wiklander   * Improve interoperability by not writing extension length in ClientHello /
3351817466cbSJens Wiklander     ServerHello when no extensions are present (found by Matthew Page)
3352817466cbSJens Wiklander   * rsa_check_pubkey() now allows an E up to N
3353817466cbSJens Wiklander   * On OpenBSD, use arc4random_buf() instead of rand() to prevent warnings
3354817466cbSJens Wiklander   * mpi_fill_random() was creating numbers larger than requested on
3355817466cbSJens Wiklander     big-endian platform when size was not an integer number of limbs
3356817466cbSJens Wiklander   * Fix dependencies issues in X.509 test suite.
3357817466cbSJens Wiklander   * Some parts of ssl_tls.c were compiled even when the module was disabled.
3358817466cbSJens Wiklander   * Fix detection of DragonflyBSD in net.c (found by Markus Pfeiffer)
3359817466cbSJens Wiklander   * Fix detection of Clang on some Apple platforms with CMake
3360817466cbSJens Wiklander     (found by Barry K. Nathan)
3361817466cbSJens Wiklander
3362817466cbSJens Wiklander= PolarSSL 1.3.6 released on 2014-04-11
3363817466cbSJens Wiklander
3364817466cbSJens WiklanderFeatures
3365817466cbSJens Wiklander   * Support for the ALPN SSL extension
3366817466cbSJens Wiklander   * Add option 'use_dev_random' to gen_key application
3367817466cbSJens Wiklander   * Enable verification of the keyUsage extension for CA and leaf
3368817466cbSJens Wiklander     certificates (POLARSSL_X509_CHECK_KEY_USAGE)
3369817466cbSJens Wiklander   * Enable verification of the extendedKeyUsage extension
3370817466cbSJens Wiklander     (POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE)
3371817466cbSJens Wiklander
3372817466cbSJens WiklanderChanges
3373817466cbSJens Wiklander   * x509_crt_info() now prints information about parsed extensions as well
3374817466cbSJens Wiklander   * pk_verify() now returns a specific error code when the signature is valid
3375817466cbSJens Wiklander     but shorter than the supplied length.
3376817466cbSJens Wiklander   * Use UTC time to check certificate validity.
3377817466cbSJens Wiklander   * Reject certificates with times not in UTC, per RFC 5280.
3378817466cbSJens Wiklander
3379817466cbSJens WiklanderSecurity
3380817466cbSJens Wiklander   * Avoid potential timing leak in ecdsa_sign() by blinding modular division.
3381817466cbSJens Wiklander     (Found by Watson Ladd.)
3382817466cbSJens Wiklander   * The notAfter date of some certificates was no longer checked since 1.3.5.
3383817466cbSJens Wiklander     This affects certificates in the user-supplied chain except the top
3384817466cbSJens Wiklander     certificate. If the user-supplied chain contains only one certificates,
3385817466cbSJens Wiklander     it is not affected (ie, its notAfter date is properly checked).
3386817466cbSJens Wiklander   * Prevent potential NULL pointer dereference in ssl_read_record() (found by
3387817466cbSJens Wiklander     TrustInSoft)
3388817466cbSJens Wiklander
3389817466cbSJens WiklanderBugfix
3390817466cbSJens Wiklander   * The length of various ClientKeyExchange messages was not properly checked.
3391817466cbSJens Wiklander   * Some example server programs were not sending the close_notify alert.
3392817466cbSJens Wiklander   * Potential memory leak in mpi_exp_mod() when error occurs during
3393817466cbSJens Wiklander     calculation of RR.
3394817466cbSJens Wiklander   * Fixed malloc/free default #define in platform.c (found by Gergely Budai).
3395817466cbSJens Wiklander   * Fixed type which made POLARSSL_ENTROPY_FORCE_SHA256 uneffective (found by
3396817466cbSJens Wiklander     Gergely Budai).
3397817466cbSJens Wiklander   * Fix #include path in ecdsa.h which wasn't accepted by some compilers.
3398817466cbSJens Wiklander     (found by Gergely Budai)
3399817466cbSJens Wiklander   * Fix compile errors when POLARSSL_ERROR_STRERROR_BC is undefined (found by
3400817466cbSJens Wiklander     Shuo Chen).
3401817466cbSJens Wiklander   * oid_get_numeric_string() used to truncate the output without returning an
3402817466cbSJens Wiklander     error if the output buffer was just 1 byte too small.
3403817466cbSJens Wiklander   * dhm_parse_dhm() (hence dhm_parse_dhmfile()) did not set dhm->len.
3404817466cbSJens Wiklander   * Calling pk_debug() on an RSA-alt key would segfault.
3405817466cbSJens Wiklander   * pk_get_size() and pk_get_len() were off by a factor 8 for RSA-alt keys.
3406817466cbSJens Wiklander   * Potential buffer overwrite in pem_write_buffer() because of low length
3407817466cbSJens Wiklander     indication (found by Thijs Alkemade)
3408817466cbSJens Wiklander   * EC curves constants, which should be only in ROM since 1.3.3, were also
3409817466cbSJens Wiklander     stored in RAM due to missing 'const's (found by Gergely Budai).
3410817466cbSJens Wiklander
3411817466cbSJens Wiklander= PolarSSL 1.3.5 released on 2014-03-26
3412817466cbSJens WiklanderFeatures
3413817466cbSJens Wiklander   * HMAC-DRBG as a separate module
3414817466cbSJens Wiklander   * Option to set the Curve preference order (disabled by default)
3415817466cbSJens Wiklander   * Single Platform compatilibity layer (for memory / printf / fprintf)
3416817466cbSJens Wiklander   * Ability to provide alternate timing implementation
3417817466cbSJens Wiklander   * Ability to force the entropy module to use SHA-256 as its basis
3418817466cbSJens Wiklander     (POLARSSL_ENTROPY_FORCE_SHA256)
3419817466cbSJens Wiklander   * Testing script ssl-opt.sh added for testing 'live' ssl option
3420817466cbSJens Wiklander     interoperability against OpenSSL and PolarSSL
3421817466cbSJens Wiklander   * Support for reading EC keys that use SpecifiedECDomain in some cases.
3422817466cbSJens Wiklander   * Entropy module now supports seed writing and reading
3423817466cbSJens Wiklander
3424817466cbSJens WiklanderChanges
3425817466cbSJens Wiklander   * Deprecated the Memory layer
3426817466cbSJens Wiklander   * entropy_add_source(), entropy_update_manual() and entropy_gather()
3427817466cbSJens Wiklander     now thread-safe if POLARSSL_THREADING_C defined
3428817466cbSJens Wiklander   * Improvements to the CMake build system, contributed by Julian Ospald.
3429817466cbSJens Wiklander   * Work around a bug of the version of Clang shipped by Apple with Mavericks
3430817466cbSJens Wiklander     that prevented bignum.c from compiling. (Reported by Rafael Baptista.)
3431817466cbSJens Wiklander   * Revamped the compat.sh interoperatibility script to include support for
3432817466cbSJens Wiklander     testing against GnuTLS
3433817466cbSJens Wiklander   * Deprecated ssl_set_own_cert_rsa() and ssl_set_own_cert_rsa_alt()
3434817466cbSJens Wiklander   * Improvements to tests/Makefile, contributed by Oden Eriksson.
3435817466cbSJens Wiklander
3436817466cbSJens WiklanderSecurity
3437817466cbSJens Wiklander   * Forbid change of server certificate during renegotiation to prevent
3438817466cbSJens Wiklander     "triple handshake" attack when authentication mode is 'optional' (the
3439817466cbSJens Wiklander     attack was already impossible when authentication is required).
3440817466cbSJens Wiklander   * Check notBefore timestamp of certificates and CRLs from the future.
3441817466cbSJens Wiklander   * Forbid sequence number wrapping
3442817466cbSJens Wiklander   * Fixed possible buffer overflow with overlong PSK
3443817466cbSJens Wiklander   * Possible remotely-triggered out-of-bounds memory access fixed (found by
3444817466cbSJens Wiklander     TrustInSoft)
3445817466cbSJens Wiklander
3446817466cbSJens WiklanderBugfix
3447817466cbSJens Wiklander   * ecp_gen_keypair() does more tries to prevent failure because of
3448817466cbSJens Wiklander     statistics
3449817466cbSJens Wiklander   * Fixed bug in RSA PKCS#1 v1.5 "reversed" operations
3450817466cbSJens Wiklander   * Fixed testing with out-of-source builds using cmake
3451817466cbSJens Wiklander   * Fixed version-major intolerance in server
3452817466cbSJens Wiklander   * Fixed CMake symlinking on out-of-source builds
3453817466cbSJens Wiklander   * Fixed dependency issues in test suite
3454817466cbSJens Wiklander   * Programs rsa_sign_pss and rsa_verify_pss were not using PSS since 1.3.0
3455817466cbSJens Wiklander   * Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by
3456817466cbSJens Wiklander     Alex Wilson.)
3457817466cbSJens Wiklander   * ssl_cache was creating entries when max_entries=0 if TIMING_C was enabled.
3458817466cbSJens Wiklander   * m_sleep() was sleeping twice too long on most Unix platforms.
3459817466cbSJens Wiklander   * Fixed bug with session tickets and non-blocking I/O in the unlikely case
3460817466cbSJens Wiklander     send() would return an EAGAIN error when sending the ticket.
3461817466cbSJens Wiklander   * ssl_cache was leaking memory when reusing a timed out entry containing a
3462817466cbSJens Wiklander     client certificate.
3463817466cbSJens Wiklander   * ssl_srv was leaking memory when client presented a timed out ticket
3464817466cbSJens Wiklander     containing a client certificate
3465817466cbSJens Wiklander   * ssl_init() was leaving a dirty pointer in ssl_context if malloc of
3466817466cbSJens Wiklander     out_ctr failed
3467817466cbSJens Wiklander   * ssl_handshake_init() was leaving dirty pointers in subcontexts if malloc
3468817466cbSJens Wiklander     of one of them failed
3469817466cbSJens Wiklander   * Fix typo in rsa_copy() that impacted PKCS#1 v2 contexts
3470817466cbSJens Wiklander   * x509_get_current_time() uses localtime_r() to prevent thread issues
3471817466cbSJens Wiklander
3472817466cbSJens Wiklander= PolarSSL 1.3.4 released on 2014-01-27
3473817466cbSJens WiklanderFeatures
3474817466cbSJens Wiklander   * Support for the Koblitz curves: secp192k1, secp224k1, secp256k1
3475817466cbSJens Wiklander   * Support for RIPEMD-160
3476817466cbSJens Wiklander   * Support for AES CFB8 mode
3477817466cbSJens Wiklander   * Support for deterministic ECDSA (RFC 6979)
3478817466cbSJens Wiklander
3479817466cbSJens WiklanderBugfix
3480817466cbSJens Wiklander   * Potential memory leak in bignum_selftest()
3481817466cbSJens Wiklander   * Replaced expired test certificate
3482817466cbSJens Wiklander   * ssl_mail_client now terminates lines with CRLF, instead of LF
3483817466cbSJens Wiklander   * net module handles timeouts on blocking sockets better (found by Tilman
3484817466cbSJens Wiklander     Sauerbeck)
3485817466cbSJens Wiklander   * Assembly format fixes in bn_mul.h
3486817466cbSJens Wiklander
3487817466cbSJens WiklanderSecurity
3488817466cbSJens Wiklander   * Missing MPI_CHK calls added around unguarded mpi calls (found by
3489817466cbSJens Wiklander     TrustInSoft)
3490817466cbSJens Wiklander
3491817466cbSJens Wiklander= PolarSSL 1.3.3 released on 2013-12-31
3492817466cbSJens WiklanderFeatures
3493817466cbSJens Wiklander   * EC key generation support in gen_key app
3494817466cbSJens Wiklander   * Support for adhering to client ciphersuite order preference
3495817466cbSJens Wiklander     (POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE)
3496817466cbSJens Wiklander   * Support for Curve25519
3497817466cbSJens Wiklander   * Support for ECDH-RSA and ECDH-ECDSA key exchanges and ciphersuites
3498817466cbSJens Wiklander   * Support for IPv6 in the NET module
3499817466cbSJens Wiklander   * AES-NI support for AES, AES-GCM and AES key scheduling
3500817466cbSJens Wiklander   * SSL Pthread-based server example added (ssl_pthread_server)
3501817466cbSJens Wiklander
3502817466cbSJens WiklanderChanges
3503817466cbSJens Wiklander   * gen_prime() speedup
3504817466cbSJens Wiklander   * Speedup of ECP multiplication operation
3505817466cbSJens Wiklander   * Relaxed some SHA2 ciphersuite's version requirements
3506817466cbSJens Wiklander   * Dropped use of readdir_r() instead of readdir() with threading support
3507817466cbSJens Wiklander   * More constant-time checks in the RSA module
3508817466cbSJens Wiklander   * Split off curves from ecp.c into ecp_curves.c
3509817466cbSJens Wiklander   * Curves are now stored fully in ROM
3510817466cbSJens Wiklander   * Memory usage optimizations in ECP module
3511817466cbSJens Wiklander   * Removed POLARSSL_THREADING_DUMMY
3512817466cbSJens Wiklander
3513817466cbSJens WiklanderBugfix
3514817466cbSJens Wiklander   * Fixed bug in mpi_set_bit() on platforms where t_uint is wider than int
3515817466cbSJens Wiklander   * Fixed X.509 hostname comparison (with non-regular characters)
3516817466cbSJens Wiklander   * SSL now gracefully handles missing RNG
3517817466cbSJens Wiklander   * Missing defines / cases for RSA_PSK key exchange
3518817466cbSJens Wiklander   * crypt_and_hash app checks MAC before final decryption
3519817466cbSJens Wiklander   * Potential memory leak in ssl_ticket_keys_init()
3520817466cbSJens Wiklander   * Memory leak in benchmark application
3521817466cbSJens Wiklander   * Fixed x509_crt_parse_path() bug on Windows platforms
3522817466cbSJens Wiklander   * Added missing MPI_CHK() around some statements in mpi_div_mpi() (found by
3523817466cbSJens Wiklander     TrustInSoft)
3524817466cbSJens Wiklander   * Fixed potential overflow in certificate size verification in
3525817466cbSJens Wiklander     ssl_write_certificate() (found by TrustInSoft)
3526817466cbSJens Wiklander
3527817466cbSJens WiklanderSecurity
3528817466cbSJens Wiklander   * Possible remotely-triggered out-of-bounds memory access fixed (found by
3529817466cbSJens Wiklander     TrustInSoft)
3530817466cbSJens Wiklander
3531817466cbSJens Wiklander= PolarSSL 1.3.2 released on 2013-11-04
3532817466cbSJens WiklanderFeatures
3533817466cbSJens Wiklander   * PK tests added to test framework
3534817466cbSJens Wiklander   * Added optional optimization for NIST MODP curves (POLARSSL_ECP_NIST_OPTIM)
3535817466cbSJens Wiklander   * Support for Camellia-GCM mode and ciphersuites
3536817466cbSJens Wiklander
3537817466cbSJens WiklanderChanges
3538817466cbSJens Wiklander   * Padding checks in cipher layer are now constant-time
3539817466cbSJens Wiklander   * Value comparisons in SSL layer are now constant-time
3540817466cbSJens Wiklander   * Support for serialNumber, postalAddress and postalCode in X509 names
3541817466cbSJens Wiklander   * SSL Renegotiation was refactored
3542817466cbSJens Wiklander
3543817466cbSJens WiklanderBugfix
3544817466cbSJens Wiklander   * More stringent checks in cipher layer
3545817466cbSJens Wiklander   * Server does not send out extensions not advertised by client
3546817466cbSJens Wiklander   * Prevent possible alignment warnings on casting from char * to 'aligned *'
3547817466cbSJens Wiklander   * Misc fixes and additions to dependency checks
3548817466cbSJens Wiklander   * Const correctness
3549817466cbSJens Wiklander   * cert_write with selfsign should use issuer_name as subject_name
3550817466cbSJens Wiklander   * Fix ECDSA corner case: missing reduction mod N (found by DualTachyon)
3551817466cbSJens Wiklander   * Defines to handle UEFI environment under MSVC
3552817466cbSJens Wiklander   * Server-side initiated renegotiations send HelloRequest
3553817466cbSJens Wiklander
3554817466cbSJens Wiklander= PolarSSL 1.3.1 released on 2013-10-15
3555817466cbSJens WiklanderFeatures
3556817466cbSJens Wiklander   * Support for Brainpool curves and TLS ciphersuites (RFC 7027)
3557817466cbSJens Wiklander   * Support for ECDHE-PSK key-exchange and ciphersuites
3558817466cbSJens Wiklander   * Support for RSA-PSK key-exchange and ciphersuites
3559817466cbSJens Wiklander
3560817466cbSJens WiklanderChanges
3561817466cbSJens Wiklander   * RSA blinding locks for a smaller amount of time
3562817466cbSJens Wiklander   * TLS compression only allocates working buffer once
3563817466cbSJens Wiklander   * Introduced POLARSSL_HAVE_READDIR_R for systems without it
3564817466cbSJens Wiklander   * config.h is more script-friendly
3565817466cbSJens Wiklander
3566817466cbSJens WiklanderBugfix
3567817466cbSJens Wiklander   * Missing MSVC defines added
3568817466cbSJens Wiklander   * Compile errors with POLARSSL_RSA_NO_CRT
3569817466cbSJens Wiklander   * Header files with 'polarssl/'
3570817466cbSJens Wiklander   * Const correctness
3571817466cbSJens Wiklander   * Possible naming collision in dhm_context
3572817466cbSJens Wiklander   * Better support for MSVC
3573817466cbSJens Wiklander   * threading_set_alt() name
3574817466cbSJens Wiklander   * Added missing x509write_crt_set_version()
3575817466cbSJens Wiklander
3576817466cbSJens Wiklander= PolarSSL 1.3.0 released on 2013-10-01
3577817466cbSJens WiklanderFeatures
3578817466cbSJens Wiklander   * Elliptic Curve Cryptography module added
3579817466cbSJens Wiklander   * Elliptic Curve Diffie Hellman module added
3580817466cbSJens Wiklander   * Ephemeral Elliptic Curve Diffie Hellman support for SSL/TLS
3581817466cbSJens Wiklander    (ECDHE-based ciphersuites)
3582817466cbSJens Wiklander   * Ephemeral Elliptic Curve Digital Signature Algorithm support for SSL/TLS
3583817466cbSJens Wiklander    (ECDSA-based ciphersuites)
3584817466cbSJens Wiklander   * Ability to specify allowed ciphersuites based on the protocol version.
3585817466cbSJens Wiklander   * PSK and DHE-PSK based ciphersuites added
3586817466cbSJens Wiklander   * Memory allocation abstraction layer added
3587817466cbSJens Wiklander   * Buffer-based memory allocator added (no malloc() / free() / HEAP usage)
3588817466cbSJens Wiklander   * Threading abstraction layer added (dummy / pthread / alternate)
3589817466cbSJens Wiklander   * Public Key abstraction layer added
3590817466cbSJens Wiklander   * Parsing Elliptic Curve keys
3591817466cbSJens Wiklander   * Parsing Elliptic Curve certificates
3592817466cbSJens Wiklander   * Support for max_fragment_length extension (RFC 6066)
3593817466cbSJens Wiklander   * Support for truncated_hmac extension (RFC 6066)
3594817466cbSJens Wiklander   * Support for zeros-and-length (ANSI X.923) padding, one-and-zeros
3595817466cbSJens Wiklander     (ISO/IEC 7816-4) padding and zero padding in the cipher layer
3596817466cbSJens Wiklander   * Support for session tickets (RFC 5077)
3597817466cbSJens Wiklander   * Certificate Request (CSR) generation with extensions (key_usage,
3598817466cbSJens Wiklander     ns_cert_type)
3599817466cbSJens Wiklander   * X509 Certificate writing with extensions (basic_constraints,
3600817466cbSJens Wiklander     issuer_key_identifier, etc)
3601817466cbSJens Wiklander   * Optional blinding for RSA, DHM and EC
3602817466cbSJens Wiklander   * Support for multiple active certificate / key pairs in SSL servers for
3603817466cbSJens Wiklander     the same host (Not to be confused with SNI!)
3604817466cbSJens Wiklander
3605817466cbSJens WiklanderChanges
3606817466cbSJens Wiklander   * Ability to enable / disable SSL v3 / TLS 1.0 / TLS 1.1 / TLS 1.2
3607817466cbSJens Wiklander     individually
3608817466cbSJens Wiklander   * Introduced separate SSL Ciphersuites module that is based on
3609817466cbSJens Wiklander     Cipher and MD information
3610817466cbSJens Wiklander   * Internals for SSL module adapted to have separate IV pointer that is
3611817466cbSJens Wiklander     dynamically set (Better support for hardware acceleration)
3612817466cbSJens Wiklander   * Moved all OID functionality to a separate module. RSA function
3613817466cbSJens Wiklander     prototypes for the RSA sign and verify functions changed as a result
3614817466cbSJens Wiklander   * Split up the GCM module into a starts/update/finish cycle
3615817466cbSJens Wiklander   * Client and server now filter sent and accepted ciphersuites on minimum
3616817466cbSJens Wiklander     and maximum protocol version
3617817466cbSJens Wiklander   * Ability to disable server_name extension (RFC 6066)
3618817466cbSJens Wiklander   * Renamed error_strerror() to the less conflicting polarssl_strerror()
3619817466cbSJens Wiklander     (Ability to keep old as well with POLARSSL_ERROR_STRERROR_BC)
3620817466cbSJens Wiklander   * SHA2 renamed to SHA256, SHA4 renamed to SHA512 and functions accordingly
3621817466cbSJens Wiklander   * All RSA operations require a random generator for blinding purposes
3622817466cbSJens Wiklander   * X509 core refactored
3623817466cbSJens Wiklander   * x509_crt_verify() now case insensitive for cn (RFC 6125 6.4)
3624817466cbSJens Wiklander   * Also compiles / runs without time-based functions (!POLARSSL_HAVE_TIME)
3625817466cbSJens Wiklander   * Support faulty X509 v1 certificates with extensions
3626817466cbSJens Wiklander     (POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3)
3627817466cbSJens Wiklander
3628817466cbSJens WiklanderBugfix
3629817466cbSJens Wiklander   * Fixed parse error in ssl_parse_certificate_request()
3630817466cbSJens Wiklander   * zlib compression/decompression skipped on empty blocks
3631817466cbSJens Wiklander   * Support for AIX header locations in net.c module
3632817466cbSJens Wiklander   * Fixed file descriptor leaks
3633817466cbSJens Wiklander
3634817466cbSJens WiklanderSecurity
3635817466cbSJens Wiklander   * RSA blinding on CRT operations to counter timing attacks
3636817466cbSJens Wiklander     (found by Cyril Arnaud and Pierre-Alain Fouque)
3637817466cbSJens Wiklander
3638817466cbSJens Wiklander
3639817466cbSJens Wiklander= Version 1.2.14 released 2015-05-??
3640817466cbSJens Wiklander
3641817466cbSJens WiklanderSecurity
3642817466cbSJens Wiklander   * Fix potential invalid memory read in the server, that allows a client to
3643817466cbSJens Wiklander     crash it remotely (found by Caj Larsson).
3644817466cbSJens Wiklander   * Fix potential invalid memory read in certificate parsing, that allows a
3645817466cbSJens Wiklander     client to crash the server remotely if client authentication is enabled
3646817466cbSJens Wiklander     (found using Codenomicon Defensics).
3647817466cbSJens Wiklander   * Add countermeasure against "Lucky 13 strikes back" cache-based attack,
3648817466cbSJens Wiklander     https://dl.acm.org/citation.cfm?id=2714625
3649817466cbSJens Wiklander
3650817466cbSJens WiklanderBugfix
3651817466cbSJens Wiklander   * Fix bug in Via Padlock support (found by Nikos Mavrogiannopoulos).
3652817466cbSJens Wiklander   * Fix hardclock() (only used in the benchmarking program) with some
3653817466cbSJens Wiklander     versions of mingw64 (found by kxjhlele).
3654817466cbSJens Wiklander   * Fix warnings from mingw64 in timing.c (found by kxjklele).
3655817466cbSJens Wiklander   * Fix potential unintended sign extension in asn1_get_len() on 64-bit
3656817466cbSJens Wiklander     platforms (found with Coverity Scan).
3657817466cbSJens Wiklander
3658817466cbSJens Wiklander= Version 1.2.13 released 2015-02-16
3659817466cbSJens WiklanderNote: Although PolarSSL has been renamed to mbed TLS, no changes reflecting
3660817466cbSJens Wiklander      this will be made in the 1.2 branch at this point.
3661817466cbSJens Wiklander
3662817466cbSJens WiklanderSecurity
3663817466cbSJens Wiklander   * Fix remotely-triggerable uninitialised pointer dereference caused by
3664817466cbSJens Wiklander     crafted X.509 certificate (TLS server is not affected if it doesn't ask
3665817466cbSJens Wiklander     for a client certificate) (found using Codenomicon Defensics).
3666817466cbSJens Wiklander   * Fix remotely-triggerable memory leak caused by crafted X.509 certificates
3667817466cbSJens Wiklander     (TLS server is not affected if it doesn't ask for a client certificate)
3668817466cbSJens Wiklander     (found using Codenomicon Defensics).
3669817466cbSJens Wiklander   * Fix potential stack overflow while parsing crafted X.509 certificates
3670817466cbSJens Wiklander     (TLS server is not affected if it doesn't ask for a client certificate)
3671817466cbSJens Wiklander     found using Codenomicon Defensics).
3672817466cbSJens Wiklander   * Fix buffer overread of size 1 when parsing crafted X.509 certificates
3673817466cbSJens Wiklander     (TLS server is not affected if it doesn't ask for a client certificate).
3674817466cbSJens Wiklander
3675817466cbSJens WiklanderBugfix
3676817466cbSJens Wiklander   * Fix potential undefined behaviour in Camellia.
3677817466cbSJens Wiklander   * Fix memory leaks in PKCS#5 and PKCS#12.
3678817466cbSJens Wiklander   * Stack buffer overflow if ctr_drbg_update() is called with too large
3679817466cbSJens Wiklander     add_len (found by Jean-Philippe Aumasson) (not triggerable remotely).
3680817466cbSJens Wiklander   * Fix bug in MPI/bignum on s390/s390x (reported by Dan Horák) (introduced
3681817466cbSJens Wiklander     in 1.2.12).
3682817466cbSJens Wiklander   * Fix unchecked return code in x509_crt_parse_path() on Windows (found by
3683817466cbSJens Wiklander     Peter Vaskovic).
3684817466cbSJens Wiklander   * Fix assembly selection for MIPS64 (thanks to James Cowgill).
3685817466cbSJens Wiklander   * ssl_get_verify_result() now works even if the handshake was aborted due
3686817466cbSJens Wiklander     to a failed verification (found by Fredrik Axelsson).
3687817466cbSJens Wiklander   * Skip writing and parsing signature_algorithm extension if none of the
3688817466cbSJens Wiklander     key exchanges enabled needs certificates. This fixes a possible interop
3689817466cbSJens Wiklander     issue with some servers when a zero-length extension was sent. (Reported
3690817466cbSJens Wiklander     by Peter Dettman.)
3691817466cbSJens Wiklander   * On a 0-length input, base64_encode() did not correctly set output length
3692817466cbSJens Wiklander     (found by Hendrik van den Boogaard).
3693817466cbSJens Wiklander
3694817466cbSJens WiklanderChanges
3695817466cbSJens Wiklander   * Blind RSA private operations even when POLARSSL_RSA_NO_CRT is defined.
3696817466cbSJens Wiklander   * Forbid repeated extensions in X.509 certificates.
3697817466cbSJens Wiklander   * Add compile-time option POLARSSL_X509_MAX_INTERMEDIATE_CA to limit the
3698817466cbSJens Wiklander     length of an X.509 verification chain (default = 8).
3699817466cbSJens Wiklander= Version 1.2.12 released 2014-10-24
3700817466cbSJens Wiklander
3701817466cbSJens WiklanderSecurity
3702817466cbSJens Wiklander   * Remotely-triggerable memory leak when parsing some X.509 certificates
3703817466cbSJens Wiklander     (server is not affected if it doesn't ask for a client certificate).
3704817466cbSJens Wiklander     (Found using Codenomicon Defensics.)
3705817466cbSJens Wiklander
3706817466cbSJens WiklanderBugfix
3707817466cbSJens Wiklander   * Fix potential bad read in parsing ServerHello (found by Adrien
3708817466cbSJens Wiklander     Vialletelle).
3709817466cbSJens Wiklander   * ssl_close_notify() could send more than one message in some circumstances
3710817466cbSJens Wiklander     with non-blocking I/O.
3711817466cbSJens Wiklander   * x509_crt_parse() did not increase total_failed on PEM error
3712817466cbSJens Wiklander   * Fix compiler warnings on iOS (found by Sander Niemeijer).
3713817466cbSJens Wiklander   * Don't print uninitialised buffer in ssl_mail_client (found by Marc Abel).
3714817466cbSJens Wiklander   * Fix net_accept() regarding non-blocking sockets (found by Luca Pesce).
3715817466cbSJens Wiklander   * ssl_read() could return non-application data records on server while
3716817466cbSJens Wiklander     renegotation was pending, and on client when a HelloRequest was received.
3717817466cbSJens Wiklander   * Fix warnings from Clang's scan-build (contributed by Alfred Klomp).
3718817466cbSJens Wiklander
3719817466cbSJens WiklanderChanges
3720817466cbSJens Wiklander   * X.509 certificates with more than one AttributeTypeAndValue per
3721817466cbSJens Wiklander     RelativeDistinguishedName are not accepted any more.
3722817466cbSJens Wiklander   * ssl_read() now returns POLARSSL_ERR_NET_WANT_READ rather than
3723817466cbSJens Wiklander     POLARSSL_ERR_SSL_UNEXPECTED_MESSAGE on harmless alerts.
3724817466cbSJens Wiklander   * Accept spaces at end of line or end of buffer in base64_decode().
3725817466cbSJens Wiklander
3726817466cbSJens Wiklander= Version 1.2.11 released 2014-07-11
3727817466cbSJens WiklanderFeatures
3728817466cbSJens Wiklander   * Entropy module now supports seed writing and reading
3729817466cbSJens Wiklander
3730817466cbSJens WiklanderChanges
3731817466cbSJens Wiklander   * Introduced POLARSSL_HAVE_READDIR_R for systems without it
3732817466cbSJens Wiklander   * Improvements to the CMake build system, contributed by Julian Ospald.
3733817466cbSJens Wiklander   * Work around a bug of the version of Clang shipped by Apple with Mavericks
3734817466cbSJens Wiklander     that prevented bignum.c from compiling. (Reported by Rafael Baptista.)
3735817466cbSJens Wiklander   * Improvements to tests/Makefile, contributed by Oden Eriksson.
3736817466cbSJens Wiklander   * Use UTC time to check certificate validity.
3737817466cbSJens Wiklander   * Reject certificates with times not in UTC, per RFC 5280.
3738817466cbSJens Wiklander   * Migrate zeroizing of data to polarssl_zeroize() instead of memset()
3739817466cbSJens Wiklander     against unwanted compiler optimizations
3740817466cbSJens Wiklander
3741817466cbSJens WiklanderSecurity
3742817466cbSJens Wiklander   * Forbid change of server certificate during renegotiation to prevent
3743817466cbSJens Wiklander     "triple handshake" attack when authentication mode is optional (the
3744817466cbSJens Wiklander     attack was already impossible when authentication is required).
3745817466cbSJens Wiklander   * Check notBefore timestamp of certificates and CRLs from the future.
3746817466cbSJens Wiklander   * Forbid sequence number wrapping
3747817466cbSJens Wiklander   * Prevent potential NULL pointer dereference in ssl_read_record() (found by
3748817466cbSJens Wiklander     TrustInSoft)
3749817466cbSJens Wiklander   * Fix length checking for AEAD ciphersuites (found by Codenomicon).
3750817466cbSJens Wiklander     It was possible to crash the server (and client) using crafted messages
3751817466cbSJens Wiklander     when a GCM suite was chosen.
3752817466cbSJens Wiklander
3753817466cbSJens WiklanderBugfix
3754817466cbSJens Wiklander   * Fixed X.509 hostname comparison (with non-regular characters)
3755817466cbSJens Wiklander   * SSL now gracefully handles missing RNG
3756817466cbSJens Wiklander   * crypt_and_hash app checks MAC before final decryption
3757817466cbSJens Wiklander   * Fixed x509_crt_parse_path() bug on Windows platforms
3758817466cbSJens Wiklander   * Added missing MPI_CHK() around some statements in mpi_div_mpi() (found by
3759817466cbSJens Wiklander     TrustInSoft)
3760817466cbSJens Wiklander   * Fixed potential overflow in certificate size verification in
3761817466cbSJens Wiklander     ssl_write_certificate() (found by TrustInSoft)
3762817466cbSJens Wiklander   * Fix ASM format in bn_mul.h
3763817466cbSJens Wiklander   * Potential memory leak in bignum_selftest()
3764817466cbSJens Wiklander   * Replaced expired test certificate
3765817466cbSJens Wiklander   * ssl_mail_client now terminates lines with CRLF, instead of LF
3766817466cbSJens Wiklander   * Fix bug in RSA PKCS#1 v1.5 "reversed" operations
3767817466cbSJens Wiklander   * Fixed testing with out-of-source builds using cmake
3768817466cbSJens Wiklander   * Fixed version-major intolerance in server
3769817466cbSJens Wiklander   * Fixed CMake symlinking on out-of-source builds
3770817466cbSJens Wiklander   * Bignum's MIPS-32 assembly was used on MIPS-64, causing chaos. (Found by
3771817466cbSJens Wiklander     Alex Wilson.)
3772817466cbSJens Wiklander   * ssl_init() was leaving a dirty pointer in ssl_context if malloc of
3773817466cbSJens Wiklander     out_ctr failed
3774817466cbSJens Wiklander   * ssl_handshake_init() was leaving dirty pointers in subcontexts if malloc
3775817466cbSJens Wiklander     of one of them failed
3776817466cbSJens Wiklander   * x509_get_current_time() uses localtime_r() to prevent thread issues
3777817466cbSJens Wiklander   * Some example server programs were not sending the close_notify alert.
3778817466cbSJens Wiklander   * Potential memory leak in mpi_exp_mod() when error occurs during
3779817466cbSJens Wiklander     calculation of RR.
3780817466cbSJens Wiklander   * Improve interoperability by not writing extension length in ClientHello
3781817466cbSJens Wiklander     when no extensions are present (found by Matthew Page)
3782817466cbSJens Wiklander   * rsa_check_pubkey() now allows an E up to N
3783817466cbSJens Wiklander   * On OpenBSD, use arc4random_buf() instead of rand() to prevent warnings
3784817466cbSJens Wiklander   * mpi_fill_random() was creating numbers larger than requested on
3785817466cbSJens Wiklander     big-endian platform when size was not an integer number of limbs
3786817466cbSJens Wiklander   * Fix detection of DragonflyBSD in net.c (found by Markus Pfeiffer)
3787817466cbSJens Wiklander   * Stricter check on SSL ClientHello internal sizes compared to actual packet
3788817466cbSJens Wiklander     size (found by TrustInSoft)
3789817466cbSJens Wiklander   * Fix preprocessor checks for bn_mul PPC asm (found by Barry K. Nathan).
3790817466cbSJens Wiklander   * Use \n\t rather than semicolons for bn_mul asm, since some assemblers
3791817466cbSJens Wiklander     interpret semicolons as comment delimiters (found by Barry K. Nathan).
3792817466cbSJens Wiklander   * Disable broken Sparc64 bn_mul assembly (found by Florian Obser).
3793817466cbSJens Wiklander   * Fix base64_decode() to return and check length correctly (in case of
3794817466cbSJens Wiklander     tight buffers)
3795817466cbSJens Wiklander
3796817466cbSJens Wiklander= Version 1.2.10 released 2013-10-07
3797817466cbSJens WiklanderChanges
3798817466cbSJens Wiklander   * Changed RSA blinding to a slower but thread-safe version
3799817466cbSJens Wiklander
3800817466cbSJens WiklanderBugfix
3801817466cbSJens Wiklander   * Fixed memory leak in RSA as a result of introduction of blinding
3802817466cbSJens Wiklander   * Fixed ssl_pkcs11_decrypt() prototype
3803817466cbSJens Wiklander   * Fixed MSVC project files
3804817466cbSJens Wiklander
3805817466cbSJens Wiklander= Version 1.2.9 released 2013-10-01
3806817466cbSJens WiklanderChanges
3807817466cbSJens Wiklander   * x509_verify() now case insensitive for cn (RFC 6125 6.4)
3808817466cbSJens Wiklander
3809817466cbSJens WiklanderBugfix
3810817466cbSJens Wiklander   * Fixed potential memory leak when failing to resume a session
3811817466cbSJens Wiklander   * Fixed potential file descriptor leaks (found by Remi Gacogne)
3812817466cbSJens Wiklander   * Minor fixes
3813817466cbSJens Wiklander
3814817466cbSJens WiklanderSecurity
3815817466cbSJens Wiklander   * Fixed potential heap buffer overflow on large hostname setting
3816817466cbSJens Wiklander   * Fixed potential negative value misinterpretation in load_file()
3817817466cbSJens Wiklander   * RSA blinding on CRT operations to counter timing attacks
3818817466cbSJens Wiklander     (found by Cyril Arnaud and Pierre-Alain Fouque)
3819817466cbSJens Wiklander
3820817466cbSJens Wiklander= Version 1.2.8 released 2013-06-19
3821817466cbSJens WiklanderFeatures
3822817466cbSJens Wiklander   * Parsing of PKCS#8 encrypted private key files
3823817466cbSJens Wiklander   * PKCS#12 PBE and derivation functions
3824817466cbSJens Wiklander   * Centralized module option values in config.h to allow user-defined
3825817466cbSJens Wiklander     settings without editing header files by using POLARSSL_CONFIG_OPTIONS
3826817466cbSJens Wiklander
3827817466cbSJens WiklanderChanges
3828817466cbSJens Wiklander   * HAVEGE random generator disabled by default
3829817466cbSJens Wiklander   * Internally split up x509parse_key() into a (PEM) handler function
3830817466cbSJens Wiklander     and specific DER parser functions for the PKCS#1 and unencrypted
3831817466cbSJens Wiklander     PKCS#8 private key formats
3832817466cbSJens Wiklander   * Added mechanism to provide alternative implementations for all
3833817466cbSJens Wiklander     symmetric cipher and hash algorithms (e.g. POLARSSL_AES_ALT in
3834817466cbSJens Wiklander     config.h)
3835817466cbSJens Wiklander   * PKCS#5 module added. Moved PBKDF2 functionality inside and deprecated
3836817466cbSJens Wiklander     old PBKDF2 module
3837817466cbSJens Wiklander
3838817466cbSJens WiklanderBugfix
3839817466cbSJens Wiklander   * Secure renegotiation extension should only be sent in case client
3840817466cbSJens Wiklander     supports secure renegotiation
3841817466cbSJens Wiklander   * Fixed offset for cert_type list in ssl_parse_certificate_request()
3842817466cbSJens Wiklander   * Fixed const correctness issues that have no impact on the ABI
3843817466cbSJens Wiklander   * x509parse_crt() now better handles PEM error situations
3844817466cbSJens Wiklander   * ssl_parse_certificate() now calls x509parse_crt_der() directly
3845817466cbSJens Wiklander     instead of the x509parse_crt() wrapper that can also parse PEM
3846817466cbSJens Wiklander     certificates
3847817466cbSJens Wiklander   * x509parse_crtpath() is now reentrant and uses more portable stat()
3848817466cbSJens Wiklander   * Fixed bignum.c and bn_mul.h to support Thumb2 and LLVM compiler
3849817466cbSJens Wiklander   * Fixed values for 2-key Triple DES in cipher layer
3850817466cbSJens Wiklander   * ssl_write_certificate_request() can handle empty ca_chain
3851817466cbSJens Wiklander
3852817466cbSJens WiklanderSecurity
3853817466cbSJens Wiklander   * A possible DoS during the SSL Handshake, due to faulty parsing of
3854817466cbSJens Wiklander     PEM-encoded certificates has been fixed (found by Jack Lloyd)
3855817466cbSJens Wiklander
3856817466cbSJens Wiklander= Version 1.2.7 released 2013-04-13
3857817466cbSJens WiklanderFeatures
3858817466cbSJens Wiklander   * Ability to specify allowed ciphersuites based on the protocol version.
3859817466cbSJens Wiklander
3860817466cbSJens WiklanderChanges
3861817466cbSJens Wiklander   * Default Blowfish keysize is now 128-bits
3862817466cbSJens Wiklander   * Test suites made smaller to accommodate Raspberry Pi
3863817466cbSJens Wiklander
3864817466cbSJens WiklanderBugfix
3865817466cbSJens Wiklander   * Fix for MPI assembly for ARM
3866817466cbSJens Wiklander   * GCM adapted to support sizes > 2^29
3867817466cbSJens Wiklander
3868817466cbSJens Wiklander= Version 1.2.6 released 2013-03-11
3869817466cbSJens WiklanderBugfix
3870817466cbSJens Wiklander   * Fixed memory leak in ssl_free() and ssl_reset() for active session
3871817466cbSJens Wiklander   * Corrected GCM counter incrementation to use only 32-bits instead of
3872817466cbSJens Wiklander     128-bits (found by Yawning Angel)
3873817466cbSJens Wiklander   * Fixes for 64-bit compilation with MS Visual Studio
3874817466cbSJens Wiklander   * Fixed net_bind() for specified IP addresses on little endian systems
3875817466cbSJens Wiklander   * Fixed assembly code for ARM (Thumb and regular) for some compilers
3876817466cbSJens Wiklander
3877817466cbSJens WiklanderChanges
3878817466cbSJens Wiklander   * Internally split up rsa_pkcs1_encrypt(), rsa_pkcs1_decrypt(),
3879817466cbSJens Wiklander     rsa_pkcs1_sign() and rsa_pkcs1_verify() to separate PKCS#1 v1.5 and
3880817466cbSJens Wiklander     PKCS#1 v2.1 functions
3881817466cbSJens Wiklander   * Added support for custom labels when using rsa_rsaes_oaep_encrypt()
3882817466cbSJens Wiklander     or rsa_rsaes_oaep_decrypt()
3883817466cbSJens Wiklander   * Re-added handling for SSLv2 Client Hello when the define
3884817466cbSJens Wiklander     POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO is set
3885817466cbSJens Wiklander   * The SSL session cache module (ssl_cache) now also retains peer_cert
3886817466cbSJens Wiklander     information (not the entire chain)
3887817466cbSJens Wiklander
3888817466cbSJens WiklanderSecurity
3889817466cbSJens Wiklander   * Removed further timing differences during SSL message decryption in
3890817466cbSJens Wiklander     ssl_decrypt_buf()
3891817466cbSJens Wiklander   * Removed timing differences due to bad padding from
3892817466cbSJens Wiklander     rsa_rsaes_pkcs1_v15_decrypt() and rsa_pkcs1_decrypt() for PKCS#1 v1.5
3893817466cbSJens Wiklander     operations
3894817466cbSJens Wiklander
3895817466cbSJens Wiklander= Version 1.2.5 released 2013-02-02
3896817466cbSJens WiklanderChanges
3897817466cbSJens Wiklander   * Allow enabling of dummy error_strerror() to support some use-cases
3898817466cbSJens Wiklander   * Debug messages about padding errors during SSL message decryption are
3899817466cbSJens Wiklander     disabled by default and can be enabled with POLARSSL_SSL_DEBUG_ALL
3900817466cbSJens Wiklander   * Sending of security-relevant alert messages that do not break
3901817466cbSJens Wiklander     interoperability can be switched on/off with the flag
3902817466cbSJens Wiklander     POLARSSL_SSL_ALL_ALERT_MESSAGES
3903817466cbSJens Wiklander
3904817466cbSJens WiklanderSecurity
3905817466cbSJens Wiklander   * Removed timing differences during SSL message decryption in
3906817466cbSJens Wiklander     ssl_decrypt_buf() due to badly formatted padding
3907817466cbSJens Wiklander
3908817466cbSJens Wiklander= Version 1.2.4 released 2013-01-25
3909817466cbSJens WiklanderChanges
3910817466cbSJens Wiklander   * More advanced SSL ciphersuite representation and moved to more dynamic
3911817466cbSJens Wiklander     SSL core
3912817466cbSJens Wiklander   * Added ssl_handshake_step() to allow single stepping the handshake process
3913817466cbSJens Wiklander
3914817466cbSJens WiklanderBugfix
3915817466cbSJens Wiklander   * Memory leak when using RSA_PKCS_V21 operations fixed
3916817466cbSJens Wiklander   * Handle future version properly in ssl_write_certificate_request()
3917817466cbSJens Wiklander   * Correctly handle CertificateRequest message in client for <= TLS 1.1
3918817466cbSJens Wiklander     without DN list
3919817466cbSJens Wiklander
3920817466cbSJens Wiklander= Version 1.2.3 released 2012-11-26
3921817466cbSJens WiklanderBugfix
3922817466cbSJens Wiklander   * Server not always sending correct CertificateRequest message
3923817466cbSJens Wiklander
3924817466cbSJens Wiklander= Version 1.2.2 released 2012-11-24
3925817466cbSJens WiklanderChanges
3926817466cbSJens Wiklander   * Added p_hw_data to ssl_context for context specific hardware acceleration
3927817466cbSJens Wiklander     data
3928817466cbSJens Wiklander   * During verify trust-CA is only checked for expiration and CRL presence
3929817466cbSJens Wiklander
3930817466cbSJens WiklanderBugfixes
3931817466cbSJens Wiklander   * Fixed client authentication compatibility
3932817466cbSJens Wiklander   * Fixed dependency on POLARSSL_SHA4_C in SSL modules
3933817466cbSJens Wiklander
3934817466cbSJens Wiklander= Version 1.2.1 released 2012-11-20
3935817466cbSJens WiklanderChanges
3936817466cbSJens Wiklander   * Depth that the certificate verify callback receives is now numbered
3937817466cbSJens Wiklander     bottom-up (Peer cert depth is 0)
3938817466cbSJens Wiklander
3939817466cbSJens WiklanderBugfixes
3940817466cbSJens Wiklander   * Fixes for MSVC6
3941817466cbSJens Wiklander   * Moved mpi_inv_mod() outside POLARSSL_GENPRIME
3942817466cbSJens Wiklander   * Allow R and A to point to same mpi in mpi_div_mpi (found by Manuel
3943817466cbSJens Wiklander     Pégourié-Gonnard)
3944817466cbSJens Wiklander   * Fixed possible segfault in mpi_shift_r() (found by Manuel
3945817466cbSJens Wiklander     Pégourié-Gonnard)
3946817466cbSJens Wiklander   * Added max length check for rsa_pkcs1_sign with PKCS#1 v2.1
3947817466cbSJens Wiklander
3948817466cbSJens Wiklander= Version 1.2.0 released 2012-10-31
3949817466cbSJens WiklanderFeatures
3950817466cbSJens Wiklander   * Added support for NULL cipher (POLARSSL_CIPHER_NULL_CIPHER) and weak
3951817466cbSJens Wiklander     ciphersuites (POLARSSL_ENABLE_WEAK_CIPHERSUITES). They are disabled by
3952817466cbSJens Wiklander     default!
3953817466cbSJens Wiklander   * Added support for wildcard certificates
3954817466cbSJens Wiklander   * Added support for multi-domain certificates through the X509 Subject
3955817466cbSJens Wiklander     Alternative Name extension
3956817466cbSJens Wiklander   * Added preliminary ASN.1 buffer writing support
3957817466cbSJens Wiklander   * Added preliminary X509 Certificate Request writing support
3958817466cbSJens Wiklander   * Added key_app_writer example application
3959817466cbSJens Wiklander   * Added cert_req example application
3960817466cbSJens Wiklander   * Added base Galois Counter Mode (GCM) for AES
3961817466cbSJens Wiklander   * Added TLS 1.2 support (RFC 5246)
3962817466cbSJens Wiklander   * Added GCM suites to TLS 1.2 (RFC 5288)
3963817466cbSJens Wiklander   * Added commandline error code convertor (util/strerror)
3964817466cbSJens Wiklander   * Added support for Hardware Acceleration hooking in SSL/TLS
3965817466cbSJens Wiklander   * Added OpenSSL / PolarSSL compatibility script (tests/compat.sh) and
3966817466cbSJens Wiklander     example application (programs/ssl/o_p_test) (requires OpenSSL)
3967817466cbSJens Wiklander   * Added X509 CA Path support
3968817466cbSJens Wiklander   * Added Thumb assembly optimizations
3969817466cbSJens Wiklander   * Added DEFLATE compression support as per RFC3749 (requires zlib)
3970817466cbSJens Wiklander   * Added blowfish algorithm (Generic and cipher layer)
3971817466cbSJens Wiklander   * Added PKCS#5 PBKDF2 key derivation function
3972817466cbSJens Wiklander   * Added Secure Renegotiation (RFC 5746)
3973817466cbSJens Wiklander   * Added predefined DHM groups from RFC 5114
3974817466cbSJens Wiklander   * Added simple SSL session cache implementation
3975817466cbSJens Wiklander   * Added ServerName extension parsing (SNI) at server side
3976817466cbSJens Wiklander   * Added option to add minimum accepted SSL/TLS protocol version
3977817466cbSJens Wiklander
3978817466cbSJens WiklanderChanges
3979817466cbSJens Wiklander   * Removed redundant POLARSSL_DEBUG_MSG define
3980817466cbSJens Wiklander   * AES code only check for Padlock once
3981817466cbSJens Wiklander   * Fixed const-correctness mpi_get_bit()
3982817466cbSJens Wiklander   * Documentation for mpi_lsb() and mpi_msb()
3983817466cbSJens Wiklander   * Moved out_msg to out_hdr + 32 to support hardware acceleration
3984817466cbSJens Wiklander   * Changed certificate verify behaviour to comply with RFC 6125 section 6.3
3985817466cbSJens Wiklander     to not match CN if subjectAltName extension is present (Closes ticket #56)
3986817466cbSJens Wiklander   * Cipher layer cipher_mode_t POLARSSL_MODE_CFB128 is renamed to
3987817466cbSJens Wiklander     POLARSSL_MODE_CFB, to also handle different block size CFB modes.
3988817466cbSJens Wiklander   * Removed handling for SSLv2 Client Hello (as per RFC 5246 recommendation)
3989817466cbSJens Wiklander   * Revamped session resumption handling
3990817466cbSJens Wiklander   * Generalized external private key implementation handling (like PKCS#11)
3991817466cbSJens Wiklander     in SSL/TLS
3992817466cbSJens Wiklander   * Revamped x509_verify() and the SSL f_vrfy callback implementations
3993817466cbSJens Wiklander   * Moved from unsigned long to fixed width uint32_t types throughout code
3994817466cbSJens Wiklander   * Renamed ciphersuites naming scheme to IANA reserved names
3995817466cbSJens Wiklander
3996817466cbSJens WiklanderBugfix
3997817466cbSJens Wiklander   * Fixed handling error in mpi_cmp_mpi() on longer B values (found by
3998817466cbSJens Wiklander     Hui Dong)
3999817466cbSJens Wiklander   * Fixed potential heap corruption in x509_name allocation
4000817466cbSJens Wiklander   * Fixed single RSA test that failed on Big Endian systems (Closes ticket #54)
4001817466cbSJens Wiklander   * mpi_exp_mod() now correctly handles negative base numbers (Closes ticket
4002817466cbSJens Wiklander     #52)
4003817466cbSJens Wiklander   * Handle encryption with private key and decryption with public key as per
4004817466cbSJens Wiklander     RFC 2313
4005817466cbSJens Wiklander   * Handle empty certificate subject names
4006817466cbSJens Wiklander   * Prevent reading over buffer boundaries on X509 certificate parsing
4007817466cbSJens Wiklander   * mpi_add_abs() now correctly handles adding short numbers to long numbers
4008817466cbSJens Wiklander     with carry rollover (found by Ruslan Yushchenko)
4009817466cbSJens Wiklander   * Handle existence of OpenSSL Trust Extensions at end of X.509 DER blob
4010817466cbSJens Wiklander   * Fixed MPI assembly for SPARC64 platform
4011817466cbSJens Wiklander
4012817466cbSJens WiklanderSecurity
4013817466cbSJens Wiklander   * Fixed potential memory zeroization on miscrafted RSA key (found by Eloi
4014817466cbSJens Wiklander     Vanderbeken)
4015817466cbSJens Wiklander
4016817466cbSJens Wiklander= Version 1.1.8 released on 2013-10-01
4017817466cbSJens WiklanderBugfix
4018817466cbSJens Wiklander   * Fixed potential memory leak when failing to resume a session
4019817466cbSJens Wiklander   * Fixed potential file descriptor leaks
4020817466cbSJens Wiklander
4021817466cbSJens WiklanderSecurity
4022817466cbSJens Wiklander   * Potential buffer-overflow for ssl_read_record() (independently found by
4023817466cbSJens Wiklander     both TrustInSoft and Paul Brodeur of Leviathan Security Group)
4024817466cbSJens Wiklander   * Potential negative value misinterpretation in load_file()
4025817466cbSJens Wiklander   * Potential heap buffer overflow on large hostname setting
4026817466cbSJens Wiklander
4027817466cbSJens Wiklander= Version 1.1.7 released on 2013-06-19
4028817466cbSJens WiklanderChanges
4029817466cbSJens Wiklander   * HAVEGE random generator disabled by default
4030817466cbSJens Wiklander
4031817466cbSJens WiklanderBugfix
4032817466cbSJens Wiklander   * x509parse_crt() now better handles PEM error situations
4033817466cbSJens Wiklander   * ssl_parse_certificate() now calls x509parse_crt_der() directly
4034817466cbSJens Wiklander     instead of the x509parse_crt() wrapper that can also parse PEM
4035817466cbSJens Wiklander     certificates
4036817466cbSJens Wiklander   * Fixed values for 2-key Triple DES in cipher layer
4037817466cbSJens Wiklander   * ssl_write_certificate_request() can handle empty ca_chain
4038817466cbSJens Wiklander
4039817466cbSJens WiklanderSecurity
4040817466cbSJens Wiklander   * A possible DoS during the SSL Handshake, due to faulty parsing of
4041817466cbSJens Wiklander     PEM-encoded certificates has been fixed (found by Jack Lloyd)
4042817466cbSJens Wiklander
4043817466cbSJens Wiklander= Version 1.1.6 released on 2013-03-11
4044817466cbSJens WiklanderBugfix
4045817466cbSJens Wiklander   * Fixed net_bind() for specified IP addresses on little endian systems
4046817466cbSJens Wiklander
4047817466cbSJens WiklanderChanges
4048817466cbSJens Wiklander   * Allow enabling of dummy error_strerror() to support some use-cases
4049817466cbSJens Wiklander   * Debug messages about padding errors during SSL message decryption are
4050817466cbSJens Wiklander     disabled by default and can be enabled with POLARSSL_SSL_DEBUG_ALL
4051817466cbSJens Wiklander
4052817466cbSJens WiklanderSecurity
4053817466cbSJens Wiklander   * Removed timing differences during SSL message decryption in
4054817466cbSJens Wiklander     ssl_decrypt_buf()
4055817466cbSJens Wiklander   * Removed timing differences due to bad padding from
4056817466cbSJens Wiklander     rsa_rsaes_pkcs1_v15_decrypt() and rsa_pkcs1_decrypt() for PKCS#1 v1.5
4057817466cbSJens Wiklander     operations
4058817466cbSJens Wiklander
4059817466cbSJens Wiklander= Version 1.1.5 released on 2013-01-16
4060817466cbSJens WiklanderBugfix
4061817466cbSJens Wiklander   * Fixed MPI assembly for SPARC64 platform
4062817466cbSJens Wiklander   * Handle existence of OpenSSL Trust Extensions at end of X.509 DER blob
4063817466cbSJens Wiklander   * mpi_add_abs() now correctly handles adding short numbers to long numbers
4064817466cbSJens Wiklander     with carry rollover
4065817466cbSJens Wiklander   * Moved mpi_inv_mod() outside POLARSSL_GENPRIME
4066817466cbSJens Wiklander   * Prevent reading over buffer boundaries on X509 certificate parsing
4067817466cbSJens Wiklander   * mpi_exp_mod() now correctly handles negative base numbers (Closes ticket
4068817466cbSJens Wiklander     #52)
4069817466cbSJens Wiklander   * Fixed possible segfault in mpi_shift_r() (found by Manuel
4070817466cbSJens Wiklander     Pégourié-Gonnard)
4071817466cbSJens Wiklander   * Allow R and A to point to same mpi in mpi_div_mpi (found by Manuel
4072817466cbSJens Wiklander     Pégourié-Gonnard)
4073817466cbSJens Wiklander   * Added max length check for rsa_pkcs1_sign with PKCS#1 v2.1
4074817466cbSJens Wiklander   * Memory leak when using RSA_PKCS_V21 operations fixed
4075817466cbSJens Wiklander   * Handle encryption with private key and decryption with public key as per
4076817466cbSJens Wiklander     RFC 2313
4077817466cbSJens Wiklander   * Fixes for MSVC6
4078817466cbSJens Wiklander
4079817466cbSJens WiklanderSecurity
4080817466cbSJens Wiklander   * Fixed potential memory zeroization on miscrafted RSA key (found by Eloi
4081817466cbSJens Wiklander     Vanderbeken)
4082817466cbSJens Wiklander
4083817466cbSJens Wiklander= Version 1.1.4 released on 2012-05-31
4084817466cbSJens WiklanderBugfix
4085817466cbSJens Wiklander   * Correctly handle empty SSL/TLS packets (Found by James Yonan)
4086817466cbSJens Wiklander   * Fixed potential heap corruption in x509_name allocation
4087817466cbSJens Wiklander   * Fixed single RSA test that failed on Big Endian systems (Closes ticket #54)
4088817466cbSJens Wiklander
4089817466cbSJens Wiklander= Version 1.1.3 released on 2012-04-29
4090817466cbSJens WiklanderBugfix
4091817466cbSJens Wiklander   * Fixed random MPI generation to not generate more size than requested.
4092817466cbSJens Wiklander
4093817466cbSJens Wiklander= Version 1.1.2 released on 2012-04-26
4094817466cbSJens WiklanderBugfix
4095817466cbSJens Wiklander   * Fixed handling error in mpi_cmp_mpi() on longer B values (found by
4096817466cbSJens Wiklander     Hui Dong)
4097817466cbSJens Wiklander
4098817466cbSJens WiklanderSecurity
4099817466cbSJens Wiklander   * Fixed potential memory corruption on miscrafted client messages (found by
4100817466cbSJens Wiklander     Frama-C team at CEA LIST)
4101817466cbSJens Wiklander   * Fixed generation of DHM parameters to correct length (found by Ruslan
4102817466cbSJens Wiklander     Yushchenko)
4103817466cbSJens Wiklander
4104817466cbSJens Wiklander= Version 1.1.1 released on 2012-01-23
4105817466cbSJens WiklanderBugfix
4106817466cbSJens Wiklander   * Check for failed malloc() in ssl_set_hostname() and x509_get_entries()
4107817466cbSJens Wiklander     (Closes ticket #47, found by Hugo Leisink)
4108817466cbSJens Wiklander   * Fixed issues with Intel compiler on 64-bit systems (Closes ticket #50)
4109817466cbSJens Wiklander   * Fixed multiple compiler warnings for VS6 and armcc
4110817466cbSJens Wiklander   * Fixed bug in CTR_CRBG selftest
4111817466cbSJens Wiklander
4112817466cbSJens Wiklander= Version 1.1.0 released on 2011-12-22
4113817466cbSJens WiklanderFeatures
4114817466cbSJens Wiklander   * Added ssl_session_reset() to allow better multi-connection pools of
4115817466cbSJens Wiklander     SSL contexts without needing to set all non-connection-specific
4116817466cbSJens Wiklander     data and pointers again. Adapted ssl_server to use this functionality.
4117817466cbSJens Wiklander   * Added ssl_set_max_version() to allow clients to offer a lower maximum
4118817466cbSJens Wiklander     supported version to a server to help buggy server implementations.
4119817466cbSJens Wiklander     (Closes ticket #36)
4120817466cbSJens Wiklander   * Added cipher_get_cipher_mode() and cipher_get_cipher_operation()
4121817466cbSJens Wiklander     introspection functions (Closes ticket #40)
4122817466cbSJens Wiklander   * Added CTR_DRBG based on AES-256-CTR (NIST SP 800-90) random generator
4123817466cbSJens Wiklander   * Added a generic entropy accumulator that provides support for adding
4124817466cbSJens Wiklander     custom entropy sources and added some generic and platform dependent
4125817466cbSJens Wiklander     entropy sources
4126817466cbSJens Wiklander
4127817466cbSJens WiklanderChanges
4128817466cbSJens Wiklander   * Documentation for AES and Camellia in modes CTR and CFB128 clarified.
4129817466cbSJens Wiklander   * Fixed rsa_encrypt and rsa_decrypt examples to use public key for
4130817466cbSJens Wiklander     encryption and private key for decryption. (Closes ticket #34)
4131817466cbSJens Wiklander   * Inceased maximum size of ASN1 length reads to 32-bits.
4132817466cbSJens Wiklander   * Added an EXPLICIT tag number parameter to x509_get_ext()
4133817466cbSJens Wiklander   * Added a separate CRL entry extension parsing function
4134817466cbSJens Wiklander   * Separated the ASN.1 parsing code from the X.509 specific parsing code.
4135817466cbSJens Wiklander     So now there is a module that is controlled with POLARSSL_ASN1_PARSE_C.
4136817466cbSJens Wiklander   * Changed the defined key-length of DES ciphers in cipher.h to include the
4137817466cbSJens Wiklander     parity bits, to prevent mistakes in copying data. (Closes ticket #33)
4138817466cbSJens Wiklander   * Loads of minimal changes to better support WINCE as a build target
4139817466cbSJens Wiklander     (Credits go to Marco Lizza)
4140817466cbSJens Wiklander   * Added POLARSSL_MPI_WINDOW_SIZE definition to allow easier time to memory
4141817466cbSJens Wiklander     trade-off
4142817466cbSJens Wiklander   * Introduced POLARSSL_MPI_MAX_SIZE and POLARSSL_MPI_MAX_BITS for MPI size
4143817466cbSJens Wiklander     management (Closes ticket #44)
4144817466cbSJens Wiklander   * Changed the used random function pointer to more flexible format. Renamed
4145817466cbSJens Wiklander     havege_rand() to havege_random() to prevent mistakes. Lots of changes as
4146817466cbSJens Wiklander     a consequence in library code and programs
4147817466cbSJens Wiklander   * Moved all examples programs to use the new entropy and CTR_DRBG
4148817466cbSJens Wiklander   * Added permissive certificate parsing to x509parse_crt() and
4149817466cbSJens Wiklander     x509parse_crtfile(). With permissive parsing the parsing does not stop on
4150817466cbSJens Wiklander     encountering a parse-error. Beware that the meaning of return values has
4151817466cbSJens Wiklander     changed!
4152817466cbSJens Wiklander   * All error codes are now negative. Even on mermory failures and IO errors.
4153817466cbSJens Wiklander
4154817466cbSJens WiklanderBugfix
4155817466cbSJens Wiklander   * Fixed faulty HMAC-MD2 implementation. Found by dibac. (Closes
4156817466cbSJens Wiklander     ticket #37)
4157817466cbSJens Wiklander   * Fixed a bug where the CRL parser expected an EXPLICIT ASN.1 tag
4158817466cbSJens Wiklander     before version numbers
4159817466cbSJens Wiklander   * Allowed X509 key usage parsing to accept 4 byte values instead of the
4160817466cbSJens Wiklander     standard 1 byte version sometimes used by Microsoft. (Closes ticket #38)
4161817466cbSJens Wiklander   * Fixed incorrect behaviour in case of RSASSA-PSS with a salt length
4162817466cbSJens Wiklander     smaller than the hash length. (Closes ticket #41)
4163817466cbSJens Wiklander   * If certificate serial is longer than 32 octets, serial number is now
4164817466cbSJens Wiklander     appended with '....' after first 28 octets
4165817466cbSJens Wiklander   * Improved build support for s390x and sparc64 in bignum.h
4166817466cbSJens Wiklander   * Fixed MS Visual C++ name clash with int64 in sha4.h
4167817466cbSJens Wiklander   * Corrected removal of leading "00:" in printing serial numbers in
4168817466cbSJens Wiklander     certificates and CRLs
4169817466cbSJens Wiklander
4170817466cbSJens Wiklander= Version 1.0.0 released on 2011-07-27
4171817466cbSJens WiklanderFeatures
4172817466cbSJens Wiklander   * Expanded cipher layer with support for CFB128 and CTR mode
4173817466cbSJens Wiklander   * Added rsa_encrypt and rsa_decrypt simple example programs.
4174817466cbSJens Wiklander
4175817466cbSJens WiklanderChanges
4176817466cbSJens Wiklander   * The generic cipher and message digest layer now have normal error
4177817466cbSJens Wiklander     codes instead of integers
4178817466cbSJens Wiklander
4179817466cbSJens WiklanderBugfix
4180817466cbSJens Wiklander   * Undid faulty bug fix in ssl_write() when flushing old data (Ticket
4181817466cbSJens Wiklander     #18)
4182817466cbSJens Wiklander
4183817466cbSJens Wiklander= Version 0.99-pre5 released on 2011-05-26
4184817466cbSJens WiklanderFeatures
4185817466cbSJens Wiklander   * Added additional Cipher Block Modes to symmetric ciphers
4186817466cbSJens Wiklander     (AES CTR, Camellia CTR, XTEA CBC) including the option to
4187817466cbSJens Wiklander     enable and disable individual modes when needed
4188817466cbSJens Wiklander   * Functions requiring File System functions can now be disabled
4189817466cbSJens Wiklander     by undefining POLARSSL_FS_IO
4190817466cbSJens Wiklander   * A error_strerror function() has been added to translate between
4191817466cbSJens Wiklander     error codes and their description.
4192817466cbSJens Wiklander   * Added mpi_get_bit() and mpi_set_bit() individual bit setter/getter
4193817466cbSJens Wiklander     functions.
4194817466cbSJens Wiklander   * Added ssl_mail_client and ssl_fork_server as example programs.
4195817466cbSJens Wiklander
4196817466cbSJens WiklanderChanges
4197817466cbSJens Wiklander   * Major argument / variable rewrite. Introduced use of size_t
4198817466cbSJens Wiklander     instead of int for buffer lengths and loop variables for
4199817466cbSJens Wiklander     better unsigned / signed use. Renamed internal bigint types
4200817466cbSJens Wiklander     t_int and t_dbl to t_uint and t_udbl in the process
4201817466cbSJens Wiklander   * mpi_init() and mpi_free() now only accept a single MPI
4202817466cbSJens Wiklander     argument and do not accept variable argument lists anymore.
4203817466cbSJens Wiklander   * The error codes have been remapped and combining error codes
4204817466cbSJens Wiklander     is now done with a PLUS instead of an OR as error codes
4205817466cbSJens Wiklander     used are negative.
4206817466cbSJens Wiklander   * Changed behaviour of net_read(), ssl_fetch_input() and ssl_recv().
4207817466cbSJens Wiklander     net_recv() now returns 0 on EOF instead of
4208817466cbSJens Wiklander     POLARSSL_ERR_NET_CONN_RESET. ssl_fetch_input() returns
4209817466cbSJens Wiklander     POLARSSL_ERR_SSL_CONN_EOF on an EOF from its f_recv() function.
4210817466cbSJens Wiklander     ssl_read() returns 0 if a POLARSSL_ERR_SSL_CONN_EOF is received
4211817466cbSJens Wiklander     after the handshake.
4212817466cbSJens Wiklander   * Network functions now return POLARSSL_ERR_NET_WANT_READ or
4213817466cbSJens Wiklander     POLARSSL_ERR_NET_WANT_WRITE instead of the ambiguous
4214817466cbSJens Wiklander     POLARSSL_ERR_NET_TRY_AGAIN
4215817466cbSJens Wiklander
4216817466cbSJens Wiklander= Version 0.99-pre4 released on 2011-04-01
4217817466cbSJens WiklanderFeatures
4218817466cbSJens Wiklander   * Added support for PKCS#1 v2.1 encoding and thus support
4219817466cbSJens Wiklander     for the RSAES-OAEP and RSASSA-PSS operations.
4220817466cbSJens Wiklander   * Reading of Public Key files incorporated into default x509
4221817466cbSJens Wiklander     functionality as well.
4222817466cbSJens Wiklander   * Added mpi_fill_random() for centralized filling of big numbers
4223817466cbSJens Wiklander     with random data (Fixed ticket #10)
4224817466cbSJens Wiklander
4225817466cbSJens WiklanderChanges
4226817466cbSJens Wiklander   * Debug print of MPI now removes leading zero octets and
4227817466cbSJens Wiklander     displays actual bit size of the value.
4228817466cbSJens Wiklander   * x509parse_key() (and as a consequence x509parse_keyfile())
4229817466cbSJens Wiklander     does not zeroize memory in advance anymore. Use rsa_init()
4230817466cbSJens Wiklander     before parsing a key or keyfile!
4231817466cbSJens Wiklander
4232817466cbSJens WiklanderBugfix
4233817466cbSJens Wiklander   * Debug output of MPI's now the same independent of underlying
4234817466cbSJens Wiklander     platform (32-bit / 64-bit) (Fixes ticket #19, found by Mads
4235817466cbSJens Wiklander     Kiilerich and Mihai Militaru)
4236817466cbSJens Wiklander   * Fixed bug in ssl_write() when flushing old data (Fixed ticket
4237817466cbSJens Wiklander     #18, found by Nikolay Epifanov)
4238817466cbSJens Wiklander   * Fixed proper handling of RSASSA-PSS verification with variable
4239817466cbSJens Wiklander     length salt lengths
4240817466cbSJens Wiklander
4241817466cbSJens Wiklander= Version 0.99-pre3 released on 2011-02-28
4242817466cbSJens WiklanderThis release replaces version 0.99-pre2 which had possible copyright issues.
4243817466cbSJens WiklanderFeatures
4244817466cbSJens Wiklander   * Parsing PEM private keys encrypted with DES and AES
4245817466cbSJens Wiklander     are now supported as well (Fixes ticket #5)
4246817466cbSJens Wiklander   * Added crl_app program to allow easy reading and
4247817466cbSJens Wiklander     printing of X509 CRLs from file
4248817466cbSJens Wiklander
4249817466cbSJens WiklanderChanges
4250817466cbSJens Wiklander   * Parsing of PEM files moved to separate module (Fixes
4251817466cbSJens Wiklander     ticket #13). Also possible to remove PEM support for
4252817466cbSJens Wiklander     systems only using DER encoding
4253817466cbSJens Wiklander
4254817466cbSJens WiklanderBugfixes
4255817466cbSJens Wiklander   * Corrected parsing of UTCTime dates before 1990 and
4256817466cbSJens Wiklander     after 1950
4257817466cbSJens Wiklander   * Support more exotic OID's when parsing certificates
4258817466cbSJens Wiklander     (found by Mads Kiilerich)
4259817466cbSJens Wiklander   * Support more exotic name representations when parsing
4260817466cbSJens Wiklander     certificates (found by Mads Kiilerich)
4261817466cbSJens Wiklander   * Replaced the expired test certificates
4262817466cbSJens Wiklander   * Do not bail out if no client certificate specified. Try
4263817466cbSJens Wiklander     to negotiate anonymous connection (Fixes ticket #12,
4264817466cbSJens Wiklander     found by Boris Krasnovskiy)
4265817466cbSJens Wiklander
4266817466cbSJens WiklanderSecurity fixes
4267817466cbSJens Wiklander   * Fixed a possible Man-in-the-Middle attack on the
4268817466cbSJens Wiklander     Diffie Hellman key exchange (thanks to Larry Highsmith,
4269817466cbSJens Wiklander     Subreption LLC)
4270817466cbSJens Wiklander
4271817466cbSJens Wiklander= Version 0.99-pre1 released on 2011-01-30
4272817466cbSJens WiklanderFeatures
4273817466cbSJens WiklanderNote: Most of these features have been donated by Fox-IT
4274817466cbSJens Wiklander   * Added Doxygen source code documentation parts
4275817466cbSJens Wiklander   * Added reading of DHM context from memory and file
4276817466cbSJens Wiklander   * Improved X509 certificate parsing to include extended
4277817466cbSJens Wiklander     certificate fields, including Key Usage
4278817466cbSJens Wiklander   * Improved certificate verification and verification
4279817466cbSJens Wiklander     against the available CRLs
4280817466cbSJens Wiklander   * Detection for DES weak keys and parity bits added
4281817466cbSJens Wiklander   * Improvements to support integration in other
4282817466cbSJens Wiklander     applications:
4283817466cbSJens Wiklander       + Added generic message digest and cipher wrapper
4284817466cbSJens Wiklander       + Improved information about current capabilities,
4285817466cbSJens Wiklander         status, objects and configuration
4286817466cbSJens Wiklander       + Added verification callback on certificate chain
4287817466cbSJens Wiklander         verification to allow external blacklisting
4288817466cbSJens Wiklander       + Additional example programs to show usage
4289817466cbSJens Wiklander   * Added support for PKCS#11 through the use of the
4290817466cbSJens Wiklander     libpkcs11-helper library
4291817466cbSJens Wiklander
4292817466cbSJens WiklanderChanges
4293817466cbSJens Wiklander   * x509parse_time_expired() checks time in addition to
4294817466cbSJens Wiklander     the existing date check
4295817466cbSJens Wiklander   * The ciphers member of ssl_context and the cipher member
4296817466cbSJens Wiklander     of ssl_session have been renamed to ciphersuites and
4297817466cbSJens Wiklander     ciphersuite respectively. This clarifies the difference
4298817466cbSJens Wiklander     with the generic cipher layer and is better naming
4299817466cbSJens Wiklander     altogether
4300817466cbSJens Wiklander
4301817466cbSJens Wiklander= Version 0.14.0 released on 2010-08-16
4302817466cbSJens WiklanderFeatures
4303817466cbSJens Wiklander   * Added support for SSL_EDH_RSA_AES_128_SHA and
4304817466cbSJens Wiklander     SSL_EDH_RSA_CAMELLIA_128_SHA ciphersuites
4305817466cbSJens Wiklander   * Added compile-time and run-time version information
4306817466cbSJens Wiklander   * Expanded ssl_client2 arguments for more flexibility
4307817466cbSJens Wiklander   * Added support for TLS v1.1
4308817466cbSJens Wiklander
4309817466cbSJens WiklanderChanges
4310817466cbSJens Wiklander   * Made Makefile cleaner
4311817466cbSJens Wiklander   * Removed dependency on rand() in rsa_pkcs1_encrypt().
4312817466cbSJens Wiklander     Now using random fuction provided to function and
4313817466cbSJens Wiklander     changed the prototype of rsa_pkcs1_encrypt(),
4314817466cbSJens Wiklander     rsa_init() and rsa_gen_key().
4315817466cbSJens Wiklander   * Some SSL defines were renamed in order to avoid
4316817466cbSJens Wiklander     future confusion
4317817466cbSJens Wiklander
4318817466cbSJens WiklanderBug fixes
4319817466cbSJens Wiklander   * Fixed CMake out of source build for tests (found by
4320817466cbSJens Wiklander     kkert)
4321817466cbSJens Wiklander   * rsa_check_private() now supports PKCS1v2 keys as well
4322817466cbSJens Wiklander   * Fixed deadlock in rsa_pkcs1_encrypt() on failing random
4323817466cbSJens Wiklander     generator
4324817466cbSJens Wiklander
4325817466cbSJens Wiklander= Version 0.13.1 released on 2010-03-24
4326817466cbSJens WiklanderBug fixes
4327817466cbSJens Wiklander   * Fixed Makefile in library that was mistakenly merged
4328817466cbSJens Wiklander   * Added missing const string fixes
4329817466cbSJens Wiklander
4330817466cbSJens Wiklander= Version 0.13.0 released on 2010-03-21
4331817466cbSJens WiklanderFeatures
4332817466cbSJens Wiklander   * Added option parsing for host and port selection to
4333817466cbSJens Wiklander     ssl_client2
4334817466cbSJens Wiklander   * Added support for GeneralizedTime in X509 parsing
4335817466cbSJens Wiklander   * Added cert_app program to allow easy reading and
4336817466cbSJens Wiklander     printing of X509 certificates from file or SSL
4337817466cbSJens Wiklander     connection.
4338817466cbSJens Wiklander
4339817466cbSJens WiklanderChanges
4340817466cbSJens Wiklander   * Added const correctness for main code base
4341817466cbSJens Wiklander   * X509 signature algorithm determination is now
4342817466cbSJens Wiklander     in a function to allow easy future expansion
4343817466cbSJens Wiklander   * Changed symmetric cipher functions to
4344817466cbSJens Wiklander     identical interface (returning int result values)
4345817466cbSJens Wiklander   * Changed ARC4 to use separate input/output buffer
4346817466cbSJens Wiklander   * Added reset function for HMAC context as speed-up
4347817466cbSJens Wiklander     for specific use-cases
4348817466cbSJens Wiklander
4349817466cbSJens WiklanderBug fixes
4350817466cbSJens Wiklander   * Fixed bug resulting in failure to send the last
4351817466cbSJens Wiklander     certificate in the chain in ssl_write_certificate() and
4352817466cbSJens Wiklander     ssl_write_certificate_request() (found by fatbob)
4353817466cbSJens Wiklander   * Added small fixes for compiler warnings on a Mac
4354817466cbSJens Wiklander     (found by Frank de Brabander)
4355817466cbSJens Wiklander   * Fixed algorithmic bug in mpi_is_prime() (found by
4356817466cbSJens Wiklander     Smbat Tonoyan)
4357817466cbSJens Wiklander
4358817466cbSJens Wiklander= Version 0.12.1 released on 2009-10-04
4359817466cbSJens WiklanderChanges
4360817466cbSJens Wiklander   * Coverage test definitions now support 'depends_on'
4361817466cbSJens Wiklander     tagging system.
4362817466cbSJens Wiklander   * Tests requiring specific hashing algorithms now honor
4363817466cbSJens Wiklander     the defines.
4364817466cbSJens Wiklander
4365817466cbSJens WiklanderBug fixes
4366817466cbSJens Wiklander   * Changed typo in #ifdef in x509parse.c (found
4367817466cbSJens Wiklander     by Eduardo)
4368817466cbSJens Wiklander
4369817466cbSJens Wiklander= Version 0.12.0 released on 2009-07-28
4370817466cbSJens WiklanderFeatures
4371817466cbSJens Wiklander   * Added CMake makefiles as alternative to regular Makefiles.
4372817466cbSJens Wiklander   * Added preliminary Code Coverage tests for AES, ARC4,
4373817466cbSJens Wiklander     Base64, MPI, SHA-family, MD-family, HMAC-SHA-family,
4374817466cbSJens Wiklander     Camellia, DES, 3-DES, RSA PKCS#1, XTEA, Diffie-Hellman
4375817466cbSJens Wiklander     and X509parse.
4376817466cbSJens Wiklander
4377817466cbSJens WiklanderChanges
4378817466cbSJens Wiklander   * Error codes are not (necessarily) negative. Keep
4379817466cbSJens Wiklander     this is mind when checking for errors.
4380817466cbSJens Wiklander   * RSA_RAW renamed to SIG_RSA_RAW for consistency.
4381817466cbSJens Wiklander   * Fixed typo in name of POLARSSL_ERR_RSA_OUTPUT_TOO_LARGE.
4382817466cbSJens Wiklander   * Changed interface for AES and Camellia setkey functions
4383817466cbSJens Wiklander     to indicate invalid key lengths.
4384817466cbSJens Wiklander
4385817466cbSJens WiklanderBug fixes
4386817466cbSJens Wiklander   * Fixed include location of endian.h on FreeBSD (found by
4387817466cbSJens Wiklander     Gabriel)
4388817466cbSJens Wiklander   * Fixed include location of endian.h and name clash on
4389817466cbSJens Wiklander     Apples (found by Martin van Hensbergen)
4390817466cbSJens Wiklander   * Fixed HMAC-MD2 by modifying md2_starts(), so that the
4391817466cbSJens Wiklander     required HMAC ipad and opad variables are not cleared.
4392817466cbSJens Wiklander     (found by code coverage tests)
4393817466cbSJens Wiklander   * Prevented use of long long in bignum if
4394817466cbSJens Wiklander     POLARSSL_HAVE_LONGLONG not defined (found by Giles
4395817466cbSJens Wiklander     Bathgate).
4396817466cbSJens Wiklander   * Fixed incorrect handling of negative strings in
4397817466cbSJens Wiklander     mpi_read_string() (found by code coverage tests).
4398817466cbSJens Wiklander   * Fixed segfault on handling empty rsa_context in
4399817466cbSJens Wiklander     rsa_check_pubkey() and rsa_check_privkey() (found by
4400817466cbSJens Wiklander     code coverage tests).
4401817466cbSJens Wiklander   * Fixed incorrect handling of one single negative input
4402817466cbSJens Wiklander     value in mpi_add_abs() (found by code coverage tests).
4403817466cbSJens Wiklander   * Fixed incorrect handling of negative first input
4404817466cbSJens Wiklander     value in mpi_sub_abs() (found by code coverage tests).
4405817466cbSJens Wiklander   * Fixed incorrect handling of negative first input
4406817466cbSJens Wiklander     value in mpi_mod_mpi() and mpi_mod_int(). Resulting
4407817466cbSJens Wiklander     change also affects mpi_write_string() (found by code
4408817466cbSJens Wiklander     coverage tests).
4409817466cbSJens Wiklander   * Corrected is_prime() results for 0, 1 and 2 (found by
4410817466cbSJens Wiklander     code coverage tests).
4411817466cbSJens Wiklander   * Fixed Camellia and XTEA for 64-bit Windows systems.
4412817466cbSJens Wiklander
4413817466cbSJens Wiklander= Version 0.11.1 released on 2009-05-17
4414817466cbSJens Wiklander   * Fixed missing functionality for SHA-224, SHA-256, SHA384,
4415817466cbSJens Wiklander     SHA-512 in rsa_pkcs1_sign()
4416817466cbSJens Wiklander
4417817466cbSJens Wiklander= Version 0.11.0 released on 2009-05-03
4418817466cbSJens Wiklander   * Fixed a bug in mpi_gcd() so that it also works when both
4419817466cbSJens Wiklander     input numbers are even and added testcases to check
4420817466cbSJens Wiklander     (found by Pierre Habouzit).
4421817466cbSJens Wiklander   * Added support for SHA-224, SHA-256, SHA-384 and SHA-512
4422817466cbSJens Wiklander     one way hash functions with the PKCS#1 v1.5 signing and
4423817466cbSJens Wiklander     verification.
4424817466cbSJens Wiklander   * Fixed minor bug regarding mpi_gcd located within the
4425817466cbSJens Wiklander     POLARSSL_GENPRIME block.
4426817466cbSJens Wiklander   * Fixed minor memory leak in x509parse_crt() and added better
4427817466cbSJens Wiklander     handling of 'full' certificate chains (found by Mathias
4428817466cbSJens Wiklander     Olsson).
4429817466cbSJens Wiklander   * Centralized file opening and reading for x509 files into
4430817466cbSJens Wiklander     load_file()
4431817466cbSJens Wiklander   * Made definition of net_htons() endian-clean for big endian
4432817466cbSJens Wiklander     systems (Found by Gernot).
4433817466cbSJens Wiklander   * Undefining POLARSSL_HAVE_ASM now also handles prevents asm in
4434817466cbSJens Wiklander     padlock and timing code.
4435817466cbSJens Wiklander   * Fixed an off-by-one buffer allocation in ssl_set_hostname()
4436817466cbSJens Wiklander     responsible for crashes and unwanted behaviour.
4437817466cbSJens Wiklander   * Added support for Certificate Revocation List (CRL) parsing.
4438817466cbSJens Wiklander   * Added support for CRL revocation to x509parse_verify() and
4439817466cbSJens Wiklander     SSL/TLS code.
4440817466cbSJens Wiklander   * Fixed compatibility of XTEA and Camellia on a 64-bit system
4441817466cbSJens Wiklander     (found by Felix von Leitner).
4442817466cbSJens Wiklander
4443817466cbSJens Wiklander= Version 0.10.0 released on 2009-01-12
4444817466cbSJens Wiklander   * Migrated XySSL to PolarSSL
4445817466cbSJens Wiklander   * Added XTEA symmetric cipher
4446817466cbSJens Wiklander   * Added Camellia symmetric cipher
4447817466cbSJens Wiklander   * Added support for ciphersuites: SSL_RSA_CAMELLIA_128_SHA,
4448817466cbSJens Wiklander     SSL_RSA_CAMELLIA_256_SHA and SSL_EDH_RSA_CAMELLIA_256_SHA
4449817466cbSJens Wiklander   * Fixed dangerous bug that can cause a heap overflow in
4450817466cbSJens Wiklander     rsa_pkcs1_decrypt (found by Christophe Devine)
4451817466cbSJens Wiklander
4452817466cbSJens Wiklander================================================================
4453817466cbSJens WiklanderXySSL ChangeLog
4454817466cbSJens Wiklander
4455817466cbSJens Wiklander= Version 0.9 released on 2008-03-16
4456817466cbSJens Wiklander
4457817466cbSJens Wiklander    * Added support for ciphersuite: SSL_RSA_AES_128_SHA
4458817466cbSJens Wiklander    * Enabled support for large files by default in aescrypt2.c
4459817466cbSJens Wiklander    * Preliminary openssl wrapper contributed by David Barrett
4460817466cbSJens Wiklander    * Fixed a bug in ssl_write() that caused the same payload to
4461817466cbSJens Wiklander      be sent twice in non-blocking mode when send returns EAGAIN
4462817466cbSJens Wiklander    * Fixed ssl_parse_client_hello(): session id and challenge must
4463817466cbSJens Wiklander      not be swapped in the SSLv2 ClientHello (found by Greg Robson)
4464817466cbSJens Wiklander    * Added user-defined callback debug function (Krystian Kolodziej)
4465817466cbSJens Wiklander    * Before freeing a certificate, properly zero out all cert. data
4466817466cbSJens Wiklander    * Fixed the "mode" parameter so that encryption/decryption are
4467817466cbSJens Wiklander      not swapped on PadLock; also fixed compilation on older versions
4468817466cbSJens Wiklander      of gcc (bug reported by David Barrett)
4469817466cbSJens Wiklander    * Correctly handle the case in padlock_xcryptcbc() when input or
44705b25c76aSJerome Forissier      output data is non-aligned by falling back to the software
4471817466cbSJens Wiklander      implementation, as VIA Nehemiah cannot handle non-aligned buffers
4472817466cbSJens Wiklander    * Fixed a memory leak in x509parse_crt() which was reported by Greg
4473817466cbSJens Wiklander      Robson-Garth; some x509write.c fixes by Pascal Vizeli, thanks to
4474817466cbSJens Wiklander      Matthew Page who reported several bugs
4475817466cbSJens Wiklander    * Fixed x509_get_ext() to accept some rare certificates which have
4476817466cbSJens Wiklander      an INTEGER instead of a BOOLEAN for BasicConstraints::cA.
4477817466cbSJens Wiklander    * Added support on the client side for the TLS "hostname" extension
4478817466cbSJens Wiklander      (patch contributed by David Patino)
4479817466cbSJens Wiklander    * Make x509parse_verify() return BADCERT_CN_MISMATCH when an empty
4480817466cbSJens Wiklander      string is passed as the CN (bug reported by spoofy)
4481817466cbSJens Wiklander    * Added an option to enable/disable the BN assembly code
4482817466cbSJens Wiklander    * Updated rsa_check_privkey() to verify that (D*E) = 1 % (P-1)*(Q-1)
4483817466cbSJens Wiklander    * Disabled obsolete hash functions by default (MD2, MD4); updated
4484817466cbSJens Wiklander      selftest and benchmark to not test ciphers that have been disabled
4485817466cbSJens Wiklander    * Updated x509parse_cert_info() to correctly display byte 0 of the
4486817466cbSJens Wiklander      serial number, setup correct server port in the ssl client example
4487817466cbSJens Wiklander    * Fixed a critical denial-of-service with X.509 cert. verification:
4488817466cbSJens Wiklander      peer may cause xyssl to loop indefinitely by sending a certificate
4489817466cbSJens Wiklander      for which the RSA signature check fails (bug reported by Benoit)
4490817466cbSJens Wiklander    * Added test vectors for: AES-CBC, AES-CFB, DES-CBC and 3DES-CBC,
4491817466cbSJens Wiklander      HMAC-MD5, HMAC-SHA1, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512
4492817466cbSJens Wiklander    * Fixed HMAC-SHA-384 and HMAC-SHA-512 (thanks to Josh Sinykin)
4493817466cbSJens Wiklander    * Modified ssl_parse_client_key_exchange() to protect against
4494817466cbSJens Wiklander      Daniel Bleichenbacher attack on PKCS#1 v1.5 padding, as well
4495817466cbSJens Wiklander      as the Klima-Pokorny-Rosa extension of Bleichenbacher's attack
4496817466cbSJens Wiklander    * Updated rsa_gen_key() so that ctx->N is always nbits in size
4497817466cbSJens Wiklander    * Fixed assembly PPC compilation errors on Mac OS X, thanks to
4498817466cbSJens Wiklander      David Barrett and Dusan Semen
4499817466cbSJens Wiklander
4500817466cbSJens Wiklander= Version 0.8 released on 2007-10-20
4501817466cbSJens Wiklander
4502817466cbSJens Wiklander    * Modified the HMAC functions to handle keys larger
4503817466cbSJens Wiklander      than 64 bytes, thanks to Stephane Desneux and gary ng
4504817466cbSJens Wiklander    * Fixed ssl_read_record() to properly update the handshake
4505817466cbSJens Wiklander      message digests, which fixes IE6/IE7 client authentication
4506817466cbSJens Wiklander    * Cleaned up the XYSSL* #defines, suggested by Azriel Fasten
4507817466cbSJens Wiklander    * Fixed net_recv(), thanks to Lorenz Schori and Egon Kocjan
4508817466cbSJens Wiklander    * Added user-defined callbacks for handling I/O and sessions
4509817466cbSJens Wiklander    * Added lots of debugging output in the SSL/TLS functions
4510817466cbSJens Wiklander    * Added preliminary X.509 cert. writing by Pascal Vizeli
4511817466cbSJens Wiklander    * Added preliminary support for the VIA PadLock routines
4512817466cbSJens Wiklander    * Added AES-CFB mode of operation, contributed by chmike
4513817466cbSJens Wiklander    * Added an SSL/TLS stress testing program (ssl_test.c)
4514817466cbSJens Wiklander    * Updated the RSA PKCS#1 code to allow choosing between
4515817466cbSJens Wiklander      RSA_PUBLIC and RSA_PRIVATE, as suggested by David Barrett
4516817466cbSJens Wiklander    * Updated ssl_read() to skip 0-length records from OpenSSL
4517817466cbSJens Wiklander    * Fixed the make install target to comply with *BSD make
4518817466cbSJens Wiklander    * Fixed a bug in mpi_read_binary() on 64-bit platforms
4519817466cbSJens Wiklander    * mpi_is_prime() speedups, thanks to Kevin McLaughlin
4520817466cbSJens Wiklander    * Fixed a long standing memory leak in mpi_is_prime()
4521817466cbSJens Wiklander    * Replaced realloc with malloc in mpi_grow(), and set
4522817466cbSJens Wiklander      the sign of zero as positive in mpi_init() (reported
4523817466cbSJens Wiklander      by Jonathan M. McCune)
4524817466cbSJens Wiklander
4525817466cbSJens Wiklander= Version 0.7 released on 2007-07-07
4526817466cbSJens Wiklander
4527817466cbSJens Wiklander    * Added support for the MicroBlaze soft-core processor
4528817466cbSJens Wiklander    * Fixed a bug in ssl_tls.c which sometimes prevented SSL
4529817466cbSJens Wiklander      connections from being established with non-blocking I/O
4530817466cbSJens Wiklander    * Fixed a couple bugs in the VS6 and UNIX Makefiles
4531817466cbSJens Wiklander    * Fixed the "PIC register ebx clobbered in asm" bug
4532817466cbSJens Wiklander    * Added HMAC starts/update/finish support functions
4533817466cbSJens Wiklander    * Added the SHA-224, SHA-384 and SHA-512 hash functions
4534817466cbSJens Wiklander    * Fixed the net_set_*block routines, thanks to Andreas
4535817466cbSJens Wiklander    * Added a few demonstration programs: md5sum, sha1sum,
4536817466cbSJens Wiklander      dh_client, dh_server, rsa_genkey, rsa_sign, rsa_verify
4537817466cbSJens Wiklander    * Added new bignum import and export helper functions
4538817466cbSJens Wiklander    * Rewrote README.txt in program/ssl/ca to better explain
4539817466cbSJens Wiklander      how to create a test PKI
4540817466cbSJens Wiklander
4541817466cbSJens Wiklander= Version 0.6 released on 2007-04-01
4542817466cbSJens Wiklander
4543817466cbSJens Wiklander    * Ciphers used in SSL/TLS can now be disabled at compile
4544817466cbSJens Wiklander      time, to reduce the memory footprint on embedded systems
4545817466cbSJens Wiklander    * Added multiply assembly code for the TriCore and modified
4546817466cbSJens Wiklander      havege_struct for this processor, thanks to David Patiño
4547817466cbSJens Wiklander    * Added multiply assembly code for 64-bit PowerPCs,
4548817466cbSJens Wiklander      thanks to Peking University and the OSU Open Source Lab
4549817466cbSJens Wiklander    * Added experimental support of Quantum Cryptography
4550817466cbSJens Wiklander    * Added support for autoconf, contributed by Arnaud Cornet
4551817466cbSJens Wiklander    * Fixed "long long" compilation issues on IA-64 and PPC64
4552817466cbSJens Wiklander    * Fixed a bug introduced in xyssl-0.5/timing.c: hardclock
4553817466cbSJens Wiklander      was not being correctly defined on ARM and MIPS
4554817466cbSJens Wiklander
4555817466cbSJens Wiklander= Version 0.5 released on 2007-03-01
4556817466cbSJens Wiklander
4557817466cbSJens Wiklander    * Added multiply assembly code for SPARC and Alpha
4558817466cbSJens Wiklander    * Added (beta) support for non-blocking I/O operations
4559817466cbSJens Wiklander    * Implemented session resuming and client authentication
4560817466cbSJens Wiklander    * Fixed some portability issues on WinCE, MINIX 3, Plan9
4561817466cbSJens Wiklander      (thanks to Benjamin Newman), HP-UX, FreeBSD and Solaris
4562817466cbSJens Wiklander    * Improved the performance of the EDH key exchange
4563817466cbSJens Wiklander    * Fixed a bug that caused valid packets with a payload
4564817466cbSJens Wiklander      size of 16384 bytes to be rejected
4565817466cbSJens Wiklander
4566817466cbSJens Wiklander= Version 0.4 released on 2007-02-01
4567817466cbSJens Wiklander
4568817466cbSJens Wiklander    * Added support for Ephemeral Diffie-Hellman key exchange
4569817466cbSJens Wiklander    * Added multiply asm code for SSE2, ARM, PPC, MIPS and M68K
4570817466cbSJens Wiklander    * Various improvement to the modular exponentiation code
4571817466cbSJens Wiklander    * Rewrote the headers to generate the API docs with doxygen
4572817466cbSJens Wiklander    * Fixed a bug in ssl_encrypt_buf (incorrect padding was
4573817466cbSJens Wiklander      generated) and in ssl_parse_client_hello (max. client
4574817466cbSJens Wiklander      version was not properly set), thanks to Didier Rebeix
4575817466cbSJens Wiklander    * Fixed another bug in ssl_parse_client_hello: clients with
4576817466cbSJens Wiklander      cipherlists larger than 96 bytes were incorrectly rejected
4577817466cbSJens Wiklander    * Fixed a couple memory leak in x509_read.c
4578817466cbSJens Wiklander
4579817466cbSJens Wiklander= Version 0.3 released on 2007-01-01
4580817466cbSJens Wiklander
4581817466cbSJens Wiklander    * Added server-side SSLv3 and TLSv1.0 support
4582817466cbSJens Wiklander    * Multiple fixes to enhance the compatibility with g++,
4583817466cbSJens Wiklander      thanks to Xosé Antón Otero Ferreira
4584817466cbSJens Wiklander    * Fixed a bug in the CBC code, thanks to dowst; also,
4585817466cbSJens Wiklander      the bignum code is no longer dependent on long long
4586817466cbSJens Wiklander    * Updated rsa_pkcs1_sign to handle arbitrary large inputs
4587817466cbSJens Wiklander    * Updated timing.c for improved compatibility with i386
4588817466cbSJens Wiklander      and 486 processors, thanks to Arnaud Cornet
4589817466cbSJens Wiklander
4590817466cbSJens Wiklander= Version 0.2 released on 2006-12-01
4591817466cbSJens Wiklander
4592817466cbSJens Wiklander    * Updated timing.c to support ARM and MIPS arch
4593817466cbSJens Wiklander    * Updated the MPI code to support 8086 on MSVC 1.5
4594817466cbSJens Wiklander    * Added the copyright notice at the top of havege.h
4595817466cbSJens Wiklander    * Fixed a bug in sha2_hmac, thanks to newsoft/Wenfang Zhang
4596817466cbSJens Wiklander    * Fixed a bug reported by Adrian Rüegsegger in x509_read_key
4597817466cbSJens Wiklander    * Fixed a bug reported by Torsten Lauter in ssl_read_record
4598817466cbSJens Wiklander    * Fixed a bug in rsa_check_privkey that would wrongly cause
4599817466cbSJens Wiklander      valid RSA keys to be dismissed (thanks to oldwolf)
4600817466cbSJens Wiklander    * Fixed a bug in mpi_is_prime that caused some primes to fail
4601817466cbSJens Wiklander      the Miller-Rabin primality test
4602817466cbSJens Wiklander
4603817466cbSJens Wiklander    I'd also like to thank Younès Hafri for the CRUX linux port,
4604817466cbSJens Wiklander    Khalil Petit who added XySSL into pkgsrc and Arnaud Cornet
4605817466cbSJens Wiklander    who maintains the Debian package :-)
4606817466cbSJens Wiklander
4607817466cbSJens Wiklander= Version 0.1 released on 2006-11-01
4608