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

Side by Side 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, 4 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 unified diff | Download patch
« no previous file with comments | « webrtc/api/webrtcsession.cc ('k') | webrtc/base/sslstreamadapter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 } 847 }
848 break; 848 break;
849 849
850 case SSL_ERROR_WANT_WRITE: 850 case SSL_ERROR_WANT_WRITE:
851 LOG(LS_VERBOSE) << " -- error want write"; 851 LOG(LS_VERBOSE) << " -- error want write";
852 break; 852 break;
853 853
854 case SSL_ERROR_ZERO_RETURN: 854 case SSL_ERROR_ZERO_RETURN:
855 default: 855 default:
856 LOG(LS_VERBOSE) << " -- error " << code; 856 LOG(LS_VERBOSE) << " -- error " << code;
857 SSLHandshakeError ssl_handshake_err = SSLHandshakeError::UNKNOWN;
858 int err_code = ERR_peek_last_error();
859 if (err_code != 0 && ERR_GET_REASON(err_code) == SSL_R_NO_SHARED_CIPHER) {
860 ssl_handshake_err = SSLHandshakeError::INCOMPATIBLE_CIPHERSUITE;
861 }
862 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
857 return (ssl_error != 0) ? ssl_error : -1; 863 return (ssl_error != 0) ? ssl_error : -1;
858 } 864 }
859 865
860 return 0; 866 return 0;
861 } 867 }
862 868
863 void OpenSSLStreamAdapter::Error(const char* context, int err, bool signal) { 869 void OpenSSLStreamAdapter::Error(const char* context, int err, bool signal) {
864 LOG(LS_WARNING) << "OpenSSLStreamAdapter::Error(" 870 LOG(LS_WARNING) << "OpenSSLStreamAdapter::Error("
865 << context << ", " << err << ")"; 871 << context << ", " << err << ")";
866 state_ = SSL_ERROR; 872 state_ = SSL_ERROR;
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 return true; 1225 return true;
1220 } 1226 }
1221 } 1227 }
1222 1228
1223 return false; 1229 return false;
1224 } 1230 }
1225 1231
1226 } // namespace rtc 1232 } // namespace rtc
1227 1233
1228 #endif // HAVE_OPENSSL_SSL_H 1234 #endif // HAVE_OPENSSL_SSL_H
OLDNEW
« 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