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

Unified Diff: webrtc/base/sslstreamadapter.h

Issue 1416673006: Convert internal representation of Srtp cryptos from string to int. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add back an old function name to prevent build break in chromium. 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 65a7729d163b30a237aaaa607e51768dbb09b04d..518b86723bd718766765e0a13d368016bf4cddb9 100644
--- a/webrtc/base/sslstreamadapter.h
+++ b/webrtc/base/sslstreamadapter.h
@@ -31,10 +31,13 @@ extern const char CS_AES_CM_128_HMAC_SHA1_80[];
// 128-bit AES with 32-bit SHA-1 HMAC.
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
-int GetSrtpCryptoSuiteFromName(const std::string& cipher_rfc_name);
+// Given the DTLS-SRTP protection profile ID, as defined in
+// https://tools.ietf.org/html/rfc4568#section-6.2 , return the SRTP profile
+// name, as defined in https://tools.ietf.org/html/rfc5764#section-4.1.2.
+std::string SrtpCryptoSuiteToName(int srtp_crypto);
+
+// The reverse of above conversion.
+int SrtpCryptoSuiteNameToId(const std::string& crypto);
// SSLStreamAdapter : A StreamInterfaceAdapter that does SSL/TLS.
// After SSL has been started, the stream will only open on successful
@@ -174,8 +177,8 @@ class SSLStreamAdapter : public StreamAdapterInterface {
size_t result_len);
// DTLS-SRTP interface
- virtual bool SetDtlsSrtpCiphers(const std::vector<std::string>& ciphers);
- virtual bool GetDtlsSrtpCipher(std::string* cipher);
+ virtual bool SetDtlsSrtpCryptoSuites(const std::vector<int>& ciphers);
+ virtual bool GetDtlsSrtpCryptoSuite(int* cipher);
pthatcher1 2015/11/11 19:59:41 More here. I'm going to stop commenting on these.
guoweis_webrtc 2015/11/17 01:21:16 Done.
// Capabilities testing
static bool HaveDtls();
@@ -191,7 +194,7 @@ class SSLStreamAdapter : public StreamAdapterInterface {
// 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(int cipher);
+ static std::string SslCipherSuiteToName(int cipher);
private:
// If true, the server certificate need not match the configured

Powered by Google App Engine
This is Rietveld 408576698