diff options
author | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-17 09:57:18 +0000 |
---|---|---|
committer | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-17 09:57:18 +0000 |
commit | 313834720d46a68071afe305975f8b70e9bc5782 (patch) | |
tree | 1d7b0dea339a8bcf3499cf29f27217cc985f35a1 /net/base/x509_certificate.h | |
parent | 0d18ee21d5ddbfecf3951ac8fc0f5a30465e0ffe (diff) | |
download | chromium_src-313834720d46a68071afe305975f8b70e9bc5782.zip chromium_src-313834720d46a68071afe305975f8b70e9bc5782.tar.gz chromium_src-313834720d46a68071afe305975f8b70e9bc5782.tar.bz2 |
Refactor EnsureOpenSSLInit and openssl_util into base
This allows the base/crypto methods to call EnsureOpenSSLInit.
Also factors out the SSL_CTX and X509_STORE to be more closely associated with their consumers (ssl socket and X509Certificate resp.) rather than process wide globals.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/4963002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66413 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/x509_certificate.h')
-rw-r--r-- | net/base/x509_certificate.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/base/x509_certificate.h b/net/base/x509_certificate.h index 2a7e6d7..1866a17 100644 --- a/net/base/x509_certificate.h +++ b/net/base/x509_certificate.h @@ -26,6 +26,7 @@ #elif defined(USE_OPENSSL) // Forward declaration; real one in <x509.h> struct x509_st; +typedef struct x509_store_st X509_STORE; #elif defined(USE_NSS) // Forward declaration; real one in <cert.h> struct CERTCertificateStr; @@ -234,6 +235,12 @@ class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> { static HCERTSTORE cert_store(); #endif +#if defined(USE_OPENSSL) + // Returns a handle to a global, in-memory certificate store. We + // use it for test code, e.g. importing the test server's certificate. + static X509_STORE* cert_store(); +#endif + // Verifies the certificate against the given hostname. Returns OK if // successful or an error code upon failure. // |