| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |