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

Unified Diff: net/base/x509_util_nss.h

Issue 8296014: Use NSS to generate Origin-Bound Certs on Win and Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review changes Created 9 years, 2 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
Index: net/base/x509_util_nss.h
diff --git a/net/base/x509_util_nss.h b/net/base/x509_util_nss.h
new file mode 100644
index 0000000000000000000000000000000000000000..82dd4f9c417b0321ec80aef2a595350367a56a8f
--- /dev/null
+++ b/net/base/x509_util_nss.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_BASE_X509_UTIL_NSS_H_
+#define NET_BASE_X509_UTIL_NSS_H_
+#pragma once
+
+#include <string>
+
+#include "base/time.h"
+
+typedef struct CERTCertificateStr CERTCertificate;
+typedef struct SECKEYPrivateKeyStr SECKEYPrivateKey;
+typedef struct SECKEYPublicKeyStr SECKEYPublicKey;
+
+
+namespace net {
+
+namespace x509_util {
+
+// Creates a self-signed certificate containing |public_key|. Subject, serial
+// number and validity period are given as parameters. The certificate is
+// signed by |private_key|. The hashing algorithm for the signature is SHA-1.
+// |subject| is a distinguished name defined in RFC4514.
+CERTCertificate* CreateSelfSignedCert(
+ SECKEYPublicKey* public_key,
+ SECKEYPrivateKey* private_key,
+ const std::string& subject,
+ uint32 serial_number,
+ base::TimeDelta valid_duration);
+
+} // namespace x509_util
+
+} // namespace net
+
+#endif // NET_BASE_X509_UTIL_NSS_H_
« net/base/net_error_list.h ('K') | « net/base/x509_util.h ('k') | net/base/x509_util_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698