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

Unified Diff: net/base/origin_bound_cert_service.cc

Issue 7740034: Revert 98288 - Added CreateOriginBound method to x509_certificate.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/origin_bound_cert_service.cc
===================================================================
--- net/base/origin_bound_cert_service.cc (revision 98292)
+++ net/base/origin_bound_cert_service.cc (working copy)
@@ -316,25 +316,19 @@
uint32 serial_number,
std::string* private_key,
std::string* cert) {
+ std::string subject = "CN=OBC";
scoped_ptr<crypto::RSAPrivateKey> key(
crypto::RSAPrivateKey::Create(kKeySizeInBits));
if (!key.get()) {
LOG(WARNING) << "Unable to create key pair for client";
return ERR_KEY_GENERATION_FAILED;
}
-#if defined(USE_NSS)
- scoped_refptr<X509Certificate> x509_cert = X509Certificate::CreateOriginBound(
- key.get(),
- origin,
- serial_number,
- base::TimeDelta::FromDays(kValidityPeriodInDays));
-#else
+
scoped_refptr<X509Certificate> x509_cert = X509Certificate::CreateSelfSigned(
key.get(),
- "CN=anonymous.invalid",
+ subject,
serial_number,
base::TimeDelta::FromDays(kValidityPeriodInDays));
-#endif
if (!x509_cert) {
LOG(WARNING) << "Unable to create x509 cert for client";
return ERR_ORIGIN_BOUND_CERT_GENERATION_FAILED;
« no previous file with comments | « no previous file | net/base/x509_certificate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698