blob: f64b209546c9e33db3c94ffc809feaddac38093e [file] [log] [blame] [view]
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +02001Migrating from Mbed TLS 2.x to Mbed TLS 3.0
2===========================================
3
4This guide details the steps required to migrate from Mbed TLS version 2.x to
5Mbed TLS version 3.0 or greater. Unlike normal releases, Mbed TLS 3.0 breaks
6compatibility with previous versions, so users (and alt implementors) might
7need to change their own code in order to make it work with Mbed TLS 3.0.
8
9Here's the list of breaking changes; each entry should help you answer these
10two questions: (1) am I affected? (2) if yes, what's my migration path?
11
Dave Rodgman1aea4042021-06-29 13:27:15 +010012The changes are detailed below, and include:
13- Removal of many insecure / obsolete features
14- Tidying up of configuration options (including removing some less useful options)
15- Changing function signatures (e.g., adding return codes or extra parameters); introducing const to arguments.
16- Removal of functions marked as deprecated in 2.x
17
Dave Rodgmane45e6402021-06-29 13:21:55 +010018Introduce a level of indirection and versioning in the config files
19-------------------------------------------------------------------
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +020020
Dave Rodgmane45e6402021-06-29 13:21:55 +010021`config.h` was split into `build_info.h` and `mbedtls_config.h`.
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +020022
Dave Rodgmane45e6402021-06-29 13:21:55 +010023* In code, use `#include <mbedtls/build_info.h>`. Don't include `mbedtls/config.h` and don't refer to `MBEDTLS_CONFIG_FILE`.
24* In build tools, edit `mbedtls_config.h`, or edit `MBEDTLS_CONFIG_FILE` as before.
25* If you had a tool that parsed the library version from `include/mbedtls/version.h`, this has moved to `include/mbedtls/build_info.h`. From C code, both headers now define the `MBEDTLS_VERSION_xxx` macros.
26
27Also, if you have a custom configuration file:
28
29* Don't include `check_config.h` or `config_psa.h` anymore.
30* Don't define `MBEDTLS_CONFIG_H` anymore.
31
32A config file version symbol, `MBEDTLS_CONFIG_VERSION` was introduced.
33Defining it to a particular value will ensure that Mbed TLS interprets
34the config file in a way that's compatible with the config file format
35used by the Mbed TLS release whose `MBEDTLS_VERSION_NUMBER` has the same
36value.
37The only value supported by Mbed TLS 3.0.0 is `0x03000000`.
38
39Remove suport for TLS 1.0, 1.1 and DTLS 1.0
40-------------------------------------------
41
42This change affects users of the TLS 1.0, 1.1 and DTLS 1.0 protocols.
43
44These versions have been deprecated by RFC 8996.
45Keeping them in the library creates opportunities for misconfiguration
46and possibly downgrade attacks. More generally, more code means a larger attack
47surface, even if the code is supposedly not used.
48
49The migration path is to adopt the latest versions of the protocol.
50
51As a consequence of removing TLS 1.0, support for CBC record splitting was
52also removed, as it was a work-around for a weakness in this particular
53version. There is no migration path since the feature is no longer relevant.
54
55As a consequence of currently supporting only one version of (D)TLS (and in the
56future 1.3 which will have a different version negociation mechanism), support
57for fallback SCSV (RFC 7507) was also removed. There is no migration path as
58it's no longer useful with TLS 1.2 and later.
59
60As a consequence of currently supporting only one version of (D)TLS (and in the
61future 1.3 which will have a different concept of ciphersuites), support for
62configuring ciphersuites separately for each version via
63`mbedtls_ssl_conf_ciphersuites_for_version()` was removed. Use
64`mbedtls_ssl_conf_ciphersuites()` to configure ciphersuites to use with (D)TLS
651.2; in the future a different API will be added for (D)TLS 1.3.
66
67Remove support for SSL 3.0
68--------------------------
69
70This doesn't affect people using the default configuration as it was already
71disabled by default.
72
73This only affects TLS users who explicitly enabled `MBEDTLS_SSL_PROTO_SSL3`
74and relied on that version in order to communicate with peers that are not up
75to date. If one of your peers is in that case, please try contacting them and
76encouraging them to upgrade their software.
77`0`.
78
79Strengthen default algorithm selection for X.509 and TLS
80--------------------------------------------------------
81
82The default X.509 verification profile (`mbedtls_x509_crt_profile_default`) and the default curve and hash selection in TLS have changed. They are now aligned, except that the X.509 profile only lists curves that support signature verification.
83
84Hashes and curves weaker than 255 bits (security strength less than 128 bits) are no longer accepted by default. The following hashes have been removed: SHA-1 (formerly only accepted for key exchanges but not for certificate signatures), SHA-224 (weaker hashes were already not accepted). The following curves have been removed: secp192r1, secp224r1, secp192k1, secp224k1.
85
86The compile-time options `MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES` and `MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE` are no longer available.
87
88The curve secp256k1 has also been removed from the default X.509 and TLS profiles. [RFC 8422](https://datatracker.ietf.org/doc/html/rfc8422#section-5.1.1) deprecates it in TLS, and it is very rarely used, although it is not known to be weak at the time of writing.
89
90If you still need to accept certificates signed with algorithms that have been removed from the default profile, call `mbedtls_x509_crt_verify_with_profile` instead of `mbedtls_x509_crt_verify` and pass a profile that allows the curves and hashes you want. For example, to allow SHA-224:
91```
92mbedtls_x509_crt_profile my_profile = mbedtls_x509_crt_profile_default;
93my_profile.allowed_mds |= MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA224 );
94```
95
96If you still need to allow hashes and curves in TLS that have been removed from the default configuration, call `mbedtls_ssl_conf_sig_hashes()` and `mbedtls_ssl_conf_curves()` with the desired lists.
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +020097
98Deprecated functions were removed from hashing modules
99------------------------------------------------------
100
TRodziewiczf41dc7c2021-06-21 13:27:29 +0200101Modules: MD5, SHA1, SHA256, SHA512, MD.
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +0200102
Dave Rodgman8cccbe12021-06-29 13:15:50 +0100103- The functions `mbedtls_xxx_starts_ret()`, `mbedtls_xxx_update_ret()`,
104 `mbedtls_xxx_finish_ret()` and `mbedtls_xxx_ret()` were renamed to replace
105 the corresponding functions without `_ret` appended. Please call the name without `_ret` appended and check the return value.
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +0200106- The function `mbedtls_md_init_ctx()` was removed; please use
107 `mbedtls_md_setup()` instead.
108- The functions `mbedtls_xxx_process()` were removed. You normally don't need
Manuel Pégourié-Gonnard143b1e32021-05-05 09:46:01 +0200109 to call that from application code. However if you do (or if you want to
Dave Rodgman8cccbe12021-06-29 13:15:50 +0100110 provide your own version of that function), please use
111 `mbedtls_internal_xxx_process()` instead, and check the return value.
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +0200112
113Deprecated error codes for hardware failures were removed
114---------------------------------------------------------
115
116- The macros `MBEDTLS_ERR_xxx_FEATURE_UNSUPPORTED` from various crypto modules
117 were removed; `MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED` is now used
Dave Rodgman8cccbe12021-06-29 13:15:50 +0100118 instead.
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +0200119- The macros `MBEDTLS_ERR_xxx_HW_ACCEL_FAILED` from various crypto modules
120 were removed; `MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED` is now used instead.
121
122Deprecated names for PSA constants and types were removed
123---------------------------------------------------------
124
Manuel Pégourié-Gonnard2960b2e2021-04-26 09:57:36 +0200125Some constants and types that were present in beta versions of the PSA Crypto
Manuel Pégourié-Gonnard143b1e32021-05-05 09:46:01 +0200126API were removed from version 1.0 of specification. Please switch to the new
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +0200127names provided by the 1.0 specification instead.
128
129Internal / alt-focused headers were moved to a private location
130----------------------------------------------------------------
131
132This shouldn't affect users who took care not to include headers that
133were documented as internal, despite being in the public include directory.
134
135If you're providing alt implementations of ECP or RSA, you'll need to add our
136`library` directory to your include path when building your alt
137implementations, and note that `ecp_internal.h` and `rsa_internal.h` have been
Gilles Peskine6a2fb612021-05-24 22:25:04 +0200138renamed to `ecp_internal_alt.h` and `rsa_alt_helpers.h` respectively.
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +0200139
140If you're a library user and used to rely on having access to a structure or
141function that's now in a private header, please reach out on the mailing list
142and explain your need; we'll consider adding a new API in a future version.
143
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +0200144Remove the certs module from the library
145----------------------------------------
146
147This should not affect production use of the library, as the certificates and
148keys included there were never suitable for production use.
149
150However it might affect you if you relied on them for testing purposes. In
151that case, please embed your own test certificates in your test code; now that
152`certs.c` is out of the library there is no longer any stability guaranteed
153and it may change in incompatible ways at any time.
154
155Remove the HAVEGE module
156------------------------
157
158This doesn't affect people using the default configuration as it was already
159disabled by default.
160
161This only affects users who called the HAVEGE modules directly (not
Manuel Pégourié-Gonnard143b1e32021-05-05 09:46:01 +0200162recommended), or users who used it through the entropy module but had it as the
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +0200163only source of entropy. If you're in that case, please declare OS or hardware
164RNG interfaces with `mbedtls_entropy_add_source()` and/or use an entropy seed
165file created securely during device provisioning. See
166<https://tls.mbed.org/kb/how-to/add-entropy-sources-to-entropy-pool> for more
167information.
168
169Remove support for parsing SSLv2 ClientHello
170--------------------------------------------
171
172This doesn't affect people using the default configuration as it was already
173disabled by default.
174
Manuel Pégourié-Gonnard143b1e32021-05-05 09:46:01 +0200175This only affects TLS servers that have clients who send an SSLv2 ClientHello.
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +0200176These days clients are very unlikely to do that. If you have a client that
177does, please try contacting them and encouraging them to upgrade their
178software.
179
Thomas Daubney379227c2021-06-18 10:46:12 +0100180Remove support for truncated HMAC
181---------------------------------
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +0200182
Thomas Daubneyac844692021-06-18 14:08:56 +0100183This affects users of truncated HMAC, that is, users who called
184`mbedtls_ssl_conf_truncated_hmac( ..., MBEDTLS_SSL_TRUNC_HMAC_ENABLED)`,
185regardless of whether the standard version was used or compatibility version
186(`MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT`).
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +0200187
Thomas Daubneyac844692021-06-18 14:08:56 +0100188The recommended migration path for people who want minimal overhead is to use a
189CCM-8 ciphersuite.
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +0200190
191Remove support for TLS record-level compression
192-----------------------------------------------
193
194This doesn't affect people using the default configuration as it was already
195disabled by default.
196
197This only affects TLS users who enabled `MBEDTLS_ZLIB_SUPPORT`. This will not
198cause any failures however if you used to enable TLS record-level compression
199you may find that your bandwidth usage increases without compression. There's
200no general solution to this problem; application protocols might have their
201own compression mechanisms and are in a better position than the TLS stack to
202avoid variants of the CRIME and BREACH attacks.
203
204Remove support for TLS RC4-based ciphersuites
205---------------------------------------------
206
Bence Szépkútibb0cfeb2021-05-28 09:42:25 +0200207This does not affect people who used the default `mbedtls_config.h` and the default
Manuel Pégourié-Gonnard2960b2e2021-04-26 09:57:36 +0200208list of ciphersuites, as RC4-based ciphersuites were already not negotiated in
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +0200209that case.
210
211Please switch to any of the modern, recommended ciphersuites (based on
212AES-GCM, AES-CCM or ChachaPoly for example) and if your peer doesn't support
213any, encourage them to upgrade their software.
214
215Remove support for TLS single-DES ciphersuites
216----------------------------------------------
217
218This doesn't affect people using the default configuration as it was already
219disabled by default.
220
221Please switch to any of the modern, recommended ciphersuites (based on
222AES-GCM, AES-CCM or ChachaPoly for example) and if your peer doesn't support
223any, encourage them to upgrade their software.
224
225Remove support for TLS record-level hardware acceleration
226---------------------------------------------------------
227
228This doesn't affect people using the default configuration as it was already
229disabled by default.
230
231This feature had been broken for a while so we doubt anyone still used it.
232However if you did, please reach out on the mailing list and let us know about
233your use case.
234
235Remove wrapper for libpkcs11-helper
236-----------------------------------
237
238This doesn't affect people using the default configuration as it was already
239disabled by default.
240
241If you used to rely on this module in order to store your private keys
242securely, please have a look at the key management facilities provided by the
243PSA crypto API. If you have a use case that's not covered yet by this API,
244please reach out on the mailing list.
245
246Remove config option `MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME`
247----------------------------------------------------------
248
249This doesn't affect people using the default configuration.
250
Manuel Pégourié-Gonnard57e93e52021-04-26 09:59:47 +0200251This option has not had any effect for a long time. Please use the `lifetime`
Manuel Pégourié-Gonnard89d4ab02021-04-23 11:54:27 +0200252parameter of `mbedtls_ssl_ticket_setup()` instead.
253
254Remove helpers for the transition from Mbed TLS 1.3 to Mbed TLS 2.0
255-------------------------------------------------------------------
256
257This only affects people who've been using Mbed TLS since before version 2.0
258and still relied on `compat-1.3.h` in their code.
259
260Please use the new names directly in your code; `scripts/rename.pl` (from any
261of the 2.x releases - no longer included in 3.0) might help you do that.
Dave Rodgman8cccbe12021-06-29 13:15:50 +0100262
263
264Remove 3DES ciphersuites
265--
266
267This change does not affect users using default settings for 3DES in `mbedtls_config.h`
268because the 3DES ciphersuites were disabled by that.
269
2703DES has weaknesses/limitations and there are better alternatives, and more and
271more standard bodies are recommending against its use in TLS.
272
273The migration path here is to chose from the recomended in literature alternatives.
274CCM interface changes: impact for alternative implementations
275-------------------------------------------------------------
276
277The CCM interface has changed with the addition of support for
278multi-part operations. Five new API functions have been defined:
279mbedtls_ccm_starts(), mbedtls_ccm_set_lengths(),
280mbedtls_ccm_update_ad(), mbedtls_ccm_update() and mbedtls_ccm_finish().
281Alternative implementations of CCM (`MBEDTLS_CCM_ALT`) have now to
282implement those additional five API functions.
283Calling `mbedtls_cipher_finish()` is mandatory for all multi-part operations
284----------------------------------------------------------------------------
285
286This only affects people who use the cipher module to perform AEAD operations
287using the multi-part API.
288
289Previously, the documentation didn't state explicitly if it was OK to call
290`mbedtls_cipher_check_tag()` or `mbedtls_cipher_write_tag()` directly after
291the last call to `mbedtls_cipher_update()` - that is, without calling
292`mbedtls_cipher_finish()` in-between. If you code was missing that call,
293please add it and be prepared to get as much as 15 bytes of output.
294
295Currently the output is always 0 bytes, but it may be more when alternative
296implementations of the underlying primitives are in use, or with future
297versions of the library.
298Combine the `MBEDTLS_SSL_CID_PADDING_GRANULARITY` and `MBEDTLS_SSL_TLS1_3_PADDING_GRANULARITY` options
299--
300
301This change affects users who modified the default `mbedtls_config.h` padding granularity
302settings, i.e. enabled at least one of the options.
303
304The `mbedtls_config.h` options `MBEDTLS_SSL_CID_PADDING_GRANULARITY` and
305`MBEDTLS_SSL_TLS1_3_PADDING_GRANULARITY` were combined into one option because
306they used exactly the same padding mechanism and hence their respective padding
307granularities can be used in exactly the same way. This change simplifies the
308code maintenance.
309
310The new single option `MBEDTLS_SSL_CID_TLS1_3_PADDING_GRANULARITY` can be used
311for both DTLS-CID and TLS 1.3.
312Change the API to allow adding critical extensions to CSRs
313------------------------------------------------------------------
314
315This affects applications that call the `mbedtls_x509write_csr_set_extension`
316function.
317
318The API is changed to include the parameter `critical` which allow to mark an
319extension included in a CSR as critical. To get the previous behaviour pass
Dave Rodgman8cccbe12021-06-29 13:15:50 +0100320
321TLS now favors faster curves over larger curves
322-----------------------------------------------
323
324The default preference order for curves in TLS now favors resource usage (performance and memory consumption) over size. The exact order is unspecified and may change, but generally you can expect 256-bit curves to be preferred over larger curves.
325
326If you prefer a different order, call `mbedtls_ssl_conf_curves()` when configuring a TLS connection.
327GCM interface changes: impact for alternative implementations
328-------------------------------------------------------------
329
330The GCM multipart interface has changed as described in [“GCM multipart interface: application changes”](#gcm-multipart-interface:-application-changes). The consequences for an alternative implementation of GCM (`MBEDTLS_GCM_ALT`) are as follows:
331
332* `mbedtls_gcm_starts()` now only sets the mode and the nonce (IV). The new function `mbedtls_gcm_update_ad()` receives the associated data. It may be called multiple times.
333* `mbedtls_gcm_update()` now allows arbitrary-length inputs, takes an extra parameter to indicate the actual output length. Alternative implementations may choose between two modes:
334 * Always return the partial output immediately, even if it does not consist of a whole number of blocks.
335 * Buffer the data for the last partial block, to be returned in the next call to `mbedtls_gcm_update()` or `mbedtls_gcm_finish()`.
336* `mbedtls_gcm_finish()` now takes an extra output buffer for the last partial block if needed.
337GCM multipart interface: application changes
338--------------------------------------------
339
340The GCM module now supports arbitrary chunked input in the multipart interface.
341This changes the interface for applications using the GCM module directly for multipart operations.
342Applications using one-shot GCM or using GCM via the `mbedtls_cipher_xxx` or `psa_aead_xxx` interfaces do not require any changes.
343
344* `mbedtls_gcm_starts()` now only sets the mode and the nonce (IV). Call the new function `mbedtls_gcm_update_ad()` to pass the associated data.
345* `mbedtls_gcm_update()` now takes an extra parameter to indicate the actual output length. In Mbed TLS 2.x, applications had to pass inputs consisting of whole 16-byte blocks except for the last block (this limitation has been lifted). In this case:
346 * As long as the input remains block-aligned, the output length is exactly the input length, as before.
347 * If the length of the last input is not a multiple of 16, alternative implementations may return the last partial block in the call to `mbedtls_gcm_finish()` instead of returning it in the last call to `mbedtls_gcm_update()`.
348* `mbedtls_gcm_finish()` now takes an extra output buffer for the last partial block. This is needed for alternative implementations that can only process a whole block at a time.
349SSL key export interface change
350-------------------------------
351
352This affects users of the SSL key export APIs:
353```
354 mbedtls_ssl_conf_export_keys_cb()
355 mbedtls_ssl_conf_export_keys_ext_cb()
356```
357
358Those APIs have been removed and replaced by the new API
359`mbedtls_ssl_set_export_keys_cb()`. This API differs from
360the previous key export API in the following ways:
361
362- It is no longer bound to an SSL configuration, but to an
363 SSL context. This allows users to more easily identify the
364 connection an exported key belongs to.
365- It no longer exports raw keys and IV.
366- A secret type parameter has been added to identify which key
367 is being exported. For TLS 1.2, only the master secret is
368 exported, but upcoming TLS 1.3 support will add other kinds of keys.
369- The callback now specifies a void return type, rather than
370 returning an error code. It is the responsibility of the application
371 to handle failures in the key export callback, for example by
372 shutting down the TLS connection.
373
374For users which do not rely on raw keys and IV, adjusting to the new
375callback type should be straightforward - see the example programs
376programs/ssl/ssl_client2 and programs/ssl/ssl_server2 for callbacks
377for NSSKeylog, EAP-TLS and DTLS-SRTP.
378
379Users which require access to the raw keys used to secure application
380traffic may derive those by hand based on the master secret and the
381handshake transcript hashes which can be obtained from the raw data
382on the wire. Such users are also encouraged to reach out to the
383Mbed TLS team on the mailing list, to let the team know about their
384use case.
385The RNG parameter is now mandatory for all functions that accept one
386--------------------------------------------------------------------
387
388This change affects all users who called a function accepting a `f_rng`
389parameter with `NULL` as the value of this argument; this is no longer
390supported.
391
392The changed functions are: the X.509 CRT and CSR writing functions; the PK and
393RSA sign and decrypt functions; `mbedtls_rsa_private()`; the functions in DHM
394and ECDH that compute the shared secret; the scalar multiplication functions in
395ECP.
396
397You now need to pass a properly seeded, cryptographically secure RNG to all
398functions that accept a `f_rng` parameter. It is of course still possible to
399pass `NULL` as the context pointer `p_rng` if your RNG function doesn't need a
400context.
401
402Alternative implementations of a module (enabled with the `MBEDTLS_module_ALT`
403configuration options) may have their own internal and are free to ignore the
404`f_rng` argument but must allow users to pass one anyway.
405
406Some functions gained an RNG parameter
407--------------------------------------
408
409This affects users of the following functions: `mbedtls_ecp_check_pub_priv()`,
410`mbedtls_pk_check_pair()`, `mbedtls_pk_parse_key()`, and
411`mbedtls_pk_parse_keyfile()`.
412
413You now need to pass a properly seeded, cryptographically secure RNG when
414calling these functions. It is used for blinding, a counter-measure against
415side-channel attacks.
416
417The configuration option `MBEDTLS_ECP_NO_INTERNAL_RNG` was removed
418------------------------------------------------------------------
419
420This doesn't affect users of the default configuration; it only affects people
421who were explicitly setting this option.
422
423This was a trade-off between code size and counter-measures; it is no longer
424relevant as the counter-measure is now always on at no cost in code size.
425Remove MaximumFragmentLength (MFL) query API
426-----------------------------------------------------------------
427
428This affects users which use the MFL query APIs
429`mbedtls_ssl_get_{input,output}_max_frag_len()` to
430infer upper bounds on the plaintext size of incoming and
431outgoing record.
432
433Users should switch to `mbedtls_ssl_get_max_{in,out}_record_payload()`
434instead, which also provides such upper bounds but takes more factors
435than just the MFL configuration into account.
436Change MBEDTLS_ECP_FIXED_POINT_OPTIM behaviour
437------------------------------------------------------
438
439The option `MBEDTLS_ECP_FIXED_POINT_OPTIM` now increase code size and it does
440not increase peak RAM usage anymore.
441
442If you are limited by code size, you can define `MBEDTLS_ECP_FIXED_POINT_OPTIM`
443to `0` in your config file. The impact depends on the number and size of
444enabled curves. For example, for P-256 the difference is 1KB; see the documentation
445of this option for details.
446
447Replaced MBEDTLS_SHA512_NO_SHA384 with MBEDTLS_SHA384_C
448------------------------------------------------------
449
450This does not affect users who use the default `mbedtls_config.h`.
451MBEDTLS_SHA512_NO_SHA384 was disabled by default, now MBEDTLS_SHA384_C is
452enabled by default.
453
454If you were using a config file with both MBEDTLS_SHA512_C and
455MBEDTLS_SHA512_NO_SHA384, then just remove the MBEDTLS_SHA512_NO_SHA384.
456If you were using a config file with MBEDTLS_SHA512_C and without
457MBEDTLS_SHA512_NO_SHA384 and you need the SHA-384 algorithm, then add
458`#define MBEDTLS_SHA384_C` to your config file.
459Move part of timing module out of the library
460--
461
462The change affects users who use any of the following functions:
463`mbedtls_timing_self_test()`, `mbedtls_hardclock_poll()`,
464`mbedtls_timing_hardclock()` and `mbedtls_set_alarm()`.
465
466If you were relying on these functions, you'll now need to change to using your
467platform's corresponding functions directly.
468Extra parameter for the output buffer size
469------------------------------------------
470
471The following functions now take an extra parameter indicating the size of the output buffer:
472
473* `mbedtls_ecdsa_write_signature()`, `mbedtls_ecdsa_write_signature_restartable()`
474* `mbedtls_pk_sign()`, `mbedtls_pk_sign_restartable()`
475
476The requirements for the output buffer have not changed, but passing a buffer that is too small now reliably causes the functions to return an error, rather than overflowing the buffer.
477Relaxed semantics for PSK configuration
478-----------------------------------------------------------------
479
480This affects users which call the PSK configuration APIs
481`mbedtlsl_ssl_conf_psk()` and `mbedtls_ssl_conf_psk_opaque()`
482multiple times on the same SSL configuration.
483
484In Mbed TLS 2.x, users would observe later calls overwriting
485the effect of earlier calls, with the prevailing PSK being
486the one that has been configured last. In Mbed TLS 3.0,
487calling `mbedtls_ssl_conf_[opaque_]psk()` multiple times
488will return an error, leaving the first PSK intact.
489
490To achieve equivalent functionality when migrating to Mbed TLS 3.0,
491users calling `mbedtls_ssl_conf_[opaque_]psk()` multiple times should
492remove all but the last call, so that only one call to _either_
493`mbedtls_ssl_conf_psk()` _or_ `mbedtls_ssl_conf_psk_opaque()`
494remains.
495Remove the configuration to enable weak ciphersuites in SSL / TLS
496-----------------------------------------------------------------
497
498This does not affect users who use the default `mbedtls_config.h`, as this option was
499already off by default.
500
501If you were using a weak cipher, please switch to any of the modern,
502recommended ciphersuites (based on AES-GCM, AES-CCM or ChachaPoly for example)
503and if your peer doesn't support any, encourage them to upgrade their software.
504
505If you were using a ciphersuite without encryption, you just have to
506enable MBEDTLS_CIPHER_NULL_CIPHER now.
507Remove the `MBEDTLS_SSL_MAX_CONTENT_LEN` configuration option
508-------------------------------------------------------------
509
510This affects users who use the `MBEDTLS_SSL_MAX_CONTENT_LEN` option to
511set the maximum length of incoming and outgoing plaintext fragments,
512which can save memory by reducing the size of the TLS I/O buffers.
513
514This option is replaced by the more fine-grained options
515`MBEDTLS_SSL_IN_CONTENT_LEN` and `MBEDTLS_SSL_OUT_CONTENT_LEN` that set
516the maximum incoming and outgoing plaintext fragment lengths, respectively.
517Remove the option to build the library without any entropy sources
518------------------------------------------------------------------
519
520This does not affect users who use the default `mbedtls_config.h`, as this option was
521already off by default.
522
523If you were using the `MBEDTLS_TEST_NULL_ENTROPY` option and your platform
524doesn't have any entropy source, you should use `MBEDTLS_ENTROPY_NV_SEED`
525and make sure your device is provisioned with a strong random seed.
526Alternatively, for testing purposes only, you can create and register a fake
527entropy function.
528Remove the mode parameter from RSA functions
529--------------------------------------------
530
531This affects all users who use the RSA encryption, decryption, sign and
532verify APIs.
533
534The RSA module no longer supports private-key operations with the public key or
535vice versa. As a consequence, RSA operation functions no longer have a mode
536parameter. If you were calling RSA operations with the normal mode (public key
537for verification or encryption, private key for signature or decryption), remove
538the `MBEDTLS_MODE_PUBLIC` or `MBEDTLS_MODE_PRIVATE` argument. If you were calling
539RSA operations with the wrong mode, which rarely makes sense from a security
540perspective, this is no longer supported.
541
542Remove the RNG parameter from RSA verify functions
543--------------------------------------------------
544
545RSA verification functions also no longer take random generator arguments (this
546was only needed when using a private key). This affects all applications using
547the RSA verify functions.
548
549Remove the SSL API mbedtls_ssl_get_session_pointer()
550-----------------------------------------------------------------
551
552This affects two classes of users:
553
5541. Users who manually inspect parts of the current session through
555 direct structure field access.
556
5572. Users of session resumption who query the current session
558 via `mbedtls_ssl_get_session_pointer()` prior to saving or exporting
559 it via `mbedtls_ssl_session_copy()` or `mbedtls_ssl_session_save()`,
560 respectively.
561
562Migration paths:
563
5641. Mbed TLS 3.0 does not offer a migration path for the usecase 1: Like many
565 other Mbed TLS structures, the structure of `mbedtls_ssl_session` is no
566 longer part of the public API in Mbed TLS 3.0, and direct structure field
567 access is no longer supported. Please see the corresponding migration guide.
568
5692. Users should replace calls to `mbedtls_ssl_get_session_pointer()` by
570 calls to `mbedtls_ssl_get_session()` as demonstrated in the example
571 program `programs/ssl/ssl_client2.c`.
572 Remove the config option MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
573--------------------------------------------------------------------------
574
575This change does not affect users of the default configuration; it only affect
576users who enable this option.
577
578The X.509 standard says that implementations must reject critical extensions that
579they don't recognize, and this is what Mbed TLS does by default. This option
580allowed to continue parsing those certificates but didn't provide a convenient
581way to handle those extensions.
582
583The migration path from that option is to use the
584`mbedtls_x509_crt_parse_der_with_ext_cb()` function which is functionally
585equivalent to `mbedtls_x509_crt_parse_der()`, and/or
586`mbedtls_x509_crt_parse_der_nocopy()` but it calls the callback with every
587unsupported certificate extension and additionally the "certificate policies"
588extension if it contains any unsupported certificate policies.
589Remove `MBEDTLS_X509_CHECK_*_KEY_USAGE` options from `mbedtls_config.h`
590-------------------------------------------------------------------
591
592This change affects users who have chosen the configuration options to disable the
593library's verification of the `keyUsage` and `extendedKeyUsage` fields of x509
594certificates.
595
596The `MBEDTLS_X509_CHECK_KEY_USAGE` and `MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE`
597configuration options are removed and the X509 code now behaves as if they were
598always enabled. It is consequently not possible anymore to disable at compile
599time the verification of the `keyUsage` and `extendedKeyUsage` fields of X509
600certificates.
601
602The verification of the `keyUsage` and `extendedKeyUsage` fields is important,
603disabling it can cause security issues and it is thus not recommended. If the
604verification is for some reason undesirable, it can still be disabled by means
605of the verification callback function passed to `mbedtls_x509_crt_verify()` (see
606the documentation of this function for more information).
607Remove MD2, MD4, RC4, Blowfish and XTEA algorithms
608--
609
610This change affects users of the MD2, MD4, RC4, Blowfish and XTEA algorithms.
611
612They are already niche or obsolete and most of them are weak or broken. For
613those reasons possible users should consider switching to modern and safe
614alternatives to be found in literature.
615Remove MBEDTLS_SSL_DTLS_BADMAC_LIMIT option
616-------------------------------------------
617
618This change does not affect users who used the default `mbedtls_config.h`, as the option
619MBEDTLS_SSL_DTLS_BADMAC_LIMIT was already on by default.
620
621This option was a trade-off between functionality and code size: it allowed
622users who didn't need that feature to avoid paying the cost in code size, by
623disabling it.
624
625This option is no longer present, but its functionality is now always enabled.
626Deprecated functions were removed from AES
627------------------------------------------
628
629The functions `mbedtls_aes_encrypt()` and `mbedtls_aes_decrypt()` were
630removed.
631
632If you're simply using the AES module, you should be calling the higher-level
633functions `mbedtls_aes_crypt_xxx()`.
634
635If you're providing an alternative implementation using
636`MBEDTLS_AES_ENCRYPT_ALT` or `MBEDTLS_AES_DECRYPT_ALT`, you should be
637replacing the removed functions with `mbedtls_internal_aes_encrypt()` and
638`mbedtls_internal_aes_decrypt()` respectively.
639
640Deprecated functions were removed from bignum
641---------------------------------------------
642
643The function `mbedtls_mpi_is_prime()` was removed. Please use
644`mbedtls_mpi_is_prime_ext()` instead which additionally allows specifying the
645number of Miller-Rabin rounds.
646
647Deprecated functions were removed from cipher
648---------------------------------------------
649
650The functions `mbedtls_cipher_auth_encrypt()` and
651`mbedtls_cipher_auth_decrypt()` were removed. They were superseded by
652`mbedtls_cipher_auth_encrypt_ext()` and `mbedtls_cipher_auth_decrypt_ext()`
653respectively which additionally support key wrapping algorithms such as
654NIST_KW.
655
656Deprecated functions were removed from DRBGs
657--------------------------------------------
658
659The functions `mbedtls_ctr_drbg_update()` and `mbedtls_hmac_drbg_update()`
660were removed. They were superseded by `mbedtls_ctr_drbg_update_ret()` and
661`mbedtls_hmac_drbg_update_ret()` respectively.
662
663Deprecated functions were removed from ECDSA
664--------------------------------------------
665
666The functions `mbedtls_ecdsa_write_signature_det()` and
667`mbedtls_ecdsa_sign_det()` were removed. They were superseded by
668`mbedtls_ecdsa_write_signature()` and `mbedtls_ecdsa_sign_det_ext()`
669respectively.
670
671Deprecated functions were removed from SSL
672------------------------------------------
673
674The function `mbedtls_ssl_conf_dh_param()` was removed. Please use
675`mbedtls_ssl_conf_dh_param_bin()` or `mbedtls_ssl_conf_dh_param_ctx()` instead.
676
677The function `mbedtls_ssl_get_max_frag_len()` was removed. Please use
678`mbedtls_ssl_get_max_out_record_payload()` and
679`mbedtls_ssl_get_max_in_record_payload()`
680instead.
681
682Deprecated hex-encoded primes were removed from DHM
683---------------------------------------------------
684
685The macros `MBEDTLS_DHM_RFC5114_MODP_2048_P`, `MBEDTLS_DHM_RFC5114_MODP_2048_G`,
686`MBEDTLS_DHM_RFC3526_MODP_2048_P`, `MBEDTLS_DHM_RFC3526_MODP_2048_G`,
687`MBEDTLS_DHM_RFC3526_MODP_3072_P`, `MBEDTLS_DHM_RFC3526_MODP_3072_G`,
688`MBEDTLS_DHM_RFC3526_MODP_4096_P `and `MBEDTLS_DHM_RFC3526_MODP_4096_G` were
689removed. The primes from RFC 5114 are deprecated because their derivation is not
690documented and therefore their usage constitutes a security risk; they are fully
691removed from the library. Please use parameters from RFC3526 (still in the
692library, only in binary form) or RFC 7919 (also available in the library) or
693other trusted sources instead.
694
695Deprecated net.h file was removed
696---------------------------------
697
698The file `include/mbedtls/net.h` was removed because its only function was to
699include `mbedtls/net_sockets.h` which now should be included directly.
700Remove MBEDTLS_CHECK_PARAMS option
701----------------------------------
702
703This change does not affect users who use the default configuration; it only
704affects users who enabled that option.
705
706The option `MBEDTLS_CHECK_PARAMS` (disabled by default) enabled certain kinds
707of parameter validation”. It covered two kinds of validations:
708
709- In some functions that require a valid pointer, parameter validation checks
710that the pointer is non-null. With the feature disabled, a null pointer is not
711treated differently from any other invalid pointer, and typically leads to a
712runtime crash. 90% of the uses of the feature are of this kind.
713- In some functions that take an enum-like argument, parameter validation
714checks that the value is a valid one. With the feature disabled, an invalid
715value causes a silent default to one of the valid values.
716
717The default reaction to a failed check was to call a function
718`mbedtls_param_failed()` which the application had to provide. If this function
719returned, its caller returned an error `MBEDTLS_ERR_xxx_BAD_INPUT_DATA`.
720
721This feature was only used in some classic (non-PSA) cryptography modules. It was
722not used in X.509, TLS or in PSA crypto, and it was not implemented in all
723classic crypto modules.
724
725This feature has been removed. The library no longer checks for NULL pointers;
726checks for enum-like arguments will be kept or re-introduced on a case-by-case
727basis, but their presence will no longer be dependent on a compile-time option.
728
729Validation of enum-like values is somewhat useful, but not extremely important,
730because the parameters concerned are usually constants in applications.
731
732For more information see issue #4313.
733Remove MBEDTLS_SSL_RECORD_CHECKING option and enable its action by default
734--------------------------------------------------------------------------
735
736This change does not affect users who use the default mbedtls_config.h, as the
737option MBEDTLS_SSL_RECORD_CHECKING was already on by default.
738
739This option was added only to control compilation of one function,
740mbedtls_ssl_check_record(), which is only useful in some specific cases, so it
741was made optional to allow users who don't need it to save some code space.
742However, the same effect can be achieve by using link-time garbage collection.
743
744Users who changed the default setting of the option need to change the config/
745build system to remove that change.
746Remove the `MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3` option
747--
748
749This change does not affect users who were using the default configuration, as
750this option was already disabled by default. Also, it does not affect users who
751are working with current V3 X.509 certificates.
752
753Extensions were added in V3 of the X.509 specification, so pre-V3 certificates
754containing extensions were never compliant. Mbed TLS now rejects them with a
755parsing error in all configurations, as it did previously in the default
756configuration.
757
758If you are working with the pre-V3 certificates you need to switch to the
759current ones.
Dave Rodgman8cccbe12021-06-29 13:15:50 +0100760
761Rename mbedtls_*_ret() cryptography functions whose deprecated variants have been removed
762-----------------
763
764This change affects users who were using the `mbedtls_*_ret()` cryptography
765functions.
766
767Those functions were created based on now-deprecated functions according to a
768requirement that a function needs to return a value. This change brings back the
769original names of those functions. The renamed functions are:
770
771| name before this change | after the change |
772|------------------------------|--------------------------|
773| mbedtls_ctr_drbg_update_ret | mbedtls_ctr_drbg_update |
774| mbedtls_hmac_drbg_update_ret | mbedtls_hmac_drbg_update |
775| mbedtls_md5_starts_ret | mbedtls_md5_starts |
776| mbedtls_md5_update_ret | mbedtls_md5_update |
777| mbedtls_md5_finish_ret | mbedtls_md5_finish |
778| mbedtls_md5_ret | mbedtls_md5 |
779| mbedtls_ripemd160_starts_ret | mbedtls_ripemd160_starts |
780| mbedtls_ripemd160_update_ret | mbedtls_ripemd160_update |
781| mbedtls_ripemd160_finish_ret | mbedtls_ripemd160_finish |
782| mbedtls_ripemd160_ret | mbedtls_ripemd160 |
783| mbedtls_sha1_starts_ret | mbedtls_sha1_starts |
784| mbedtls_sha1_update_ret | mbedtls_sha1_update |
785| mbedtls_sha1_finish_ret | mbedtls_sha1_finish |
786| mbedtls_sha1_ret | mbedtls_sha1 |
787| mbedtls_sha256_starts_ret | mbedtls_sha256_starts |
788| mbedtls_sha256_update_ret | mbedtls_sha256_update |
789| mbedtls_sha256_finish_ret | mbedtls_sha256_finish |
790| mbedtls_sha256_ret | mbedtls_sha256 |
791| mbedtls_sha512_starts_ret | mbedtls_sha512_starts |
792| mbedtls_sha512_update_ret | mbedtls_sha512_update |
793| mbedtls_sha512_finish_ret | mbedtls_sha512_finish |
794| mbedtls_sha512_ret | mbedtls_sha512 |
795
796To migrate to the this change the user can keep the `*_ret` names in their code
797and include the `compat_2.x.h` header file which holds macros with proper
798renaming or to rename those function in their code according to the list from
799mentioned header file.
800
801
802
803Signature functions now require the hash length to match the expected value
804---------------------------------------------------------------------------
805
806This affects users of the PK API as well as users of the low-level API in the RSA module. Users of the PSA API or of the ECDSA module are unaffected.
807
808All the functions in the RSA module that accept a `hashlen` parameter used to
809ignore it unless the `md_alg` parameter was `MBEDTLS_MD_NONE`, indicating raw
810data was signed. The `hashlen` parameter is now always the size that is read
811from the `hash` input buffer. This length must be equal to the output size of
812the hash algorithm used when signing a hash. (The requirements when signing
813raw data are unchanged.) This affects the following functions:
814
815* `mbedtls_rsa_pkcs1_sign`, `mbedtls_rsa_pkcs1_verify`
816* `mbedtls_rsa_rsassa_pkcs1_v15_sign`, `mbedtls_rsa_rsassa_pkcs1_v15_verify`
817* `mbedtls_rsa_rsassa_pss_sign`, `mbedtls_rsa_rsassa_pss_verify`
818* `mbedtls_rsa_rsassa_pss_sign_ext`, `mbedtls_rsa_rsassa_pss_verify_ext`
819
820The signature functions in the PK module no longer accept 0 as the `hash_len` parameter. The `hash_len` parameter is now always the size that is read from the `hash` input buffer. This affects the following functions:
821
822* `mbedtls_pk_sign`, `mbedtls_pk_verify`
823* `mbedtls_pk_sign_restartable`, `mbedtls_pk_verify_restartable`
824* `mbedtls_pk_verify_ext`
825
826The migration path is to pass the correct value to those functions.
827Remove the padding parameters from mbedtls_rsa_init()
828-----------------------------------------------------
829
830This affects all users who use the RSA encryption, decryption, sign and
831verify APIs.
832
833The function mbedtls_rsa_init() no longer supports selecting the PKCS#1 v2.1
834encoding and its hash. It just selects the PKCS#1 v1.5 encoding by default. If
835you were using the PKCS#1 v2.1 encoding you now need, subsequently to the call
836to mbedtls_rsa_init(), to call mbedtls_rsa_set_padding() to set it.
837
838To choose the padding type when initializing a context, instead of
839```C
840 mbedtls_rsa_init(ctx, padding, hash_id);
841```
842, use
843```C
844 mbedtls_rsa_init(ctx);
845 mbedtls_rsa_set_padding(ctx, padding, hash_id);
846```
847
848To use PKCS#1 v1.5 padding, instead of
849```C
850 mbedtls_rsa_init(ctx, MBEDTLS_RSA_PKCS_V15, <ignored>);
851```
852, just use
853```C
854 mbedtls_rsa_init(ctx);
855```
856Separated MBEDTLS_SHA224_C and MBEDTLS_SHA256_C
857-----------------------------------------------------------------
858
859This does not affect users who use the default `mbedtls_config.h`. MBEDTLS_SHA256_C
860was enabled by default. Now both MBEDTLS_SHA256_C and MBEDTLS_SHA224_C are
861enabled.
862
863If you were using custom config file with MBEDTLS_SHA256_C enabled, then
864you will need to add `#define MBEDTLS_SHA224_C` option your config.
865Current version of the library does not support enabling MBEDTLS_SHA256_C
866without MBEDTLS_SHA224_C.
867Session Cache API Change
868-----------------------------------------------------------------
869
870This affects users who use `mbedtls_ssl_conf_session_cache()`
871to configure a custom session cache implementation different
872from the one Mbed TLS implements in `library/ssl_cache.c`.
873
874Those users will need to modify the API of their session cache
875implementation to that of a key-value store with keys being
876session IDs and values being instances of `mbedtls_ssl_session`:
877
878```
879typedef int mbedtls_ssl_cache_get_t( void *data,
880 unsigned char const *session_id,
881 size_t session_id_len,
882 mbedtls_ssl_session *session );
883typedef int mbedtls_ssl_cache_set_t( void *data,
884 unsigned char const *session_id,
885 size_t session_id_len,
886 const mbedtls_ssl_session *session );
887```
888
889Since the structure of `mbedtls_ssl_session` is no longer public from 3.0
890onwards, portable session cache implementations must not access fields of
891`mbedtls_ssl_session`. See the corresponding migration guide. Users that
892find themselves unable to migrate their session cache functionality without
893accessing fields of `mbedtls_ssl_session` should describe their usecase
894on the Mbed TLS mailing list.
895SHA-512 and SHA-256 output type change
896--------------------------
897
898The output parameter of `mbedtls_sha256_finish_ret()`, `mbedtls_sha256_ret()`, `mbedtls_sha512_finish_ret()`, `mbedtls_sha512_ret()` now has a pointer type rather than array type. This makes no difference in terms of C semantics, but removes spurious warnings in some compilers when outputting a SHA-384 hash into a 48-byte buffer or a SHA-224 hash into a 28-byte buffer.
899
900This makes no difference to a vast majority of applications. If your code takes a pointer to one of these functions, you may need to change the type of the pointer.
901
902Alternative implementations of the SHA256 and SHA512 modules must adjust their functions' prototype accordingly.
Dave Rodgman8cccbe12021-06-29 13:15:50 +0100903
Dave Rodgman8cccbe12021-06-29 13:15:50 +0100904Removal of some SSL error codes
905-----------------------------------------------------------------
906
907This affects users manually checking for the following error codes:
908- `MBEDTLS_ERR_SSL_CERTIFICATE_REQUIRED`
909- `MBEDTLS_ERR_SSL_INVALID_VERIFY_HASH`
910- `MBEDTLS_ERR_SSL_CERTIFICATE_TOO_LARGE`
911- `MBEDTLS_ERR_SSL_NO_CIPHER_CHOSEN`
912- `MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITE`
913- `MBEDTLS_ERR_SSL_BAD_HS_XXX`
914
915Migration paths:
916- `MBEDTLS_ERR_SSL_CERTIFICATE_REQUIRED` and `MBEDTLS_ERR_SSL_INVALID_VERIFY_HASH`
917 should never be returned from Mbed TLS, and there is no need to check for it.
918 Users should simply remove manual checks for those codes, and let the Mbed TLS
919 team know if -- contrary to the team's understanding -- there is in fact a situation
920 where one of them was ever returned.
921- `MBEDTLS_ERR_SSL_CERTIFICATE_TOO_LARGE` has been removed, and
922 `MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL` is returned instead if the user's own certificate
923 is too large to fit into the output buffers. Users should check for
924 `MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL` instead, and potentially compare the size of their
925 own certificate against the configured size of the output buffer to understand if
926 the error is due to an overly large certificate.
927-`MBEDTLS_ERR_SSL_NO_CIPHER_CHOSEN`, `MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITE` and all codes of the form `MBEDTLS_ERR_SSL_BAD_HS_XXX` have been replaced by `MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE`.
928
929 Modified semantics of mbedtls_ssl_{get,set}_session()
930-----------------------------------------------------------------
931
932This affects users who call `mbedtls_ssl_get_session()` or
933`mbedtls_ssl_set_session()` multiple times on the same SSL context
934representing an established TLS 1.2 connection.
935Those users will now observe the second call to fail with
936`MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE`.
937
938Migration path:
939- Exporting the same TLS 1.2 connection multiple times via
940 `mbedtls_ssl_get_session()` leads to multiple copies of
941 the same session. This use of `mbedtls_ssl_get_session()`
942 is discouraged, and the following should be considered:
943 * If the various session copies are later loaded into
944 fresh SSL contexts via `mbedtls_ssl_set_session()`,
945 export via `mbedtls_ssl_get_session()` only once and
946 load the same session into different contexts via
947 `mbedtls_ssl_set_session()`. Since `mbedtls_ssl_set_session()`
948 makes a copy of the session that's being loaded, this
949 is functionally equivalent.
950 * If the various session copies are later serialized
951 via `mbedtls_ssl_session_save()`, export and serialize
952 the session only once via `mbedtls_ssl_get_session()` and
953 `mbedtls_ssl_session_save()` and make copies of the raw
954 data instead.
955- Calling `mbedtls_ssl_set_session()` multiple times in Mbed TLS 2.x
956 is not useful since subsequent calls overwrite the effect of previous
957 calls. Applications achieve equivalent functional behaviour by
958 issuing only the very last call to `mbedtls_ssl_set_session()`.
959
960 Turn MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE configuration option into a runtime option
961 --
962
963This change affects users who were enabling MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
964option in the `mbedtls_config.h`
965
966This option has been removed and a new function with similar functionality has
967been introduced into the SSL API.
968
969This new function `mbedtls_ssl_conf_preference_order()` can be used to
970change the preferred order of ciphersuites on the server to those used on the client,
971e.g.: `mbedtls_ssl_conf_preference_order(ssl_config, MBEDTLS_SSL_SRV_CIPHERSUITE_ORDER_CLIENT)`
972has the same effect as enabling the removed option. The default state is to use
973the server order of suites.
Dave Rodgmane45e6402021-06-29 13:21:55 +0100974
975Some function parameters were made const
976----------------------------------------
977
978Various functions in the PK and ASN.1 modules had a `const` qualifier added to
979some of their parameters.
980
981This normally doesn't affect your code, unless you use pointers to reference
982those functions. In this case, you'll need to update the type of your pointers
983in order to match the new signature.