1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Use a specific function in the PSK callback

This commit is contained in:
Manuel Pégourié-Gonnard
2015-05-07 15:59:54 +01:00
parent 0a4fb09534
commit 4b68296626
3 changed files with 89 additions and 20 deletions

View File

@ -678,8 +678,7 @@ int psk_callback( void *p_info, mbedtls_ssl_context *ssl,
if( name_len == strlen( cur->name ) &&
memcmp( name, cur->name, name_len ) == 0 )
{
return( mbedtls_ssl_set_psk( ssl, cur->key, cur->key_len,
name, name_len ) );
return( mbedtls_ssl_set_hs_psk( ssl, cur->key, cur->key_len ) );
}
cur = cur->next;