summaryrefslogtreecommitdiffstats
path: root/net/base/cert_test_util.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add support for temporarily trusting a certificate for the duration of unit ↵rsleevi@chromium.org2010-12-161-136/+20
| | | | | | | | | | | | | | | 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
* Implements Signature Creator & Verifier for openssljoth@chromium.org2010-11-181-1/+1
| | | | | | | | | | | Also adds a little more infrastructure to assist in openssl error handling. BUG=None TEST=base_unittests RSA* and Sign* Review URL: http://codereview.chromium.org/5105003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66622 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor EnsureOpenSSLInit and openssl_util into basejoth@chromium.org2010-11-171-12/+10
| | | | | | | | | | | | 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
* Fixes net_unittests for OpenSSL.bulach@chromium.org2010-10-271-22/+34
| | | | | | | | | | | | | IntermediateCARequireExplicitPolicy uses a DER-encoded (rather than PEM) certificate. HTTPSRequestTest.HTTPSExpiredTest however uses a PEM certificate, so we need to try both formats in LoadTemporaryRootCert(). BUG=none TEST=X509CertificateTest.IntermediateCARequireExplicitPolicy Review URL: http://codereview.chromium.org/4047002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64068 0039d316-1c4b-4281-b951-d872f2087c98
* Fix loading of a temporary root certificate for OpenSSLrsleevi@chromium.org2010-10-201-9/+26
| | | | | | | | | BUG=None TEST=Build with use_openssl=1, HTTPSRequestTest.HTTPSExpiredTest Review URL: http://codereview.chromium.org/3678001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63189 0039d316-1c4b-4281-b951-d872f2087c98
* Move scoped_cftyperef from base to base/mac, use the new namespace, and name itbrettw@chromium.org2010-10-171-3/+3
| | | | | | | | | | properly (scoped_cftyperef -> ScopedCFTypeRef). TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3855001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62887 0039d316-1c4b-4281-b951-d872f2087c98
* Adds X509 certificates for OpenSSL.bulach@chromium.org2010-10-081-2/+29
| | | | | | | | | | Depends on http://codereview.chromium.org/3565006/show TEST=Existing *X509* tests should pass. Review URL: http://codereview.chromium.org/3529008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61955 0039d316-1c4b-4281-b951-d872f2087c98
* Make X509Certificate::CreateFromHandle() copy the OSCertHandle, rather than ↵rsleevi@chromium.org2010-06-261-2/+5
| | | | | | | | | | | | assume ownership R=wtc BUG=47463 TEST=none Review URL: http://codereview.chromium.org/2867026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50938 0039d316-1c4b-4281-b951-d872f2087c98
* Move LoadTemporaryCert to the new files cert_test_util.{h,cc} andwtc@chromium.org2010-03-171-0/+99
rename it LoadTemporaryRootCert, so that it can be used by x509_certificate_unittest.cc. R=eroman BUG=none TEST=No compilation and test failures. Review URL: http://codereview.chromium.org/997006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41794 0039d316-1c4b-4281-b951-d872f2087c98