summaryrefslogtreecommitdiffstats
path: root/net/base/x509_certificate.h
diff options
context:
space:
mode:
authormdietz@google.com <mdietz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-25 20:29:20 +0000
committermdietz@google.com <mdietz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-25 20:29:20 +0000
commit4e6c61f7ee7caffbc7639ccf00f809d477e4eb68 (patch)
tree387b23f894a71749615affd4639116b1a14131ac /net/base/x509_certificate.h
parent798ae67e6e6efd131c91974d1819c4ca2f30c563 (diff)
downloadchromium_src-4e6c61f7ee7caffbc7639ccf00f809d477e4eb68.zip
chromium_src-4e6c61f7ee7caffbc7639ccf00f809d477e4eb68.tar.gz
chromium_src-4e6c61f7ee7caffbc7639ccf00f809d477e4eb68.tar.bz2
Added CreateOriginBound method to x509_certificate.h.
This static method branches the CreateSelfSigned code to create a self signed certificate that contains an X509v3 extension that indicates the ASCII weborigin that is bound to the generated certificate. BUG=88782 TEST= Review URL: http://codereview.chromium.org/7384002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98288 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/x509_certificate.h')
-rw-r--r--net/base/x509_certificate.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/base/x509_certificate.h b/net/base/x509_certificate.h
index 4c8dd01..8589e92 100644
--- a/net/base/x509_certificate.h
+++ b/net/base/x509_certificate.h
@@ -187,6 +187,18 @@ class NET_EXPORT X509Certificate
uint32 serial_number,
base::TimeDelta valid_duration);
+ // Create an origin bound certificate containing the public key in |key|.
+ // 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.
+ //
+ // See Internet Draft draft-balfanz-tls-obc-00 for more details:
+ // http://balfanz.github.com/tls-obc-spec/draft-balfanz-tls-obc-00.html
+ static X509Certificate* CreateOriginBound(crypto::RSAPrivateKey* key,
+ 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);