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

Unified Diff: net/base/x509_certificate_nss.cc

Issue 7324039: Ensure X509Certificate::OSCertHandles are safe to be used on both UI and IO threads on Win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: net/base/x509_certificate_nss.cc
diff --git a/net/base/x509_certificate_nss.cc b/net/base/x509_certificate_nss.cc
index 699c65502321e2dce387a8ca67328f889ee3d409..29382eea70a74dd17cae1c9bd655b4c5fb47b2b4 100644
--- a/net/base/x509_certificate_nss.cc
+++ b/net/base/x509_certificate_nss.cc
@@ -764,6 +764,11 @@ void X509Certificate::GetDNSNames(std::vector<std::string>* dns_names) const {
dns_names->push_back(subject_.common_name);
}
+X509Certificate::OSCertListHandle
+X509Certificate::CreateOSCertListHandle() const {
+ return CERT_DupCertificate(cert_handle_);
+}
wtc 2011/10/04 00:26:34 Change VerifyInternal to use CreateOSCertListHandl
Ryan Sleevi 2011/10/04 03:38:07 I don't think this is desirable for NSS, since the
wtc 2011/10/04 18:00:51 The reason I suggested having VerifyInternal use C
+
int X509Certificate::VerifyInternal(const std::string& hostname,
int flags,
CertVerifyResult* verify_result) const {
@@ -973,6 +978,11 @@ void X509Certificate::FreeOSCertHandle(OSCertHandle cert_handle) {
}
// static
+void X509Certificate::FreeOSCertListHandle(OSCertListHandle cert_list) {
wtc 2011/10/04 00:26:34 cert_list => cert_list_handle
+ CERT_DestroyCertificate(cert_list);
+}
+
+// static
SHA1Fingerprint X509Certificate::CalculateFingerprint(
OSCertHandle cert) {
SHA1Fingerprint sha1;

Powered by Google App Engine
This is Rietveld 408576698