OLD | NEW |
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 #ifndef CHROME_BROWSER_CHROMEOS_PLATFORM_KEYS_PLATFORM_KEYS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_PLATFORM_KEYS_PLATFORM_KEYS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_PLATFORM_KEYS_PLATFORM_KEYS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_PLATFORM_KEYS_PLATFORM_KEYS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 // |error_message| contain an error message. | 30 // |error_message| contain an error message. |
31 typedef base::Callback<void(const std::string& public_key_spki_der, | 31 typedef base::Callback<void(const std::string& public_key_spki_der, |
32 const std::string& error_message)> | 32 const std::string& error_message)> |
33 GenerateKeyCallback; | 33 GenerateKeyCallback; |
34 | 34 |
35 // Generates a RSA key with |modulus_length|. |token_id| is currently ignored, | 35 // Generates a RSA key with |modulus_length|. |token_id| is currently ignored, |
36 // instead the user token associated with |profile| is always used. |callback| | 36 // instead the user token associated with |profile| is always used. |callback| |
37 // will be invoked with the resulting public key or an error. | 37 // will be invoked with the resulting public key or an error. |
38 void GenerateRSAKey(const std::string& token_id, | 38 void GenerateRSAKey(const std::string& token_id, |
39 unsigned int modulus_length, | 39 unsigned int modulus_length, |
| 40 unsigned long public_exponent, |
40 const GenerateKeyCallback& callback, | 41 const GenerateKeyCallback& callback, |
41 Profile* profile); | 42 Profile* profile); |
42 | 43 |
43 // If signing was successful, |signature| will be contain the signature and | 44 // If signing was successful, |signature| will be contain the signature and |
44 // |error_message| will be empty. If it failed, |signature| will be empty and | 45 // |error_message| will be empty. If it failed, |signature| will be empty and |
45 // |error_message| contain an error message. | 46 // |error_message| contain an error message. |
46 typedef base::Callback<void(const std::string& signature, | 47 typedef base::Callback<void(const std::string& signature, |
47 const std::string& error_message)> SignCallback; | 48 const std::string& error_message)> SignCallback; |
48 | 49 |
49 // Signs |data| with the private key matching |public_key|, if that key is | 50 // Signs |data| with the private key matching |public_key|, if that key is |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void RemoveCertificate(const std::string& token_id, | 102 void RemoveCertificate(const std::string& token_id, |
102 scoped_refptr<net::X509Certificate> certificate, | 103 scoped_refptr<net::X509Certificate> certificate, |
103 const RemoveCertificateCallback& callback, | 104 const RemoveCertificateCallback& callback, |
104 Profile* profile); | 105 Profile* profile); |
105 | 106 |
106 } // namespace platform_keys | 107 } // namespace platform_keys |
107 | 108 |
108 } // namespace chromeos | 109 } // namespace chromeos |
109 | 110 |
110 #endif // CHROME_BROWSER_CHROMEOS_PLATFORM_KEYS_PLATFORM_KEYS_H_ | 111 #endif // CHROME_BROWSER_CHROMEOS_PLATFORM_KEYS_PLATFORM_KEYS_H_ |
OLD | NEW |