mbedtls/programs/ssl
Hanno Becker b64ba5f2c0 Add support for opaque PSKs to ssl_server2 example application
This commit adds command line parameters `psk_slot` and `psk_list_slot`
to the example application `programs/ssl/ssl_server2`. These have the
following semantics:

- `psk_slot`: The same semantics as for the `ssl_client2` example
   application. That is, if a PSK is configured through the use
   of the command line parameters `psk` and `psk_identity`, then
   `psk_slot=X` can be used to import the PSK into PSA key slot X
   and registering it statically with the SSL configuration through
   the new API call mbedtls_ssl_conf_hs_opaque().
- `psk_list_slot`: In addition to the static PSK registered in the
   the SSL configuration, servers can register a callback for picking
   the PSK corresponding to the PSK identity that the client chose.
   The `ssl_server2` example application uses such a callback to select
   the PSK from a list of PSKs + Identities provided through the
   command line parameter `psk_list`, and to register the selected
   PSK via `mbedtls_ssl_set_hs_psk()`. In this case, the new parameter
   `psk_list_slot=X` has the effect of registering all PSKs provided in
   in `psk_list` as PSA keys in the key slots starting from slot `X`,
   and having the PSK selection callback register the chosen PSK
   through the new API function `mbedtls_ssl_set_hs_psk_opaque()`.
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_server2.c Add support for opaque PSKs to ssl_server2 example application 2018-11-21 21:12:58 +00:00
ssl_server.c Fix minor code style issues 2018-05-15 09:21:57 +01:00