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

Unified Diff: webrtc/base/sslstreamadapter.h

Issue 1774583002: Add IsAcceptableCipher, use instead of GetDefaultCipher. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Format Created 4 years, 9 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 c57056b14ad1b2336b1527c00bd7c24059ff02f0..0e2bbca9b87c6912ba672184991ee88f98bd7c04 100644
--- a/webrtc/base/sslstreamadapter.h
+++ b/webrtc/base/sslstreamadapter.h
@@ -161,6 +161,8 @@ class SSLStreamAdapter : public StreamAdapterInterface {
// connection (e.g. 0x2F for "TLS_RSA_WITH_AES_128_CBC_SHA").
virtual bool GetSslCipherSuite(int* cipher_suite);
+ virtual int GetSslVersion() const = 0;
+
// Key Exporter interface from RFC 5705
// Arguments are:
// label -- the exporter label.
@@ -189,11 +191,10 @@ class SSLStreamAdapter : public StreamAdapterInterface {
static bool HaveDtlsSrtp();
static bool HaveExporter();
- // Returns the default Ssl cipher used between streams of this class
- // for the given protocol version. This is used by the unit tests.
- // TODO(guoweis): Move this away from a static class method.
- static int GetDefaultSslCipherForTest(SSLProtocolVersion version,
- KeyType key_type);
+ // Returns true iff the supplied cipher is deemed to be strong.
+ // TODO(torbjorng): Consider removing the KeyType argument.
+ static bool IsAcceptableCipher(int cipher, KeyType key_type);
+ static bool IsAcceptableCipher(std::string cipher, KeyType key_type);
tommi 2016/03/10 21:37:59 const &
torbjorng (webrtc) 2016/03/11 07:50:18 Done.
// TODO(guoweis): Move this away from a static class method. Currently this is
// introduced such that any caller could depend on sslstreamadapter.h without

Powered by Google App Engine
This is Rietveld 408576698