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

Unified Diff: net/quic/crypto/aead_base_encrypter_nss.cc

Issue 1811043002: Landing Recent QUIC changes until 2016-03-15 16:26 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add an export clause. 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
« no previous file with comments | « net/quic/crypto/aead_base_decrypter_openssl.cc ('k') | net/quic/crypto/aead_base_encrypter_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/aead_base_encrypter_nss.cc
diff --git a/net/quic/crypto/aead_base_encrypter_nss.cc b/net/quic/crypto/aead_base_encrypter_nss.cc
index c7841e1dacc8e0e89be0a78d993418983c8f502c..4fb1349d5480fdc6f7085eed6552aa19ac966484 100644
--- a/net/quic/crypto/aead_base_encrypter_nss.cc
+++ b/net/quic/crypto/aead_base_encrypter_nss.cc
@@ -135,15 +135,10 @@ bool AeadBaseEncrypter::EncryptPacket(QuicPathId path_id,
const size_t nonce_size = nonce_prefix_size_ + sizeof(packet_number);
ALIGNAS(4) char nonce_buffer[kMaxNonceSize];
memcpy(nonce_buffer, nonce_prefix_, nonce_prefix_size_);
- if (FLAGS_quic_include_path_id_in_iv) {
- uint64_t path_id_packet_number =
- QuicUtils::PackPathIdAndPacketNumber(path_id, packet_number);
- memcpy(nonce_buffer + nonce_prefix_size_, &path_id_packet_number,
- sizeof(path_id_packet_number));
- } else {
- memcpy(nonce_buffer + nonce_prefix_size_, &packet_number,
- sizeof(packet_number));
- }
+ uint64_t path_id_packet_number =
+ QuicUtils::PackPathIdAndPacketNumber(path_id, packet_number);
+ memcpy(nonce_buffer + nonce_prefix_size_, &path_id_packet_number,
+ sizeof(path_id_packet_number));
if (!Encrypt(StringPiece(nonce_buffer, nonce_size), associated_data,
plaintext, reinterpret_cast<unsigned char*>(output))) {
return false;
« no previous file with comments | « net/quic/crypto/aead_base_decrypter_openssl.cc ('k') | net/quic/crypto/aead_base_encrypter_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698