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

Side by Side Diff: net/quic/core/crypto/quic_crypto_server_config.cc

Issue 2679673005: Remove path id from IV in QUIC encrytion algorithms. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/core/crypto/quic_crypto_server_config.h" 5 #include "net/quic/core/crypto/quic_crypto_server_config.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 CryptoUtils::Diversification::Never(), 888 CryptoUtils::Diversification::Never(),
889 &crypters, nullptr /* subkey secret */)) { 889 &crypters, nullptr /* subkey secret */)) {
890 helper.Fail(QUIC_CRYPTO_SYMMETRIC_KEY_SETUP_FAILED, 890 helper.Fail(QUIC_CRYPTO_SYMMETRIC_KEY_SETUP_FAILED,
891 "Symmetric key setup failed"); 891 "Symmetric key setup failed");
892 return; 892 return;
893 } 893 }
894 894
895 char plaintext[kMaxPacketSize]; 895 char plaintext[kMaxPacketSize];
896 size_t plaintext_length = 0; 896 size_t plaintext_length = 0;
897 const bool success = crypters.decrypter->DecryptPacket( 897 const bool success = crypters.decrypter->DecryptPacket(
898 QUIC_VERSION_35, kDefaultPathId, 0 /* packet number */, 898 QUIC_VERSION_35, 0 /* packet number */,
899 StringPiece() /* associated data */, cetv_ciphertext, plaintext, 899 StringPiece() /* associated data */, cetv_ciphertext, plaintext,
900 &plaintext_length, kMaxPacketSize); 900 &plaintext_length, kMaxPacketSize);
901 if (!success) { 901 if (!success) {
902 helper.Fail(QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER, 902 helper.Fail(QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER,
903 "CETV decryption failure"); 903 "CETV decryption failure");
904 return; 904 return;
905 } 905 }
906 std::unique_ptr<CryptoHandshakeMessage> cetv( 906 std::unique_ptr<CryptoHandshakeMessage> cetv(
907 CryptoFramer::ParseMessage(StringPiece(plaintext, plaintext_length))); 907 CryptoFramer::ParseMessage(StringPiece(plaintext, plaintext_length)));
908 if (!cetv.get()) { 908 if (!cetv.get()) {
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1951 expiry_time(QuicWallTime::Zero()), 1951 expiry_time(QuicWallTime::Zero()),
1952 priority(0), 1952 priority(0),
1953 source_address_token_boxer(nullptr) {} 1953 source_address_token_boxer(nullptr) {}
1954 1954
1955 QuicCryptoServerConfig::Config::~Config() {} 1955 QuicCryptoServerConfig::Config::~Config() {}
1956 1956
1957 QuicSignedServerConfig::QuicSignedServerConfig() {} 1957 QuicSignedServerConfig::QuicSignedServerConfig() {}
1958 QuicSignedServerConfig::~QuicSignedServerConfig() {} 1958 QuicSignedServerConfig::~QuicSignedServerConfig() {}
1959 1959
1960 } // namespace net 1960 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/crypto/quic_crypto_client_config.cc ('k') | net/quic/core/crypto/quic_decrypter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698