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

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

Issue 1415933006: QUIC - delete #ifdef USE_OPENSSL in unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments Created 5 years, 1 month 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
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/ip_endpoint.h" 6 #include "net/base/ip_endpoint.h"
7 #include "net/base/net_errors.h" 7 #include "net/base/net_errors.h"
8 #include "net/base/test_completion_callback.h" 8 #include "net/base/test_completion_callback.h"
9 #include "net/base/test_data_directory.h" 9 #include "net/base/test_data_directory.h"
10 #include "net/cert/cert_status_flags.h" 10 #include "net/cert/cert_status_flags.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 0xff, 0x64, 0xac, 0xe8, 0x0f, 0x99, 0x35, 0x5e, 0xc6, 0x72, 0x1f, 0x8c, 229 0xff, 0x64, 0xac, 0xe8, 0x0f, 0x99, 0x35, 0x5e, 0xc6, 0x72, 0x1f, 0x8c,
230 0xc4, 0x2b, 0x7d, 0xc1, 0xfb, 0xf0, 0x12, 0x61, 0xb1, 0x18, 0x65, 0xdd, 230 0xc4, 0x2b, 0x7d, 0xc1, 0xfb, 0xf0, 0x12, 0x61, 0xb1, 0x18, 0x65, 0xdd,
231 0xc2, 0x38, 0x92, 0xba, 0x84, 0xf8, 0xc8, 0x5e, 0x17, 0x63, 0xe0, 0x9c, 231 0xc2, 0x38, 0x92, 0xba, 0x84, 0xf8, 0xc8, 0x5e, 0x17, 0x63, 0xe0, 0x9c,
232 0x2c, 0xe6, 0x70, 0x71, 0xdc, 0xe5, 0xc1, 0xea, 0xb3, 0x9a, 0xb6, 0x91, 232 0x2c, 0xe6, 0x70, 0x71, 0xdc, 0xe5, 0xc1, 0xea, 0xb3, 0x9a, 0xb6, 0x91,
233 0xdc, 0xc5, 0x56, 0x84, 0x8a, 0x31, 0x31, 0x23, 0x61, 0x94, 0x7e, 0x01, 233 0xdc, 0xc5, 0x56, 0x84, 0x8a, 0x31, 0x31, 0x23, 0x61, 0x94, 0x7e, 0x01,
234 0x22, 0x49, 0xf3, 0xcb, 0x0e, 0x31, 0x03, 0x04, 0x1b, 0x14, 0x43, 0x7c, 234 0x22, 0x49, 0xf3, 0xcb, 0x0e, 0x31, 0x03, 0x04, 0x1b, 0x14, 0x43, 0x7c,
235 0xad, 0x42, 0xe5, 0x55, 235 0xad, 0x42, 0xe5, 0x55,
236 }; 236 };
237 237
238 scoped_ptr<ProofVerifier> verifier( 238 scoped_ptr<ProofVerifier> verifier(
239 CryptoTestUtils::ProofVerifierForTesting()); 239 CryptoTestUtils::RealProofVerifierForTesting());
240 240
241 const string server_config = "server config bytes"; 241 const string server_config = "server config bytes";
242 const string hostname = "test.example.com"; 242 const string hostname = "test.example.com";
243 243
244 vector<string> certs(2); 244 vector<string> certs(2);
245 certs[0] = LoadTestCert("test.example.com.crt"); 245 certs[0] = LoadTestCert("test.example.com.crt");
246 certs[1] = LoadTestCert("intermediate.crt"); 246 certs[1] = LoadTestCert("intermediate.crt");
247 247
248 // Signatures are nondeterministic, so we test multiple signatures on the 248 // Signatures are nondeterministic, so we test multiple signatures on the
249 // same server_config. 249 // same server_config.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 static const unsigned char signature_data_2[] = { 311 static const unsigned char signature_data_2[] = {
312 0x30, 0x45, 0x02, 0x20, 0x09, 0x51, 0xe9, 0xde, 0xdb, 0x01, 0xfd, 0xb4, 312 0x30, 0x45, 0x02, 0x20, 0x09, 0x51, 0xe9, 0xde, 0xdb, 0x01, 0xfd, 0xb4,
313 0xd8, 0x20, 0xbb, 0xad, 0x41, 0xe3, 0xaa, 0xe7, 0xa3, 0xc3, 0x32, 0x10, 313 0xd8, 0x20, 0xbb, 0xad, 0x41, 0xe3, 0xaa, 0xe7, 0xa3, 0xc3, 0x32, 0x10,
314 0x9d, 0xfa, 0x37, 0xce, 0x17, 0xd1, 0x29, 0xf9, 0xd4, 0x1d, 0x0d, 0x19, 314 0x9d, 0xfa, 0x37, 0xce, 0x17, 0xd1, 0x29, 0xf9, 0xd4, 0x1d, 0x0d, 0x19,
315 0x02, 0x21, 0x00, 0xc6, 0x20, 0xd4, 0x28, 0xf9, 0x70, 0xb5, 0xb4, 0xff, 315 0x02, 0x21, 0x00, 0xc6, 0x20, 0xd4, 0x28, 0xf9, 0x70, 0xb5, 0xb4, 0xff,
316 0x4a, 0x35, 0xba, 0xa0, 0xf2, 0x8e, 0x00, 0xf7, 0xcb, 0x43, 0xaf, 0x2d, 316 0x4a, 0x35, 0xba, 0xa0, 0xf2, 0x8e, 0x00, 0xf7, 0xcb, 0x43, 0xaf, 0x2d,
317 0x1f, 0xce, 0x92, 0x05, 0xca, 0x29, 0xfe, 0xd2, 0x8f, 0xd9, 0x31, 317 0x1f, 0xce, 0x92, 0x05, 0xca, 0x29, 0xfe, 0xd2, 0x8f, 0xd9, 0x31,
318 }; 318 };
319 319
320 scoped_ptr<ProofVerifier> verifier( 320 scoped_ptr<ProofVerifier> verifier(
321 CryptoTestUtils::ProofVerifierForTesting()); 321 CryptoTestUtils::RealProofVerifierForTesting());
322 322
323 const string server_config = "server config bytes"; 323 const string server_config = "server config bytes";
324 const string hostname = "test.example.com"; 324 const string hostname = "test.example.com";
325 325
326 vector<string> certs(2); 326 vector<string> certs(2);
327 certs[0] = LoadTestCert("test_ecc.example.com.crt"); 327 certs[0] = LoadTestCert("test_ecc.example.com.crt");
328 certs[1] = LoadTestCert("intermediate.crt"); 328 certs[1] = LoadTestCert("intermediate.crt");
329 329
330 // Signatures are nondeterministic, so we test multiple signatures on the 330 // Signatures are nondeterministic, so we test multiple signatures on the
331 // same server_config. 331 // same server_config.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 wrong_certs.push_back(certs[i]); 367 wrong_certs.push_back(certs[i]);
368 } 368 }
369 RunVerification( 369 RunVerification(
370 verifier.get(), hostname, server_config, wrong_certs, signature, 370 verifier.get(), hostname, server_config, wrong_certs, signature,
371 false); 371 false);
372 } 372 }
373 } 373 }
374 374
375 } // namespace test 375 } // namespace test
376 } // namespace net 376 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/crypto_server_test.cc ('k') | net/quic/crypto/quic_crypto_server_config_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698