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) { |