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

Unified Diff: net/cert/x509_util.h

Issue 2296953004: Send certificates to devtools when it's open instead of using certId (Closed)
Patch Set: self review Created 4 years, 3 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 | « content/public/common/resource_response_info.cc ('k') | net/cert/x509_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_util.h
diff --git a/net/cert/x509_util.h b/net/cert/x509_util.h
index 3ae9a146d863413b0d6f1c816d974b532bdd8978..07f4e21b1d32d42ca964d476eaf0eb88bc7d675e 100644
--- a/net/cert/x509_util.h
+++ b/net/cert/x509_util.h
@@ -9,8 +9,10 @@
#include <memory>
#include <string>
+#include <vector>
#include "base/memory/ref_counted.h"
+#include "base/strings/string_piece.h"
#include "base/time/time.h"
#include "net/base/net_export.h"
@@ -73,6 +75,17 @@ NET_EXPORT bool CreateSelfSignedCert(crypto::RSAPrivateKey* key,
base::Time not_valid_after,
std::string* der_cert);
+// Provides a method to parse a DER-encoded X509 certificate without calling any
+// OS primitives. This is useful in sandboxed processes.
+NET_EXPORT bool ParseCertificateSandboxed(
+ const base::StringPiece& certificate,
+ std::string* subject,
+ std::string* issuer,
+ base::Time* not_before,
+ base::Time* not_after,
+ std::vector<std::string>* dns_names,
+ std::vector<std::string>* ip_addresses);
+
// Comparator for use in STL algorithms that will sort client certificates by
// order of preference.
// Returns true if |a| is more preferable than |b|, allowing it to be used
« no previous file with comments | « content/public/common/resource_response_info.cc ('k') | net/cert/x509_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698