Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Unified Diff: webrtc/base/opensslstreamadapter.cc

Issue 2167363002: Log how often DTLS negotiation failed because of incompatible ciphersuites. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Desctructor related compiling error. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/webrtcsession.cc ('k') | webrtc/base/sslstreamadapter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/opensslstreamadapter.cc
diff --git a/webrtc/base/opensslstreamadapter.cc b/webrtc/base/opensslstreamadapter.cc
index e04eb04d67c8d05eee38938f406484ccbe5d5247..257e172065c4a7a192b85341558cffb0afff4f01 100644
--- a/webrtc/base/opensslstreamadapter.cc
+++ b/webrtc/base/opensslstreamadapter.cc
@@ -854,6 +854,12 @@ int OpenSSLStreamAdapter::ContinueSSL() {
case SSL_ERROR_ZERO_RETURN:
default:
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;
+ }
+ SignalSSLHandshakeError(ssl_handshake_err);
skvlad 2016/07/27 00:29:18 I wonder if it could be better to directly log the
honghaiz3 2016/07/27 17:11:48 Are we potentially interested in knowing other typ
Zhi Huang 2016/07/27 21:04:13 I will remove the new defined enum and use the err
return (ssl_error != 0) ? ssl_error : -1;
}
« no previous file with comments | « webrtc/api/webrtcsession.cc ('k') | webrtc/base/sslstreamadapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698