diff options
author | rtenneti <rtenneti@chromium.org> | 2015-11-05 10:12:35 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-05 18:13:39 +0000 |
commit | ac06c2f29fa6cd3d8291eec78899918d450bc569 (patch) | |
tree | 166cafb7affe61dc59aac631d420ebad3501ee61 /net/quic/crypto/crypto_server_test.cc | |
parent | dd6877ef5d2be0a6cb2947c8103bc12dc8072968 (diff) | |
download | chromium_src-ac06c2f29fa6cd3d8291eec78899918d450bc569.zip chromium_src-ac06c2f29fa6cd3d8291eec78899918d450bc569.tar.gz chromium_src-ac06c2f29fa6cd3d8291eec78899918d450bc569.tar.bz2 |
QUIC - delete #ifdef USE_OPENSSL in unittests.
+ Deleted #ifdef USE_OPENSSL from QUIC tests.
+ Fixed/enabled QuicChromiumClientSessionTest unittests.
+ Use real ProofVerifier for ProofTests and when USE_OPENSSL is enabled.
+ Use fake proof verifier when NSS is enabled.
+ FakeProofVerifier verifies the certificates using MockCertVerifier.
Initialized certificates ala OPENSSL's code.
R=rch@chromium.org
Review URL: https://codereview.chromium.org/1415933006
Cr-Commit-Position: refs/heads/master@{#358085}
Diffstat (limited to 'net/quic/crypto/crypto_server_test.cc')
-rw-r--r-- | net/quic/crypto/crypto_server_test.cc | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/net/quic/crypto/crypto_server_test.cc b/net/quic/crypto/crypto_server_test.cc index 427c1cf..ee687df 100644 --- a/net/quic/crypto/crypto_server_test.cc +++ b/net/quic/crypto/crypto_server_test.cc @@ -109,11 +109,7 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> { client_address_(Loopback4(), 1234), config_(QuicCryptoServerConfig::TESTING, rand_, -#if defined(USE_OPENSSL) CryptoTestUtils::ProofSourceForTesting()) { -#else - CryptoTestUtils::FakeProofSourceForTesting()) { -#endif supported_versions_ = GetParam().supported_versions; config_.set_enable_serving_sct(true); @@ -352,13 +348,8 @@ class CryptoServerTest : public ::testing::TestWithParam<TestParams> { IPAddressNumber server_ip; string sig; string cert_sct; -#if defined(USE_OPENSSL) scoped_ptr<ProofSource> proof_source( CryptoTestUtils::ProofSourceForTesting()); -#else - scoped_ptr<ProofSource> proof_source( - CryptoTestUtils::FakeProofSourceForTesting()); -#endif if (!proof_source->GetProof(server_ip, "", "", false, &certs, &sig, &cert_sct) || certs->empty()) { @@ -784,17 +775,9 @@ TEST(CryptoServerConfigGenerationTest, Determinism) { MockClock clock; QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a, -#if defined(USE_OPENSSL) CryptoTestUtils::ProofSourceForTesting()); -#else - CryptoTestUtils::FakeProofSourceForTesting()); -#endif QuicCryptoServerConfig b(QuicCryptoServerConfig::TESTING, &rand_b, -#if defined(USE_OPENSSL) CryptoTestUtils::ProofSourceForTesting()); -#else - CryptoTestUtils::FakeProofSourceForTesting()); -#endif scoped_ptr<CryptoHandshakeMessage> scfg_a( a.AddDefaultConfig(&rand_a, &clock, options)); scoped_ptr<CryptoHandshakeMessage> scfg_b( @@ -812,18 +795,10 @@ TEST(CryptoServerConfigGenerationTest, SCIDVaries) { MockClock clock; QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a, -#if defined(USE_OPENSSL) CryptoTestUtils::ProofSourceForTesting()); -#else - CryptoTestUtils::FakeProofSourceForTesting()); -#endif rand_b.ChangeValue(); QuicCryptoServerConfig b(QuicCryptoServerConfig::TESTING, &rand_b, -#if defined(USE_OPENSSL) CryptoTestUtils::ProofSourceForTesting()); -#else - CryptoTestUtils::FakeProofSourceForTesting()); -#endif scoped_ptr<CryptoHandshakeMessage> scfg_a( a.AddDefaultConfig(&rand_a, &clock, options)); scoped_ptr<CryptoHandshakeMessage> scfg_b( @@ -842,11 +817,7 @@ TEST(CryptoServerConfigGenerationTest, SCIDIsHashOfServerConfig) { MockClock clock; QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a, -#if defined(USE_OPENSSL) CryptoTestUtils::ProofSourceForTesting()); -#else - CryptoTestUtils::FakeProofSourceForTesting()); -#endif scoped_ptr<CryptoHandshakeMessage> scfg( a.AddDefaultConfig(&rand_a, &clock, options)); |