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

Unified Diff: webrtc/base/sslstreamadapter.h

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
Index: webrtc/base/sslstreamadapter.h
diff --git a/webrtc/base/sslstreamadapter.h b/webrtc/base/sslstreamadapter.h
index ba60ce3da09b32ce28b832597784cdaa78e0866a..d80f2ca864c0a961711642d11c2a7095402c971f 100644
--- a/webrtc/base/sslstreamadapter.h
+++ b/webrtc/base/sslstreamadapter.h
@@ -76,6 +76,9 @@ enum SSLProtocolVersion {
// Errors for Read -- in the high range so no conflict with OpenSSL.
enum { SSE_MSG_TRUNC = 0xff0001 };
+// Used to send back UMA histogram value.
+enum class SSLHandshakeError { UNKNOWN, INCOMPATIBLE_CIPHERSUITE, MAX_VALUE };
+
class SSLStreamAdapter : public StreamAdapterInterface {
public:
// Instantiate an SSLStreamAdapter wrapping the given stream,
@@ -83,9 +86,8 @@ class SSLStreamAdapter : public StreamAdapterInterface {
// Caller is responsible for freeing the returned object.
static SSLStreamAdapter* Create(StreamInterface* stream);
- explicit SSLStreamAdapter(StreamInterface* stream)
- : StreamAdapterInterface(stream), ignore_bad_cert_(false),
- client_auth_enabled_(true) { }
+ explicit SSLStreamAdapter(StreamInterface* stream);
+ ~SSLStreamAdapter() override;
void set_ignore_bad_cert(bool ignore) { ignore_bad_cert_ = ignore; }
bool ignore_bad_cert() const { return ignore_bad_cert_; }
@@ -207,6 +209,8 @@ class SSLStreamAdapter : public StreamAdapterInterface {
// depending on specific SSL implementation.
static std::string SslCipherSuiteToName(int cipher_suite);
+ sigslot::signal1<SSLHandshakeError> SignalSSLHandshakeError;
+
private:
// If true, the server certificate need not match the configured
// server_name, and in fact missing certificate authority and other

Powered by Google App Engine
This is Rietveld 408576698