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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 QuicCompressedCertsCache* compressed_certs_cache, | 283 QuicCompressedCertsCache* compressed_certs_cache, |
284 CryptoHandshakeMessage* out) | 284 CryptoHandshakeMessage* out) |
285 : crypto_config_(crypto_config), | 285 : crypto_config_(crypto_config), |
286 server_ip_(server_ip), | 286 server_ip_(server_ip), |
287 client_addr_(client_addr), | 287 client_addr_(client_addr), |
288 clock_(clock), | 288 clock_(clock), |
289 proof_(proof), | 289 proof_(proof), |
290 compressed_certs_cache_(compressed_certs_cache), | 290 compressed_certs_cache_(compressed_certs_cache), |
291 out_(out) {} | 291 out_(out) {} |
292 | 292 |
293 void RunImpl( | 293 void RunImpl(const CryptoHandshakeMessage& client_hello, |
294 const CryptoHandshakeMessage& client_hello, | 294 const ValidateClientHelloResultCallback::Result& result, |
295 const ValidateClientHelloResultCallback::Result& result) override { | 295 std::unique_ptr<ProofSource::Details> /* details */) override { |
296 QuicCryptoNegotiatedParameters params; | 296 QuicCryptoNegotiatedParameters params; |
297 string error_details; | 297 string error_details; |
298 DiversificationNonce diversification_nonce; | 298 DiversificationNonce diversification_nonce; |
299 CryptoHandshakeMessage rej; | 299 CryptoHandshakeMessage rej; |
300 crypto_config_->ProcessClientHello( | 300 crypto_config_->ProcessClientHello( |
301 result, /*reject_only=*/false, /*connection_id=*/1, server_ip_, | 301 result, /*reject_only=*/false, /*connection_id=*/1, server_ip_, |
302 client_addr_, QuicSupportedVersions().front(), QuicSupportedVersions(), | 302 client_addr_, QuicSupportedVersions().front(), QuicSupportedVersions(), |
303 /*use_stateless_rejects=*/true, /*server_designated_connection_id=*/0, | 303 /*use_stateless_rejects=*/true, /*server_designated_connection_id=*/0, |
304 clock_, QuicRandom::GetInstance(), compressed_certs_cache_, ¶ms, | 304 clock_, QuicRandom::GetInstance(), compressed_certs_cache_, ¶ms, |
305 proof_, &rej, &diversification_nonce, &error_details); | 305 proof_, &rej, &diversification_nonce, &error_details); |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 CryptoHandshakeMessage* out) { | 908 CryptoHandshakeMessage* out) { |
909 // Pass a inchoate CHLO. | 909 // Pass a inchoate CHLO. |
910 crypto_config->ValidateClientHello( | 910 crypto_config->ValidateClientHello( |
911 inchoate_chlo, client_addr.address(), server_ip, version, clock, proof, | 911 inchoate_chlo, client_addr.address(), server_ip, version, clock, proof, |
912 new FullChloGenerator(crypto_config, server_ip, client_addr, clock, proof, | 912 new FullChloGenerator(crypto_config, server_ip, client_addr, clock, proof, |
913 compressed_certs_cache, out)); | 913 compressed_certs_cache, out)); |
914 } | 914 } |
915 | 915 |
916 } // namespace test | 916 } // namespace test |
917 } // namespace net | 917 } // namespace net |
OLD | NEW |