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

Unified Diff: net/cert/x509_util.h

Issue 16158005: Adds CreateSelfSignedCertEC to x509_util.h in preparation of persistent DTLS identity store for Web… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 | « no previous file | net/cert/x509_util_nss.cc » ('j') | net/cert/x509_util_nss.cc » ('J')
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 50ffc7f55fc9538cd6ca724e292cd224722ebc64..c239effe9d975ebc1085500be10a80adb1d72c49 100644
--- a/net/cert/x509_util.h
+++ b/net/cert/x509_util.h
@@ -44,6 +44,18 @@ NET_EXPORT_PRIVATE bool CreateDomainBoundCertEC(
base::Time not_valid_after,
std::string* der_cert);
+// Creates a self-signed certificate containing the public key in |key|.
+// Common name, serial number and validity period are given as parameters.
+// The certificate is signed by the private key in |key|.
+// The hashing algorithm for the signature is SHA-1.
+NET_EXPORT_PRIVATE bool CreateSelfSignedCertEC(
+ crypto::ECPrivateKey* key,
+ const std::string& common_name,
+ uint32 serial_number,
+ base::Time not_valid_before,
+ base::Time not_valid_after,
+ std::string* der_cert);
+
// 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 | « no previous file | net/cert/x509_util_nss.cc » ('j') | net/cert/x509_util_nss.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698