blob: 5af2b61089d90345bc6d99c6a7f04aec848c326a [file] [log] [blame] [view]
Hanno Becker67e49a62021-05-14 20:02:42 +01001Relaxed semantics for PSK configuration
2-----------------------------------------------------------------
3
4This affects users which call the PSK configuration APIs
5`mbedtlsl_ssl_conf_psk()` and `mbedtls_ssl_conf_psk_opaque()`
6multiple times on the same SSL configuration.
7
8In Mbed TLS 2.x, users would observe later calls overwriting
9the effect of earlier calls, with the prevailing PSK being
10the one that has been configured last.
11
12To achieve equivalent functionality when migrating to Mbed TLS 3.0,
13users calling `mbedtls_ssl_conf_[opaque_]psk()` multiple times should
14remove all but the last call, so that only one call to _either_
15`mbedtls_ssl_conf_psk()` _or_ `mbedtls_ssl_conf_psk_opaque()`
16remains.
17
18However, if the _intent_ of the multiple calls to
19`mbedtls_ssl_conf_[opaque_]psk()` was to offer multiple PSKs, then
20users should _keep_ all calls and only check for the expected
21non-fatal failure code `MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE`
22indicating that no more PSKs could be buffered by the
23implementation.