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

Side by Side Diff: net/base/keygen_handler.h

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 | « net/base/crypto_module.h ('k') | net/base/keygen_handler.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 (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 #ifndef NET_BASE_KEYGEN_HANDLER_H_ 5 #ifndef NET_BASE_KEYGEN_HANDLER_H_
6 #define NET_BASE_KEYGEN_HANDLER_H_ 6 #define NET_BASE_KEYGEN_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 23 matching lines...) Expand all
34 const GURL& url); 34 const GURL& url);
35 ~KeygenHandler(); 35 ~KeygenHandler();
36 36
37 // Actually generates the key-pair and the cert request (SPKAC), and returns 37 // Actually generates the key-pair and the cert request (SPKAC), and returns
38 // a base64-encoded string suitable for use as the form value of <keygen>. 38 // a base64-encoded string suitable for use as the form value of <keygen>.
39 std::string GenKeyAndSignChallenge(); 39 std::string GenKeyAndSignChallenge();
40 40
41 // Exposed only for unit tests. 41 // Exposed only for unit tests.
42 void set_stores_key(bool store) { stores_key_ = store;} 42 void set_stores_key(bool store) { stores_key_ = store;}
43 43
44 #if defined(USE_NSS) 44 #if defined(USE_NSS_CERTS)
45 // Register the delegate to be used to get the token to store the key in, and 45 // Register the delegate to be used to get the token to store the key in, and
46 // to get the password if the token is unauthenticated. 46 // to get the password if the token is unauthenticated.
47 // GenKeyAndSignChallenge runs on a worker thread, so using a blocking 47 // GenKeyAndSignChallenge runs on a worker thread, so using a blocking
48 // password callback is okay here. 48 // password callback is okay here.
49 void set_crypto_module_delegate( 49 void set_crypto_module_delegate(
50 scoped_ptr<crypto::NSSCryptoModuleDelegate> delegate); 50 scoped_ptr<crypto::NSSCryptoModuleDelegate> delegate);
51 #endif // defined(USE_NSS) 51 #endif // defined(USE_NSS_CERTS)
52 52
53 private: 53 private:
54 int key_size_in_bits_; // key size in bits (usually 2048) 54 int key_size_in_bits_; // key size in bits (usually 2048)
55 std::string challenge_; // challenge string sent by server 55 std::string challenge_; // challenge string sent by server
56 GURL url_; // the URL that requested the key 56 GURL url_; // the URL that requested the key
57 bool stores_key_; // should the generated key-pair be stored persistently? 57 bool stores_key_; // should the generated key-pair be stored persistently?
58 #if defined(USE_NSS) 58 #if defined(USE_NSS_CERTS)
59 // The callback for requesting a password to the PKCS#11 token. 59 // The callback for requesting a password to the PKCS#11 token.
60 scoped_ptr<crypto::NSSCryptoModuleDelegate> crypto_module_delegate_; 60 scoped_ptr<crypto::NSSCryptoModuleDelegate> crypto_module_delegate_;
61 #endif // defined(USE_NSS) 61 #endif // defined(USE_NSS_CERTS)
62 }; 62 };
63 63
64 } // namespace net 64 } // namespace net
65 65
66 #endif // NET_BASE_KEYGEN_HANDLER_H_ 66 #endif // NET_BASE_KEYGEN_HANDLER_H_
OLDNEW
« no previous file with comments | « net/base/crypto_module.h ('k') | net/base/keygen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698