mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Set authmode to optional, if not set
Set authmode to `MBEDTLS_SSL_VERIFY_REQUIRED` when using dtls-srtp, in case authmode was not set. This is to support self signed certificates received by the server, which is the case with webRTC. Certificate fingerprints are verified outside the dtls stack, as defined in RFC 5763. Signed-off-by: Johan Pascal <johan.pascal@belledonne-communications.com>
This commit is contained in:
@ -3021,9 +3021,9 @@ static int ssl_write_certificate_request( mbedtls_ssl_context *ssl )
|
||||
else
|
||||
#endif
|
||||
#if defined(MBEDTLS_SSL_DTLS_SRTP)
|
||||
/* check if we have a chosen srtp protection profile */
|
||||
if ( ssl->dtls_srtp_info.chosen_dtls_srtp_profile != MBEDTLS_SRTP_UNSET_PROFILE ) {
|
||||
authmode = MBEDTLS_SSL_VERIFY_REQUIRED;
|
||||
/* check if we have a chosen srtp protection profile, force verify mode to be at least OPTIONAL */
|
||||
if ( ( ssl->dtls_srtp_info.chosen_dtls_srtp_profile != MBEDTLS_SRTP_UNSET_PROFILE ) && ( ssl->conf->authmode == MBEDTLS_SSL_VERIFY_NONE ) ) {
|
||||
authmode = MBEDTLS_SSL_VERIFY_OPTIONAL;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user