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

Unified Diff: net/base/x509_certificate.cc

Issue 10377025: Parse an application/x-x509-user-cert response with (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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_nss.cc ('k') | net/third_party/mozilla_security_manager/nsKeygenHandler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_certificate.cc
===================================================================
--- net/base/x509_certificate.cc (revision 134554)
+++ net/base/x509_certificate.cc (working copy)
@@ -414,6 +414,7 @@
// also be DER encoded certificates wrapped inside of PEM blocks.
format = FORMAT_PEM_CERT_SEQUENCE;
certificates.push_back(handle);
+ fprintf(stderr, "PEM: format %d\n", (int)format);
continue;
}
@@ -426,6 +427,8 @@
if (format & kFormatDecodePriority[i]) {
certificates = CreateOSCertHandlesFromBytes(decoded.c_str(),
decoded.size(), kFormatDecodePriority[i]);
+ if (!certificates.empty())
+ fprintf(stderr, "PEM: format %d\n", (int)kFormatDecodePriority[i]);
}
}
}
@@ -442,9 +445,12 @@
// as a PEM certificate/chain.
for (size_t i = 0; certificates.empty() &&
i < arraysize(kFormatDecodePriority); ++i) {
- if (format & kFormatDecodePriority[i])
+ if (format & kFormatDecodePriority[i]) {
certificates = CreateOSCertHandlesFromBytes(data, length,
kFormatDecodePriority[i]);
+ if (!certificates.empty())
+ fprintf(stderr, "Binary: format %d\n", (int)kFormatDecodePriority[i]);
+ }
}
CertificateList results;
@@ -457,6 +463,9 @@
X509Certificate* result = CreateFromHandle(*it, OSCertHandles());
results.push_back(scoped_refptr<X509Certificate>(result));
FreeOSCertHandle(*it);
+ fprintf(stderr, "Certificate: %s issued by %s\n",
+ result->subject().common_name.c_str(),
+ result->issuer().common_name.c_str());
}
return results;
« no previous file with comments | « net/base/cert_database_nss.cc ('k') | net/third_party/mozilla_security_manager/nsKeygenHandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698