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

Unified Diff: net/base/cert_database_nss.cc

Issue 7272014: Mark untrusted certificates as such in Linux UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 6 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
« no previous file with comments | « net/base/cert_database.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/cert_database_nss.cc
diff --git a/net/base/cert_database_nss.cc b/net/base/cert_database_nss.cc
index 179ee82b9b584502014b42ecc0b48c09486b7a3a..f95538b629e5e2f8beec1b6e0e31fffa0abbcfc2 100644
--- a/net/base/cert_database_nss.cc
+++ b/net/base/cert_database_nss.cc
@@ -238,6 +238,19 @@ unsigned int CertDatabase::GetCertTrust(
}
}
+bool CertDatabase::IsUntrusted(const X509Certificate* cert) const {
+ CERTCertTrust nsstrust;
+ SECStatus rv = CERT_GetCertTrust(cert->os_cert_handle(), &nsstrust);
+ if (rv != SECSuccess) {
+ LOG(ERROR) << "CERT_GetCertTrust failed with error " << PORT_GetError();
+ return false;
+ }
+
+ return nsstrust.sslFlags == 0 &&
+ nsstrust.emailFlags == 0 &&
+ nsstrust.objectSigningFlags == 0;
wtc 2011/09/12 23:57:04 agl: sorry for the very late reply. I got the ans
agl 2011/09/13 16:53:50 At least on my Ubuntu system I do have a distruste
wtc 2011/09/14 22:00:53 Yes. Unfortunately the MD5 Collisions Inc. CA in
wtc 2011/09/14 22:58:53 I examined the MD5 Collisions Inc. CA certficate i
+}
+
bool CertDatabase::SetCertTrust(const X509Certificate* cert,
CertType type,
unsigned int trusted) {
« no previous file with comments | « net/base/cert_database.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698