OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/test_tools/crypto_test_utils.h" | 5 #include "net/quic/test_tools/crypto_test_utils.h" |
6 | 6 |
7 #include <openssl/bn.h> | 7 #include <openssl/bn.h> |
8 #include <openssl/ec.h> | 8 #include <openssl/ec.h> |
9 #include <openssl/ecdsa.h> | 9 #include <openssl/ecdsa.h> |
10 #include <openssl/evp.h> | 10 #include <openssl/evp.h> |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 0x45, 0x58, 0x50, 0x59, | 617 0x45, 0x58, 0x50, 0x59, |
618 // EXPY end offset | 618 // EXPY end offset |
619 0x08, 0x00, 0x00, 0x00, | 619 0x08, 0x00, 0x00, 0x00, |
620 // Value | 620 // Value |
621 '1', '2', '3', '4', | 621 '1', '2', '3', '4', |
622 '5', '6', '7', '8' | 622 '5', '6', '7', '8' |
623 }; | 623 }; |
624 // clang-format on | 624 // clang-format on |
625 rej->SetValue(kSCFG, scfg); | 625 rej->SetValue(kSCFG, scfg); |
626 rej->SetStringPiece(kServerNonceTag, "SERVER_NONCE"); | 626 rej->SetStringPiece(kServerNonceTag, "SERVER_NONCE"); |
| 627 int64_t ttl = 2 * 24 * 60 * 60; |
| 628 rej->SetValue(kSTTL, ttl); |
627 vector<QuicTag> reject_reasons; | 629 vector<QuicTag> reject_reasons; |
628 reject_reasons.push_back(CLIENT_NONCE_INVALID_FAILURE); | 630 reject_reasons.push_back(CLIENT_NONCE_INVALID_FAILURE); |
629 rej->SetVector(kRREJ, reject_reasons); | 631 rej->SetVector(kRREJ, reject_reasons); |
630 } | 632 } |
631 | 633 |
632 void CryptoTestUtils::CompareClientAndServerKeys( | 634 void CryptoTestUtils::CompareClientAndServerKeys( |
633 QuicCryptoClientStream* client, | 635 QuicCryptoClientStream* client, |
634 QuicCryptoServerStream* server) { | 636 QuicCryptoServerStream* server) { |
635 QuicFramer* client_framer = | 637 QuicFramer* client_framer = |
636 QuicConnectionPeer::GetFramer(client->session()->connection()); | 638 QuicConnectionPeer::GetFramer(client->session()->connection()); |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 CryptoHandshakeMessage* out) { | 965 CryptoHandshakeMessage* out) { |
964 // Pass a inchoate CHLO. | 966 // Pass a inchoate CHLO. |
965 crypto_config->ValidateClientHello( | 967 crypto_config->ValidateClientHello( |
966 inchoate_chlo, client_addr.address(), server_ip, version, clock, proof, | 968 inchoate_chlo, client_addr.address(), server_ip, version, clock, proof, |
967 new FullChloGenerator(crypto_config, server_ip, client_addr, clock, proof, | 969 new FullChloGenerator(crypto_config, server_ip, client_addr, clock, proof, |
968 compressed_certs_cache, out)); | 970 compressed_certs_cache, out)); |
969 } | 971 } |
970 | 972 |
971 } // namespace test | 973 } // namespace test |
972 } // namespace net | 974 } // namespace net |
OLD | NEW |