mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-28 08:37:25 +00:00
Remove '_ext' suffix from SSL key exporter API
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
parent
78ba2af7c2
commit
2d6e6f8fec
@ -1556,7 +1556,7 @@
|
||||
* (see Section 5 of RFC 5764), are not handled by this feature.
|
||||
* Instead, after successful completion of a handshake negotiating
|
||||
* the use of DTLS-SRTP, the extended key exporter API
|
||||
* mbedtls_ssl_conf_export_keys_ext_cb() should be used to implement
|
||||
* mbedtls_ssl_conf_export_keys_cb() should be used to implement
|
||||
* the key exporter described in Section 4.2 of RFC 5764 and RFC 5705
|
||||
* (this is implemented in the SSL example programs).
|
||||
* The resulting key should then be passed to an SRTP stack.
|
||||
|
@ -1035,7 +1035,7 @@ struct mbedtls_ssl_config
|
||||
#if defined(MBEDTLS_SSL_EXPORT_KEYS)
|
||||
/** Callback to export key block, master secret,
|
||||
* tls_prf and random bytes. Should replace f_export_keys */
|
||||
int (*MBEDTLS_PRIVATE(f_export_keys_ext))( void *, const unsigned char *,
|
||||
int (*MBEDTLS_PRIVATE(f_export_keys))( void *, const unsigned char *,
|
||||
const unsigned char *, size_t, size_t, size_t,
|
||||
const unsigned char[32], const unsigned char[32],
|
||||
mbedtls_tls_prf_types );
|
||||
@ -1941,7 +1941,7 @@ typedef int mbedtls_ssl_ticket_write_t( void *p_ticket,
|
||||
* \return 0 if successful, or
|
||||
* a specific MBEDTLS_ERR_XXX code.
|
||||
*/
|
||||
typedef int mbedtls_ssl_export_keys_ext_t( void *p_expkey,
|
||||
typedef int mbedtls_ssl_export_keys_t( void *p_expkey,
|
||||
const unsigned char *ms,
|
||||
const unsigned char *kb,
|
||||
size_t maclen,
|
||||
@ -2020,16 +2020,16 @@ void mbedtls_ssl_conf_export_keys_cb( mbedtls_ssl_config *conf,
|
||||
* \brief Configure extended key export callback.
|
||||
* (Default: none.)
|
||||
*
|
||||
* \note See \c mbedtls_ssl_export_keys_ext_t.
|
||||
* \note See \c mbedtls_ssl_export_keys_t.
|
||||
* \warning Exported key material must not be used for any purpose
|
||||
* before the (D)TLS handshake is completed
|
||||
*
|
||||
* \param conf SSL configuration context
|
||||
* \param f_export_keys_ext Callback for exporting keys
|
||||
* \param f_export_keys Callback for exporting keys
|
||||
* \param p_export_keys Context for the callback
|
||||
*/
|
||||
void mbedtls_ssl_conf_export_keys_ext_cb( mbedtls_ssl_config *conf,
|
||||
mbedtls_ssl_export_keys_ext_t *f_export_keys_ext,
|
||||
void mbedtls_ssl_conf_export_keys_cb( mbedtls_ssl_config *conf,
|
||||
mbedtls_ssl_export_keys_t *f_export_keys,
|
||||
void *p_export_keys );
|
||||
#endif /* MBEDTLS_SSL_EXPORT_KEYS */
|
||||
|
||||
|
@ -986,9 +986,9 @@ static int ssl_populate_transform( mbedtls_ssl_transform *transform,
|
||||
((void) mac_enc);
|
||||
|
||||
#if defined(MBEDTLS_SSL_EXPORT_KEYS)
|
||||
if( ssl->conf->f_export_keys_ext != NULL )
|
||||
if( ssl->conf->f_export_keys != NULL )
|
||||
{
|
||||
ssl->conf->f_export_keys_ext( ssl->conf->p_export_keys,
|
||||
ssl->conf->f_export_keys( ssl->conf->p_export_keys,
|
||||
master, keyblk,
|
||||
mac_key_len, keylen,
|
||||
iv_copy_len,
|
||||
@ -4185,11 +4185,11 @@ void mbedtls_ssl_conf_session_tickets_cb( mbedtls_ssl_config *conf,
|
||||
#endif /* MBEDTLS_SSL_SESSION_TICKETS */
|
||||
|
||||
#if defined(MBEDTLS_SSL_EXPORT_KEYS)
|
||||
void mbedtls_ssl_conf_export_keys_ext_cb( mbedtls_ssl_config *conf,
|
||||
mbedtls_ssl_export_keys_ext_t *f_export_keys_ext,
|
||||
void mbedtls_ssl_conf_export_keys_cb( mbedtls_ssl_config *conf,
|
||||
mbedtls_ssl_export_keys_t *f_export_keys,
|
||||
void *p_export_keys )
|
||||
{
|
||||
conf->f_export_keys_ext = f_export_keys_ext;
|
||||
conf->f_export_keys = f_export_keys;
|
||||
conf->p_export_keys = p_export_keys;
|
||||
}
|
||||
#endif
|
||||
|
@ -1739,19 +1739,19 @@ int main( int argc, char *argv[] )
|
||||
#if defined(MBEDTLS_SSL_EXPORT_KEYS)
|
||||
if( opt.eap_tls != 0 )
|
||||
{
|
||||
mbedtls_ssl_conf_export_keys_ext_cb( &conf, eap_tls_key_derivation,
|
||||
mbedtls_ssl_conf_export_keys_cb( &conf, eap_tls_key_derivation,
|
||||
&eap_tls_keying );
|
||||
}
|
||||
else if( opt.nss_keylog != 0 )
|
||||
{
|
||||
mbedtls_ssl_conf_export_keys_ext_cb( &conf,
|
||||
mbedtls_ssl_conf_export_keys_cb( &conf,
|
||||
nss_keylog_export,
|
||||
NULL );
|
||||
}
|
||||
#if defined( MBEDTLS_SSL_DTLS_SRTP )
|
||||
else if( opt.use_srtp != 0 )
|
||||
{
|
||||
mbedtls_ssl_conf_export_keys_ext_cb( &conf, dtls_srtp_key_derivation,
|
||||
mbedtls_ssl_conf_export_keys_cb( &conf, dtls_srtp_key_derivation,
|
||||
&dtls_srtp_keying );
|
||||
}
|
||||
#endif /* MBEDTLS_SSL_DTLS_SRTP */
|
||||
|
@ -2528,19 +2528,19 @@ int main( int argc, char *argv[] )
|
||||
#if defined(MBEDTLS_SSL_EXPORT_KEYS)
|
||||
if( opt.eap_tls != 0 )
|
||||
{
|
||||
mbedtls_ssl_conf_export_keys_ext_cb( &conf, eap_tls_key_derivation,
|
||||
mbedtls_ssl_conf_export_keys_cb( &conf, eap_tls_key_derivation,
|
||||
&eap_tls_keying );
|
||||
}
|
||||
else if( opt.nss_keylog != 0 )
|
||||
{
|
||||
mbedtls_ssl_conf_export_keys_ext_cb( &conf,
|
||||
mbedtls_ssl_conf_export_keys_cb( &conf,
|
||||
nss_keylog_export,
|
||||
NULL );
|
||||
}
|
||||
#if defined( MBEDTLS_SSL_DTLS_SRTP )
|
||||
else if( opt.use_srtp != 0 )
|
||||
{
|
||||
mbedtls_ssl_conf_export_keys_ext_cb( &conf, dtls_srtp_key_derivation,
|
||||
mbedtls_ssl_conf_export_keys_cb( &conf, dtls_srtp_key_derivation,
|
||||
&dtls_srtp_keying );
|
||||
}
|
||||
#endif /* MBEDTLS_SSL_DTLS_SRTP */
|
||||
|
Loading…
x
Reference in New Issue
Block a user