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

Unified Diff: webrtc/base/sslstreamadapter.h

Issue 1377733004: Convert uint16_t to int for WebRTC cipher/crypto suite (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 2 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 867f309a03b6c721339082e8a3676aa4772a8993..fa4965149baba68a109da50a3bdd436dc6ac2e5a 100644
--- a/webrtc/base/sslstreamadapter.h
+++ b/webrtc/base/sslstreamadapter.h
@@ -20,8 +20,8 @@
namespace rtc {
// Constants for SRTP profiles.
-const uint16_t SRTP_AES128_CM_SHA1_80 = 0x0001;
-const uint16_t SRTP_AES128_CM_SHA1_32 = 0x0002;
+const int SRTP_AES128_CM_SHA1_80 = 0x0001;
+const int SRTP_AES128_CM_SHA1_32 = 0x0002;
// Cipher suite to use for SRTP. Typically a 80-bit HMAC will be used, except
// in applications (voice) where the additional bandwidth may be significant.
@@ -34,7 +34,7 @@ extern const char CS_AES_CM_128_HMAC_SHA1_32[];
// Returns the DTLS-SRTP protection profile ID, as defined in
// https://tools.ietf.org/html/rfc5764#section-4.1.2, for the given SRTP
// Crypto-suite, as defined in https://tools.ietf.org/html/rfc4568#section-6.2
-uint16_t GetSrtpCryptoSuiteFromName(const std::string& cipher_rfc_name);
+int GetSrtpCryptoSuiteFromName(const std::string& cipher_rfc_name);
// SSLStreamAdapter : A StreamInterfaceAdapter that does SSL/TLS.
// After SSL has been started, the stream will only open on successful
@@ -152,7 +152,7 @@ class SSLStreamAdapter : public StreamAdapterInterface {
// Retrieves the IANA registration id of the cipher suite used for the
// connection (e.g. 0x2F for "TLS_RSA_WITH_AES_128_CBC_SHA").
- virtual bool GetSslCipherSuite(uint16_t* cipher);
+ virtual bool GetSslCipherSuite(int* cipher);
// Key Exporter interface from RFC 5705
// Arguments are:
@@ -185,13 +185,13 @@ class SSLStreamAdapter : public StreamAdapterInterface {
// 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 uint16_t GetDefaultSslCipherForTest(SSLProtocolVersion version,
- KeyType key_type);
+ static int GetDefaultSslCipherForTest(SSLProtocolVersion version,
+ KeyType key_type);
// TODO(guoweis): Move this away from a static class method. Currently this is
// introduced such that any caller could depend on sslstreamadapter.h without
// depending on specific SSL implementation.
- static std::string GetSslCipherSuiteName(uint16_t cipher);
+ static std::string GetSslCipherSuiteName(int cipher);
private:
// If true, the server certificate need not match the configured

Powered by Google App Engine
This is Rietveld 408576698