mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-24 08:26:48 +00:00
Make keyu material length in \ out
Make the key material length in mbedtls_ssl_get_dtls_srtp_key_material to be in\out, like it is done all over the library Signed-off-by: Johan Pascal <johan.pascal@belledonne-communications.com>
This commit is contained in:
parent
591f162bed
commit
a37326abb1
|
@ -3232,7 +3232,7 @@ mbedtls_ssl_srtp_profile mbedtls_ssl_get_dtls_srtp_protection_profile( const mbe
|
||||||
*
|
*
|
||||||
* \return 0 on succes, MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL if the key buffer is too small to hold the generated key
|
* \return 0 on succes, MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL if the key buffer is too small to hold the generated key
|
||||||
*/
|
*/
|
||||||
int mbedtls_ssl_get_dtls_srtp_key_material( const mbedtls_ssl_context *ssl, unsigned char *key, const size_t key_buffer_len, size_t *key_len );
|
int mbedtls_ssl_get_dtls_srtp_key_material( const mbedtls_ssl_context *ssl, unsigned char *key, size_t *key_len );
|
||||||
#endif /* MBEDTLS_SSL_DTLS_SRTP */
|
#endif /* MBEDTLS_SSL_DTLS_SRTP */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4771,11 +4771,11 @@ mbedtls_ssl_srtp_profile mbedtls_ssl_get_dtls_srtp_protection_profile( const mbe
|
||||||
return( ssl->dtls_srtp_info.chosen_dtls_srtp_profile);
|
return( ssl->dtls_srtp_info.chosen_dtls_srtp_profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
int mbedtls_ssl_get_dtls_srtp_key_material( const mbedtls_ssl_context *ssl, unsigned char *key, const size_t key_buffer_len, size_t *key_len ) {
|
int mbedtls_ssl_get_dtls_srtp_key_material( const mbedtls_ssl_context *ssl, unsigned char *key, size_t *key_len ) {
|
||||||
*key_len = 0;
|
*key_len = 0;
|
||||||
|
|
||||||
/* check output buffer size */
|
/* check output buffer size */
|
||||||
if ( key_buffer_len < ssl->dtls_srtp_info.dtls_srtp_keys_len) {
|
if ( *key_len < ssl->dtls_srtp_info.dtls_srtp_keys_len) {
|
||||||
return MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL;
|
return MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue