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

Side by Side Diff: components/ownership/owner_key_util_impl.cc

Issue 1082123003: Rename USE_NSS to USE_NSS_CERTS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use-nss-certs
Patch Set: rebase Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « components/ownership/owner_key_util_impl.h ('k') | components/webcrypto/nss/aes_kw_nss.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/ownership/owner_key_util_impl.h" 5 #include "components/ownership/owner_key_util_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 // Get the key data off of disk 45 // Get the key data off of disk
46 int data_read = 46 int data_read =
47 base::ReadFile(public_key_file_, 47 base::ReadFile(public_key_file_,
48 reinterpret_cast<char*>(vector_as_array(output)), 48 reinterpret_cast<char*>(vector_as_array(output)),
49 safe_file_size); 49 safe_file_size);
50 return data_read == safe_file_size; 50 return data_read == safe_file_size;
51 } 51 }
52 52
53 #if defined(USE_NSS) 53 #if defined(USE_NSS_CERTS)
54 crypto::RSAPrivateKey* OwnerKeyUtilImpl::FindPrivateKeyInSlot( 54 crypto::RSAPrivateKey* OwnerKeyUtilImpl::FindPrivateKeyInSlot(
55 const std::vector<uint8>& key, 55 const std::vector<uint8>& key,
56 PK11SlotInfo* slot) { 56 PK11SlotInfo* slot) {
57 return crypto::RSAPrivateKey::FindFromPublicKeyInfoInSlot(key, slot); 57 return crypto::RSAPrivateKey::FindFromPublicKeyInfoInSlot(key, slot);
58 } 58 }
59 #endif // defined(USE_NSS) 59 #endif // defined(USE_NSS_CERTS)
60 60
61 bool OwnerKeyUtilImpl::IsPublicKeyPresent() { 61 bool OwnerKeyUtilImpl::IsPublicKeyPresent() {
62 return base::PathExists(public_key_file_); 62 return base::PathExists(public_key_file_);
63 } 63 }
64 64
65 } // namespace ownership 65 } // namespace ownership
OLDNEW
« no previous file with comments | « components/ownership/owner_key_util_impl.h ('k') | components/webcrypto/nss/aes_kw_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698