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