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

Side by Side Diff: net/base/origin_bound_cert_service.cc

Issue 8587018: Revert "Allow signing EC certs and creating EC origin-bound certs." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « crypto/third_party/nss/secsign.cc ('k') | net/base/x509_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/origin_bound_cert_service.h" 5 #include "net/base/origin_bound_cert_service.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 uint32 serial_number, 319 uint32 serial_number,
320 std::string* private_key, 320 std::string* private_key,
321 std::string* cert) { 321 std::string* cert) {
322 scoped_ptr<crypto::RSAPrivateKey> key( 322 scoped_ptr<crypto::RSAPrivateKey> key(
323 crypto::RSAPrivateKey::Create(kKeySizeInBits)); 323 crypto::RSAPrivateKey::Create(kKeySizeInBits));
324 if (!key.get()) { 324 if (!key.get()) {
325 LOG(WARNING) << "Unable to create key pair for client"; 325 LOG(WARNING) << "Unable to create key pair for client";
326 return ERR_KEY_GENERATION_FAILED; 326 return ERR_KEY_GENERATION_FAILED;
327 } 327 }
328 std::string der_cert; 328 std::string der_cert;
329 if (!x509_util::CreateOriginBoundCertRSA( 329 if (!x509_util::CreateOriginBoundCert(
330 key.get(), 330 key.get(),
331 origin, 331 origin,
332 serial_number, 332 serial_number,
333 base::TimeDelta::FromDays(kValidityPeriodInDays), 333 base::TimeDelta::FromDays(kValidityPeriodInDays),
334 &der_cert)) { 334 &der_cert)) {
335 LOG(WARNING) << "Unable to create x509 cert for client"; 335 LOG(WARNING) << "Unable to create x509 cert for client";
336 return ERR_ORIGIN_BOUND_CERT_GENERATION_FAILED; 336 return ERR_ORIGIN_BOUND_CERT_GENERATION_FAILED;
337 } 337 }
338 338
339 std::vector<uint8> private_key_info; 339 std::vector<uint8> private_key_info;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 delete job; 380 delete job;
381 } 381 }
382 382
383 int OriginBoundCertService::cert_count() { 383 int OriginBoundCertService::cert_count() {
384 return origin_bound_cert_store_->GetCertCount(); 384 return origin_bound_cert_store_->GetCertCount();
385 } 385 }
386 386
387 } // namespace net 387 } // namespace net
388 388
389 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::OriginBoundCertServiceWorker); 389 DISABLE_RUNNABLE_METHOD_REFCOUNT(net::OriginBoundCertServiceWorker);
OLDNEW
« no previous file with comments | « crypto/third_party/nss/secsign.cc ('k') | net/base/x509_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698