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

Unified Diff: net/quic/crypto/crypto_utils.h

Issue 14816006: Land Recent QUIC changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_PRIVATE_EXPORT to QuicWallTime Created 7 years, 7 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 | « net/quic/crypto/crypto_server_config_protobuf.h ('k') | net/quic/crypto/crypto_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/crypto_utils.h
diff --git a/net/quic/crypto/crypto_utils.h b/net/quic/crypto/crypto_utils.h
index 4ad41495a8f508bed0be2c2fc2e14f28aba65c5a..6c607a52afe5977a9d35f3c32cc36e91429dbcd4 100644
--- a/net/quic/crypto/crypto_utils.h
+++ b/net/quic/crypto/crypto_utils.h
@@ -13,6 +13,7 @@
#include "net/base/net_export.h"
#include "net/quic/crypto/crypto_handshake.h"
#include "net/quic/crypto/crypto_protocol.h"
+#include "net/quic/quic_time.h"
namespace net {
@@ -40,32 +41,35 @@ class NET_EXPORT_PRIVATE CryptoUtils {
//
// If |out_index| is non-NULL and a match is found then the index of that
// match in |their_tags| is written to |out_index|.
- static bool FindMutualTag(const CryptoTagVector& our_tags,
- const CryptoTag* their_tags,
+ static bool FindMutualTag(const QuicTagVector& our_tags,
+ const QuicTag* their_tags,
size_t num_their_tags,
Priority priority,
- CryptoTag* out_result,
+ QuicTag* out_result,
size_t* out_index);
// Generates the connection nonce. The nonce is formed as:
// <4 bytes> current time
// <8 bytes> |orbit| (or random if |orbit| is empty)
// <20 bytes> random
- static void GenerateNonce(QuicTime::Delta now,
+ static void GenerateNonce(QuicWallTime now,
QuicRandom* random_generator,
base::StringPiece orbit,
std::string* nonce);
- // DeriveKeys populates |params->encrypter| and |params->decrypter| given the
- // contents of |params->premaster_secret|, |client_nonce|,
- // |params->server_nonce| and |hkdf_input|. |perspective| controls whether
- // the server's keys are assigned to |encrypter| or |decrypter|.
- // |params->server_nonce| is optional and, if non-empty, is mixed into the
- // key derivation.
- static void DeriveKeys(QuicCryptoNegotiatedParameters* params,
+ // DeriveKeys populates |out->encrypter| and |out->decrypter| given the
+ // contents of |premaster_secret|, |client_nonce|, |server_nonce| and
+ // |hkdf_input|. |aead| determines which cipher will be used. |perspective|
+ // controls whether the server's keys are assigned to |encrypter| or
+ // |decrypter|. |server_nonce| is optional and, if non-empty, is mixed into
+ // the key derivation.
+ static void DeriveKeys(base::StringPiece premaster_secret,
+ QuicTag aead,
base::StringPiece client_nonce,
+ base::StringPiece server_nonce,
const std::string& hkdf_input,
- Perspective perspective);
+ Perspective perspective,
+ CrypterPair* out);
};
} // namespace net
« no previous file with comments | « net/quic/crypto/crypto_server_config_protobuf.h ('k') | net/quic/crypto/crypto_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698