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

Side by Side Diff: base/crypto/rsa_private_key_nss.cc

Issue 6714032: Move some files in base to base/memory. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: only base Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/crypto/rsa_private_key.h" 5 #include "base/crypto/rsa_private_key.h"
6 6
7 #include <cryptohi.h> 7 #include <cryptohi.h>
8 #include <keyhi.h> 8 #include <keyhi.h>
9 #include <pk11pub.h> 9 #include <pk11pub.h>
10 10
11 #include <list> 11 #include <list>
12 12
13 #include "base/debug/leak_annotations.h" 13 #include "base/debug/leak_annotations.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/memory/scoped_ptr.h"
15 #include "base/nss_util.h" 16 #include "base/nss_util.h"
16 #include "base/nss_util_internal.h" 17 #include "base/nss_util_internal.h"
17 #include "base/scoped_ptr.h"
18 #include "base/string_util.h" 18 #include "base/string_util.h"
19 19
20 // TODO(rafaelw): Consider refactoring common functions and definitions from 20 // TODO(rafaelw): Consider refactoring common functions and definitions from
21 // rsa_private_key_win.cc or using NSS's ASN.1 encoder. 21 // rsa_private_key_win.cc or using NSS's ASN.1 encoder.
22 namespace { 22 namespace {
23 23
24 static bool ReadAttribute(SECKEYPrivateKey* key, 24 static bool ReadAttribute(SECKEYPrivateKey* key,
25 CK_ATTRIBUTE_TYPE type, 25 CK_ATTRIBUTE_TYPE type,
26 std::vector<uint8>* output) { 26 std::vector<uint8>* output) {
27 SECItem item; 27 SECItem item;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 result->public_key_ = SECKEY_ConvertToPublicKey(result->key_); 239 result->public_key_ = SECKEY_ConvertToPublicKey(result->key_);
240 if (!result->public_key_) { 240 if (!result->public_key_) {
241 NOTREACHED(); 241 NOTREACHED();
242 return NULL; 242 return NULL;
243 } 243 }
244 244
245 return result.release(); 245 return result.release();
246 } 246 }
247 247
248 } // namespace base 248 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698