| OLD | NEW |
| 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 CRYPTO_NSS_UTIL_H_ | 5 #ifndef CRYPTO_NSS_UTIL_H_ |
| 6 #define CRYPTO_NSS_UTIL_H_ | 6 #define CRYPTO_NSS_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // Check if the current NSS version is greater than or equals to |version|. | 79 // Check if the current NSS version is greater than or equals to |version|. |
| 80 // A sample version string is "3.12.3". | 80 // A sample version string is "3.12.3". |
| 81 bool CheckNSSVersion(const char* version); | 81 bool CheckNSSVersion(const char* version); |
| 82 | 82 |
| 83 #if defined(OS_CHROMEOS) | 83 #if defined(OS_CHROMEOS) |
| 84 // Open the r/w nssdb that's stored inside the user's encrypted home | 84 // Open the r/w nssdb that's stored inside the user's encrypted home |
| 85 // directory. This is the default slot returned by | 85 // directory. This is the default slot returned by |
| 86 // GetPublicNSSKeySlot(). | 86 // GetPublicNSSKeySlot(). |
| 87 void OpenPersistentNSSDB(); | 87 void OpenPersistentNSSDB(); |
| 88 | 88 |
| 89 // A delegate class that we can use it to access the cros API for | 89 // A delegate class that we can use to access the cros API for |
| 90 // communication with cryptohomed and the TPM. | 90 // communication with cryptohomed and the TPM. |
| 91 class TPMTokenInfoDelegate { | 91 class TPMTokenInfoDelegate { |
| 92 public: | 92 public: |
| 93 TPMTokenInfoDelegate(); | 93 TPMTokenInfoDelegate(); |
| 94 virtual ~TPMTokenInfoDelegate(); | 94 virtual ~TPMTokenInfoDelegate(); |
| 95 virtual bool IsTokenReady() const = 0; | 95 virtual bool IsTokenReady() const = 0; |
| 96 virtual void GetTokenInfo(std::string* token_name, | 96 virtual void GetTokenInfo(std::string* token_name, |
| 97 std::string* user_pin) const = 0; | 97 std::string* user_pin) const = 0; |
| 98 }; | 98 }; |
| 99 | 99 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 private: | 146 private: |
| 147 base::Lock *lock_; | 147 base::Lock *lock_; |
| 148 DISALLOW_COPY_AND_ASSIGN(AutoNSSWriteLock); | 148 DISALLOW_COPY_AND_ASSIGN(AutoNSSWriteLock); |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 #endif // defined(USE_NSS) | 151 #endif // defined(USE_NSS) |
| 152 | 152 |
| 153 } // namespace crypto | 153 } // namespace crypto |
| 154 | 154 |
| 155 #endif // CRYPTO_NSS_UTIL_H_ | 155 #endif // CRYPTO_NSS_UTIL_H_ |
| OLD | NEW |