summaryrefslogtreecommitdiffstats
path: root/net/base/x509_certificate_win.cc
diff options
context:
space:
mode:
authorbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 14:33:11 +0000
committerbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 14:33:11 +0000
commit1e5fead8aa598e7d834806f6f8eaef8302074f35 (patch)
tree27d865f1cbc3f810fd0ea0038228057e2dafd814 /net/base/x509_certificate_win.cc
parent2db58053f8e04deaf129724bdf8ec0b326fb65ac (diff)
downloadchromium_src-1e5fead8aa598e7d834806f6f8eaef8302074f35.zip
chromium_src-1e5fead8aa598e7d834806f6f8eaef8302074f35.tar.gz
chromium_src-1e5fead8aa598e7d834806f6f8eaef8302074f35.tar.bz2
Adds X509 certificates for OpenSSL.
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
Diffstat (limited to 'net/base/x509_certificate_win.cc')
-rw-r--r--net/base/x509_certificate_win.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/base/x509_certificate_win.cc b/net/base/x509_certificate_win.cc
index 03434bb..380ff3c 100644
--- a/net/base/x509_certificate_win.cc
+++ b/net/base/x509_certificate_win.cc
@@ -787,6 +787,16 @@ bool X509Certificate::VerifyEV() const {
}
// static
+bool X509Certificate::IsSameOSCert(X509Certificate::OSCertHandle a,
+ X509Certificate::OSCertHandle b) {
+ DCHECK(a && b);
+ if (a == b)
+ return true;
+ return a->cbCertEncoded == b->cbCertEncoded &&
+ memcmp(a->pbCertEncoded, b->pbCertEncoded, a->cbCertEncoded) == 0;
+}
+
+// static
X509Certificate::OSCertHandle X509Certificate::CreateOSCertHandleFromBytes(
const char* data, int length) {
OSCertHandle cert_handle = NULL;