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

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: Use enum for handshake error code. 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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 } 832 }
833 break; 833 break;
834 834
835 case SSL_ERROR_WANT_WRITE: 835 case SSL_ERROR_WANT_WRITE:
836 LOG(LS_VERBOSE) << " -- error want write"; 836 LOG(LS_VERBOSE) << " -- error want write";
837 break; 837 break;
838 838
839 case SSL_ERROR_ZERO_RETURN: 839 case SSL_ERROR_ZERO_RETURN:
840 default: 840 default:
841 LOG(LS_VERBOSE) << " -- error " << code; 841 LOG(LS_VERBOSE) << " -- error " << code;
842 SSLHandshakeError ssl_handshake_err = SSLHandshakeError::UNKNOWN;
843 int err_code = ERR_peek_last_error();
844 if (err_code != 0 && ERR_GET_REASON(err_code) == SSL_R_NO_SHARED_CIPHER) {
845 ssl_handshake_err = SSLHandshakeError::INCOMPATIBLE_CIPHERSUITE;
846 }
847 SignalSSLHandshakeError(ssl_handshake_err);
842 return (ssl_error != 0) ? ssl_error : -1; 848 return (ssl_error != 0) ? ssl_error : -1;
843 } 849 }
844 850
845 return 0; 851 return 0;
846 } 852 }
847 853
848 void OpenSSLStreamAdapter::Error(const char* context, int err, bool signal) { 854 void OpenSSLStreamAdapter::Error(const char* context, int err, bool signal) {
849 LOG(LS_WARNING) << "OpenSSLStreamAdapter::Error(" 855 LOG(LS_WARNING) << "OpenSSLStreamAdapter::Error("
850 << context << ", " << err << ")"; 856 << context << ", " << err << ")";
851 state_ = SSL_ERROR; 857 state_ = SSL_ERROR;
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 return true; 1186 return true;
1181 } 1187 }
1182 } 1188 }
1183 1189
1184 return false; 1190 return false;
1185 } 1191 }
1186 1192
1187 } // namespace rtc 1193 } // namespace rtc
1188 1194
1189 #endif // HAVE_OPENSSL_SSL_H 1195 #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