mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Add test for export keys functionality
Add test in `ssl-opts.sh` that the export keys callback is actually called.
This commit is contained in:
@ -598,14 +598,17 @@ static int eap_tls_key_derivation ( void *p_expkey,
|
||||
eap_tls_keys *keys = (eap_tls_keys *)p_expkey;
|
||||
|
||||
( ( void ) kb );
|
||||
( ( void ) maclen );
|
||||
( ( void ) keylen );
|
||||
( ( void ) ivlen );
|
||||
memcpy( keys->master_secret, ms, sizeof( keys->master_secret ) );
|
||||
memcpy( keys->randbytes, client_random, 32 );
|
||||
memcpy( keys->randbytes + 32, server_random, 32 );
|
||||
keys->tls_prf_type = tls_prf_type;
|
||||
|
||||
if( opt.debug_level > 2 )
|
||||
{
|
||||
mbedtls_printf("exported maclen is %zu\n",maclen);
|
||||
mbedtls_printf("exported keylen is %zu\n",keylen);
|
||||
mbedtls_printf("exported ivlen is %zu\n",ivlen);
|
||||
}
|
||||
return( 0 );
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user