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

Unified Diff: net/base/x509_certificate.h

Issue 7384002: Added CreateOriginBound method to x509_certificate.h. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 5 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/base/x509_certificate_nss.cc » ('j') | net/base/x509_certificate_nss.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_certificate.h
diff --git a/net/base/x509_certificate.h b/net/base/x509_certificate.h
index 8e56098000e62d7727e8dd7b47c2cafcb4763b69..bef87c9c7bf6166b4f67ace1a58c14bdcecb41b9 100644
--- a/net/base/x509_certificate.h
+++ b/net/base/x509_certificate.h
@@ -202,6 +202,30 @@ class NET_API X509Certificate
uint32 serial_number,
base::TimeDelta valid_duration);
+ // Create an origin bound certificate containing the public key in |key|.
+ // Subject, web origin, 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.
+ //
+ // |subject| is a distinguished name defined in RFC4514.
+ //
+ // An example:
+ // CN=Michael Wong,O=FooBar Corporation,DC=foobar,DC=com
+ //
+ // SECURITY WARNING
+ //
+ // Using self-signed certificates has the following security risks:
+ // 1. Encryption without authentication and thus vulnerable to
+ // man-in-the-middle attacks.
+ // 2. Self-signed certificates cannot be revoked.
+ //
+ // Use this certificate only after the above risks are acknowledged.
wtc 2011/08/04 00:37:53 Remove the security warning (lines 215-222). Repl
+ static X509Certificate* CreateOriginBound(crypto::RSAPrivateKey* key,
+ const std::string& subject,
+ const std::string& origin,
+ uint32 serial_number,
+ base::TimeDelta valid_duration);
+
// Appends a representation of this object to the given pickle.
void Persist(Pickle* pickle);
« no previous file with comments | « no previous file | net/base/x509_certificate_nss.cc » ('j') | net/base/x509_certificate_nss.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698