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

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: Remove the new defined enum. Use the error code in ssl.h directly. 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
Index: webrtc/base/opensslstreamadapter.cc
diff --git a/webrtc/base/opensslstreamadapter.cc b/webrtc/base/opensslstreamadapter.cc
index e04eb04d67c8d05eee38938f406484ccbe5d5247..50753cade2bb0f2b880f915414c022ef4049b858 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;
+ int err_code = ERR_peek_last_error();
+ int err_reason = 0;
Zhi Huang 2016/07/27 21:04:14 I can leave a comment, like "Use 0 to represent un
+ if (err_code != 0 && ERR_GET_REASON(err_code) == SSL_R_NO_SHARED_CIPHER) {
+ err_reason = SSL_R_NO_SHARED_CIPHER;
+ }
+ SignalSSLHandshakeError(err_reason);
honghaiz3 2016/07/29 15:49:54 Should this just be int err_reason = ERR_GET_REAS
honghaiz3 2016/08/01 17:19:19 If you only want to log the error SSL_R_NO_SHARED_
return (ssl_error != 0) ? ssl_error : -1;
}

Powered by Google App Engine
This is Rietveld 408576698