diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-16 00:01:37 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-16 00:01:37 +0000 |
commit | 32765f80889421c6161a7b9e73bc1ee722db6892 (patch) | |
tree | bba0f974c84f9859da5b62bc233d00955e63c032 /net/test/test_server.h | |
parent | 235478be87f59f3962eda9d8f3fba04e8a5096e4 (diff) | |
download | chromium_src-32765f80889421c6161a7b9e73bc1ee722db6892.zip chromium_src-32765f80889421c6161a7b9e73bc1ee722db6892.tar.gz chromium_src-32765f80889421c6161a7b9e73bc1ee722db6892.tar.bz2 |
Add support for temporarily trusting a certificate for the duration of unit tests on Windows, rather than requiring the machine to be pre-configured out-of-band.
Given the lack of a Microsoft-provided high-level API to supply application-level trusts to the verification routines, this implements a workaround that intercepts attempts to open the trusted system root store and injects the test certificates directly. This allows the unit tests to work without requiring that the Test CA be added to the machine's Trusted Certificates store.
While doing so, clean up the interface to adding/removing trusted test certificates, so as to support more than one trusted certificate if necessary.
BUG=8470
TEST=To follow
Review URL: http://codereview.chromium.org/4646001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69351 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/test/test_server.h')
-rw-r--r-- | net/test/test_server.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/net/test/test_server.h b/net/test/test_server.h index 4154302..9686aef 100644 --- a/net/test/test_server.h +++ b/net/test/test_server.h @@ -23,11 +23,6 @@ #include "base/scoped_handle_win.h" #endif -#if defined(USE_OPENSSL) || defined(USE_NSS) -#include "base/ref_counted.h" -#include "net/base/x509_certificate.h" -#endif - class CommandLine; class DictionaryValue; class GURL; @@ -156,9 +151,6 @@ class TestServer { // Returns path to the root certificate. FilePath GetRootCertificatePath(); - // Returns false if our test root certificate is not trusted. - bool CheckCATrusted() WARN_UNUSED_RESULT; - // Load the test root cert, if it hasn't been loaded yet. bool LoadTestRootCert() WARN_UNUSED_RESULT; @@ -203,10 +195,6 @@ class TestServer { // If |type_| is TYPE_HTTPS, the TLS settings to use for the test server. HTTPSOptions https_options_; -#if defined(USE_OPENSSL) || defined(USE_NSS) - scoped_refptr<X509Certificate> cert_; -#endif - Type type_; // Has the server been started? |