Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API for TLS server PSK callback #16071

Open
GregBurns opened this issue May 10, 2019 · 0 comments
Open

Add API for TLS server PSK callback #16071

GregBurns opened this issue May 10, 2019 · 0 comments
Assignees
Labels
area: Security Security Enhancement Changes/Updates/Additions to existing features

Comments

@GregBurns
Copy link

mbedtls has an API mbedtls_ssl_conf_psk_cb() for requesting the PSK for a specific identifier. This functionality is not currently exposed in Zephyr. The mbedtls_ssl_conf_psk() API exposed via setsockopt only allows a single identifier to be associated with the PSK.

This is the application note from the mbedtls documentation for mbedtls_ssl_conf_psk() :

Note
This is mainly useful for clients. Servers will usually want to use mbedtls_ssl_conf_psk_cb() instead.
Currently clients can only register one pre-shared key. In other words, the servers' identity hint is ignored.

An interim solution would be to provide an API to obtain a pointer to the mbedtls_ssl_config struct for a socket so the application could make the appropriate call to mbedtls. This would at least address porting of existing applications that currently make use of mbedtls_ssl_conf_psk_cb()

@GregBurns GregBurns added the Enhancement Changes/Updates/Additions to existing features label May 10, 2019
@ceolin ceolin self-assigned this Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Security Security Enhancement Changes/Updates/Additions to existing features
Projects
Status: Todo
Development

No branches or pull requests

3 participants