blob: f8b3505b5173319dd6955bbe41f69821c0549410 [file] [log] [blame] [view]
Hanno Beckerd5c9cc72021-05-24 11:12:43 +01001SSL key export interface change
2-------------------------------
3
4This affects users of the SSL key export APIs:
5```
6 mbedtls_ssl_conf_export_keys_cb()
7 mbedtls_ssl_conf_export_keys_ext_cb()
8```
9
Hanno Becker7e6c1782021-06-08 09:24:55 +010010Those APIs have been removed and replaced by the new API
11`mbedtls_ssl_set_export_keys_cb()`. This API differs from
12the previous key export API in the following ways:
13
14- It is no longer bound to an SSL configuration, but to an
15 SSL context. This allows users to more easily identify the
16 connection an exported key belongs to.
Hanno Beckerd5c9cc72021-05-24 11:12:43 +010017- It no longer exports raw keys and IV.
18- A secret type parameter has been added to identify which key
19 is being exported. For TLS 1.2, only the master secret is
20 exported, but upcoming TLS 1.3 support will add other kinds of keys.
Dave Rodgman5ec50032021-06-22 13:41:56 +010021- The callback now specifies a void return type, rather than
22 returning an error code. It is the responsibility of the application
23 to handle failures in the key export callback, for example by
24 shutting down the TLS connection.
Hanno Beckerd5c9cc72021-05-24 11:12:43 +010025
26For users which do not rely on raw keys and IV, adjusting to the new
27callback type should be straightforward - see the example programs
28programs/ssl/ssl_client2 and programs/ssl/ssl_server2 for callbacks
29for NSSKeylog, EAP-TLS and DTLS-SRTP.
30
31Users which require access to the raw keys used to secure application
32traffic may derive those by hand based on the master secret and the
33handshake transcript hashes which can be obtained from the raw data
34on the wire. Such users are also encouraged to reach out to the
35Mbed TLS team on the mailing list, to let the team know about their
36use case.