Index: net/base/x509_certificate_nss.cc |
diff --git a/net/base/x509_certificate_nss.cc b/net/base/x509_certificate_nss.cc |
index 54d2197e30ecd2db96f7d008a8c7442080e7a9fd..f0515f53161ad7a84a2a250e25701bd5b67291a7 100644 |
--- a/net/base/x509_certificate_nss.cc |
+++ b/net/base/x509_certificate_nss.cc |
@@ -10,6 +10,7 @@ |
#include <nss.h> |
#include <pk11pub.h> |
#include <prtime.h> |
+#include <seccomon.h> |
#include <secder.h> |
#include <sechash.h> |
@@ -154,6 +155,21 @@ bool X509Certificate::VerifyNameMatch(const std::string& hostname) const { |
return CERT_VerifyCertName(cert_handle_, hostname.c_str()) == SECSuccess; |
} |
+bool X509Certificate::IsIssuedByEncoded( |
+ const std::vector<std::string>& valid_issuers) { |
+ if (x509_util::IsCertNameItemInIssuerList(&cert_handle_->derIssuer, |
+ valid_issuers)) |
Ryan Sleevi
2012/12/13 19:49:05
STYLE: See comments re braces (also line 166-168)
|
+ return true; |
+ |
+ for (OSCertHandles::iterator it = intermediate_ca_certs_.begin(); |
+ it != intermediate_ca_certs_.end(); ++it) { |
+ if (x509_util::IsCertNameItemInIssuerList(&(*it)->derSubject, |
+ valid_issuers)) |
Ryan Sleevi
2012/12/13 19:49:05
BUG: See comment in ios re subject vs issuer
|
+ return true; |
+ } |
+ return false; |
+} |
+ |
// static |
bool X509Certificate::GetDEREncoded(X509Certificate::OSCertHandle cert_handle, |
std::string* encoded) { |