openssl_stream_adapter: improve ssl handshake error logging
BUG=webrtc:11817 Change-Id: Ia8a04779c028bd8071012211e4ac1cb1c424e759 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180621 Reviewed-by: Taylor <deadbeef@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com> Cr-Commit-Position: refs/heads/master@{#31861}
This commit is contained in:

committed by
Commit Bot

parent
0031b27671
commit
491fa44ed9
@ -881,12 +881,13 @@ int OpenSSLStreamAdapter::ContinueSSL() {
|
||||
|
||||
case SSL_ERROR_ZERO_RETURN:
|
||||
default:
|
||||
RTC_LOG(LS_VERBOSE) << " -- error " << code;
|
||||
SSLHandshakeError ssl_handshake_err = SSLHandshakeError::UNKNOWN;
|
||||
int err_code = ERR_peek_last_error();
|
||||
if (err_code != 0 && ERR_GET_REASON(err_code) == SSL_R_NO_SHARED_CIPHER) {
|
||||
ssl_handshake_err = SSLHandshakeError::INCOMPATIBLE_CIPHERSUITE;
|
||||
}
|
||||
RTC_LOG(LS_VERBOSE) << " -- error " << code << ", " << err_code << ", "
|
||||
<< ERR_GET_REASON(err_code);
|
||||
SignalSSLHandshakeError(ssl_handshake_err);
|
||||
return (ssl_error != 0) ? ssl_error : -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user