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

Side by Side Diff: net/test/spawned_test_server/base_test_server.cc

Issue 1286793002: Treat failure to parse certificates as SSL protocol errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: and now with more keys Created 5 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 | « net/test/spawned_test_server/base_test_server.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "net/test/spawned_test_server/base_test_server.h" 5 #include "net/test/spawned_test_server/base_test_server.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 case CERT_MISMATCHED_NAME: 156 case CERT_MISMATCHED_NAME:
157 return base::FilePath(FILE_PATH_LITERAL("ok_cert.pem")); 157 return base::FilePath(FILE_PATH_LITERAL("ok_cert.pem"));
158 case CERT_COMMON_NAME_IS_DOMAIN: 158 case CERT_COMMON_NAME_IS_DOMAIN:
159 return base::FilePath(FILE_PATH_LITERAL("localhost_cert.pem")); 159 return base::FilePath(FILE_PATH_LITERAL("localhost_cert.pem"));
160 case CERT_EXPIRED: 160 case CERT_EXPIRED:
161 return base::FilePath(FILE_PATH_LITERAL("expired_cert.pem")); 161 return base::FilePath(FILE_PATH_LITERAL("expired_cert.pem"));
162 case CERT_CHAIN_WRONG_ROOT: 162 case CERT_CHAIN_WRONG_ROOT:
163 // This chain uses its own dedicated test root certificate to avoid 163 // This chain uses its own dedicated test root certificate to avoid
164 // side-effects that may affect testing. 164 // side-effects that may affect testing.
165 return base::FilePath(FILE_PATH_LITERAL("redundant-server-chain.pem")); 165 return base::FilePath(FILE_PATH_LITERAL("redundant-server-chain.pem"));
166 case CERT_BAD_VALIDITY:
167 return base::FilePath(FILE_PATH_LITERAL("bad_validity.pem"));
166 case CERT_AUTO: 168 case CERT_AUTO:
167 return base::FilePath(); 169 return base::FilePath();
168 default: 170 default:
169 NOTREACHED(); 171 NOTREACHED();
170 } 172 }
171 return base::FilePath(); 173 return base::FilePath();
172 } 174 }
173 175
174 std::string BaseTestServer::SSLOptions::GetOCSPArgument() const { 176 std::string BaseTestServer::SSLOptions::GetOCSPArgument() const {
175 if (server_certificate != CERT_AUTO) 177 if (server_certificate != CERT_AUTO)
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 552
551 return GenerateAdditionalArguments(arguments); 553 return GenerateAdditionalArguments(arguments);
552 } 554 }
553 555
554 bool BaseTestServer::GenerateAdditionalArguments( 556 bool BaseTestServer::GenerateAdditionalArguments(
555 base::DictionaryValue* arguments) const { 557 base::DictionaryValue* arguments) const {
556 return true; 558 return true;
557 } 559 }
558 560
559 } // namespace net 561 } // namespace net
OLDNEW
« no previous file with comments | « net/test/spawned_test_server/base_test_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698