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

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

Issue 504953003: Remove implicit conversions from scoped_refptr to T* in net/quic/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | net/quic/crypto/quic_crypto_server_config.cc » ('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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 break; 91 break;
92 } 92 }
93 } 93 }
94 94
95 // Reads the certificate named "quic_" + |file_name| in the test data directory. 95 // Reads the certificate named "quic_" + |file_name| in the test data directory.
96 // The certificate must be PEM encoded. Returns the DER-encoded certificate. 96 // The certificate must be PEM encoded. Returns the DER-encoded certificate.
97 string LoadTestCert(const string& file_name) { 97 string LoadTestCert(const string& file_name) {
98 base::FilePath certs_dir = GetTestCertsDirectory(); 98 base::FilePath certs_dir = GetTestCertsDirectory();
99 scoped_refptr<X509Certificate> cert = 99 scoped_refptr<X509Certificate> cert =
100 ImportCertFromFile(certs_dir, "quic_" + file_name); 100 ImportCertFromFile(certs_dir, "quic_" + file_name);
101 CHECK_NE(static_cast<X509Certificate*>(NULL), cert); 101 CHECK_NE(static_cast<X509Certificate*>(NULL), cert.get());
102 102
103 string der_bytes; 103 string der_bytes;
104 CHECK(X509Certificate::GetDEREncoded(cert->os_cert_handle(), &der_bytes)); 104 CHECK(X509Certificate::GetDEREncoded(cert->os_cert_handle(), &der_bytes));
105 return der_bytes; 105 return der_bytes;
106 } 106 }
107 107
108 } // namespace 108 } // namespace
109 109
110 // TODO(rtenneti): Enable testing of ProofVerifier. 110 // TODO(rtenneti): Enable testing of ProofVerifier.
111 TEST(ProofTest, DISABLED_Verify) { 111 TEST(ProofTest, DISABLED_Verify) {
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 wrong_certs.push_back(certs[i]); 362 wrong_certs.push_back(certs[i]);
363 } 363 }
364 RunVerification( 364 RunVerification(
365 verifier.get(), hostname, server_config, wrong_certs, signature, 365 verifier.get(), hostname, server_config, wrong_certs, signature,
366 false); 366 false);
367 } 367 }
368 } 368 }
369 369
370 } // namespace test 370 } // namespace test
371 } // namespace net 371 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/crypto/quic_crypto_server_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698