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

Unified Diff: webrtc/pc/srtpfilter.h

Issue 1528843005: Add support for GCM cipher suites from RFC 7714. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Disable GCM if ENABLE_EXTERNAL_AUTH is defined. 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
« no previous file with comments | « webrtc/pc/mediasession_unittest.cc ('k') | webrtc/pc/srtpfilter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/srtpfilter.h
diff --git a/webrtc/pc/srtpfilter.h b/webrtc/pc/srtpfilter.h
index cde9ad7e09c84dbc4a0214cba3505768c3bfcf5b..26a335fbaebf2fe11f7307cc53b5db072b7bb375 100644
--- a/webrtc/pc/srtpfilter.h
+++ b/webrtc/pc/srtpfilter.h
@@ -33,13 +33,6 @@ struct srtp_policy_t;
namespace cricket {
-// Key is 128 bits and salt is 112 bits == 30 bytes. B64 bloat => 40 bytes.
-extern const int SRTP_MASTER_KEY_BASE64_LEN;
-
-// Needed for DTLS-SRTP
-extern const int SRTP_MASTER_KEY_KEY_LEN;
-extern const int SRTP_MASTER_KEY_SALT_LEN;
-
class SrtpSession;
class SrtpStat;
@@ -140,7 +133,9 @@ class SrtpFilter {
CryptoParams* selected_params);
bool ApplyParams(const CryptoParams& send_params,
const CryptoParams& recv_params);
- static bool ParseKeyParams(const std::string& params, uint8_t* key, int len);
+ static bool ParseKeyParams(const std::string& params,
+ uint8_t* key,
+ size_t len);
private:
enum State {
@@ -185,10 +180,10 @@ class SrtpSession {
// Configures the session for sending data using the specified
// cipher-suite and key. Receiving must be done by a separate session.
- bool SetSend(int cs, const uint8_t* key, int len);
+ bool SetSend(int cs, const uint8_t* key, size_t len);
// Configures the session for receiving data using the specified
// cipher-suite and key. Sending must be done by a separate session.
- bool SetRecv(int cs, const uint8_t* key, int len);
+ bool SetRecv(int cs, const uint8_t* key, size_t len);
// Encrypts/signs an individual RTP/RTCP packet, in-place.
// If an HMAC is used, this will increase the packet size.
@@ -218,7 +213,7 @@ class SrtpSession {
SignalSrtpError;
private:
- bool SetKey(int type, int cs, const uint8_t* key, int len);
+ bool SetKey(int type, int cs, const uint8_t* key, size_t len);
// Returns send stream current packet index from srtp db.
bool GetSendStreamPacketIndex(void* data, int in_len, int64_t* index);
« no previous file with comments | « webrtc/pc/mediasession_unittest.cc ('k') | webrtc/pc/srtpfilter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698