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

Unified Diff: net/base/origin_bound_cert_service.cc

Issue 7384002: Added CreateOriginBound method to x509_certificate.h. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Changed ObCertOIDWrapper from a Singleton to a LeakySingleton to avoid a runtime error. 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') | net/base/x509_certificate_nss.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/origin_bound_cert_service.cc
diff --git a/net/base/origin_bound_cert_service.cc b/net/base/origin_bound_cert_service.cc
index 50d45c446e2fe41906a3d62802354acb45ee5460..f51710dbfa2f086a0a86137f5677dae281b5e84d 100644
--- a/net/base/origin_bound_cert_service.cc
+++ b/net/base/origin_bound_cert_service.cc
@@ -316,7 +316,6 @@ int OriginBoundCertService::GenerateCert(const std::string& origin,
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()) {
@@ -324,9 +323,9 @@ int OriginBoundCertService::GenerateCert(const std::string& origin,
return ERR_KEY_GENERATION_FAILED;
}
- scoped_refptr<X509Certificate> x509_cert = X509Certificate::CreateSelfSigned(
+ scoped_refptr<X509Certificate> x509_cert = X509Certificate::CreateOriginBound(
key.get(),
- subject,
+ origin,
serial_number,
base::TimeDelta::FromDays(kValidityPeriodInDays));
if (!x509_cert) {
« no previous file with comments | « no previous file | net/base/x509_certificate.h » ('j') | net/base/x509_certificate_nss.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698