mbedtls/programs/ssl
Hanno Becker e86964ca01 Add support for opaque PSKs in ssl_client2 example program
This commit adds support for the use of PSA-based opaque PSKs
in the TLS client example application programs/ssl/ssl_client2.

Specifically, a numerical command line option `psk_slot` with
the following constraints and semantics is added:
- It can only be used alongside the provisioning of a raw PSK
  through the preexisting `psk` command line option.
- It can only be used if both TLS 1.2 and a PSK-only ciphersuite
  are enforced through the appropriate use of the `min_version`
  and `force_ciphersuite` command line options.
- If the previous conditions are met, setting `psk_slot=d` will
  result in the PSA key slot with identifier `d` being populated
  with the raw PSK data specified through the `psk` parameter
  and passed to Mbed TLS via `mbedtls_ssl_conf_psk_opaque()`
  prior to the handshake.

Enforcing the TLS version and ciphersuite is necessary to determine
the exact KDF algorithm the PSK will be used for. This is required
as it is currently not possible to set up a key without specifying
exactly one algorithm the key may be used with.
2018-11-21 21:12:58 +00:00
..
CMakeLists.txt Fix whitespace in CMakeLists.txt 2015-06-25 10:59:57 +02:00
dtls_client.c Change the default IP addresses for DTLS samples 2018-05-12 18:23:32 +01:00
dtls_server.c Change the default IP addresses for DTLS samples 2018-05-12 18:23:32 +01:00
mini_client.c Rename net.{c,h} to net_sockets.{c,h} 2016-09-26 23:23:52 +01:00
ssl_client1.c Fix typo in platform macro defines for examples 2018-06-14 23:01:55 +01:00
ssl_client2.c Add support for opaque PSKs in ssl_client2 example program 2018-11-21 21:12:58 +00:00
ssl_fork_server.c Fix typo in platform macro defines for examples 2018-06-14 23:01:55 +01:00
ssl_mail_client.c Fix Wformat-overflow warning in ssl_mail_client.c 2018-08-14 11:02:23 +01:00
ssl_pthread_server.c Rename net.{c,h} to net_sockets.{c,h} 2016-09-26 23:23:52 +01:00
ssl_server.c Fix minor code style issues 2018-05-15 09:21:57 +01:00
ssl_server2.c Initialize PSA Crypto implementation in ssl_server2 2018-11-21 21:08:43 +00:00