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

Side by Side Diff: net/quic/crypto/proof_test.cc

Issue 20227003: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Land Recent QUIC changes Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/crypto/proof_source_chromium.cc ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "base/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "net/base/net_errors.h" 6 #include "net/base/net_errors.h"
7 #include "net/base/test_completion_callback.h" 7 #include "net/base/test_completion_callback.h"
8 #include "net/base/test_data_directory.h" 8 #include "net/base/test_data_directory.h"
9 #include "net/cert/cert_status_flags.h" 9 #include "net/cert/cert_status_flags.h"
10 #include "net/cert/cert_verify_result.h" 10 #include "net/cert/cert_verify_result.h"
(...skipping 17 matching lines...) Expand all
28 scoped_ptr<ProofVerifier> verifier( 28 scoped_ptr<ProofVerifier> verifier(
29 CryptoTestUtils::ProofVerifierForTesting()); 29 CryptoTestUtils::ProofVerifierForTesting());
30 30
31 const string server_config = "server config bytes"; 31 const string server_config = "server config bytes";
32 const string hostname = "test.example.com"; 32 const string hostname = "test.example.com";
33 const vector<string>* certs; 33 const vector<string>* certs;
34 const vector<string>* first_certs; 34 const vector<string>* first_certs;
35 string error_details, signature, first_signature; 35 string error_details, signature, first_signature;
36 CertVerifyResult cert_verify_result; 36 CertVerifyResult cert_verify_result;
37 37
38 ASSERT_TRUE(source->GetProof(hostname, server_config, &first_certs, 38 ASSERT_TRUE(source->GetProof(hostname, server_config, false /* no ECDSA */,
39 &first_signature)); 39 &first_certs, &first_signature));
40 ASSERT_TRUE(source->GetProof(hostname, server_config, &certs, &signature)); 40 ASSERT_TRUE(source->GetProof(hostname, server_config, false /* no ECDSA */,
41 &certs, &signature));
41 42
42 // Check that the proof source is caching correctly: 43 // Check that the proof source is caching correctly:
43 ASSERT_EQ(first_certs, certs); 44 ASSERT_EQ(first_certs, certs);
44 ASSERT_EQ(signature, first_signature); 45 ASSERT_EQ(signature, first_signature);
45 46
46 int rv; 47 int rv;
47 TestCompletionCallback callback; 48 TestCompletionCallback callback;
48 rv = verifier->VerifyProof(hostname, server_config, *certs, signature, 49 rv = verifier->VerifyProof(hostname, server_config, *certs, signature,
49 &error_details, &cert_verify_result, 50 &error_details, &cert_verify_result,
50 callback.callback()); 51 callback.callback());
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 &error_details, &cert_verify_result, 392 &error_details, &cert_verify_result,
392 callback.callback()); 393 callback.callback());
393 rv = callback.GetResult(rv); 394 rv = callback.GetResult(rv);
394 ASSERT_EQ(ERR_FAILED, rv); 395 ASSERT_EQ(ERR_FAILED, rv);
395 ASSERT_NE("", error_details); 396 ASSERT_NE("", error_details);
396 } 397 }
397 } 398 }
398 399
399 } // namespace test 400 } // namespace test
400 } // namespace net 401 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/proof_source_chromium.cc ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698