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

Unified Diff: net/ssl/server_bound_cert_service.cc

Issue 27832002: Sign self-signed certs with SHA256. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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/ssl/server_bound_cert_service.cc
===================================================================
--- net/ssl/server_bound_cert_service.cc (revision 231602)
+++ net/ssl/server_bound_cert_service.cc (working copy)
@@ -98,15 +98,13 @@
not_valid_before + base::TimeDelta::FromDays(kValidityPeriodInDays);
std::string der_cert;
std::vector<uint8> private_key_info;
- scoped_ptr<crypto::ECPrivateKey> key(crypto::ECPrivateKey::Create());
- if (!key.get()) {
- DLOG(ERROR) << "Unable to create key pair for client";
- *error = ERR_KEY_GENERATION_FAILED;
- return result.Pass();
- }
- if (!x509_util::CreateDomainBoundCertEC(key.get(), server_identifier,
- serial_number, not_valid_before,
- not_valid_after, &der_cert)) {
+ scoped_ptr<crypto::ECPrivateKey> key;
+ if (!x509_util::CreateKeyAndDomainBoundCertEC(server_identifier,
+ serial_number,
+ not_valid_before,
+ not_valid_after,
+ &key,
+ &der_cert)) {
DLOG(ERROR) << "Unable to create x509 cert for client";
*error = ERR_ORIGIN_BOUND_CERT_GENERATION_FAILED;
return result.Pass();

Powered by Google App Engine
This is Rietveld 408576698