Chromium Code Reviews| Index: crypto/hmac_nss.cc |
| =================================================================== |
| --- crypto/hmac_nss.cc (revision 106500) |
| +++ crypto/hmac_nss.cc (working copy) |
| @@ -12,6 +12,10 @@ |
| #include "crypto/nss_util.h" |
| #include "crypto/scoped_nss_types.h" |
| +#if defined(OS_CHROMEOS) |
| +#include "crypto/nss_util_internal.h" |
| +#endif |
| + |
| namespace crypto { |
| struct HMACPlatformData { |
| @@ -48,7 +52,15 @@ |
| return false; |
| } |
| +#if defined(OS_CHROMEOS) |
| + // TODO(zelidrag): http://crosbug.com/21633 |
| + // For yet unknown reasons, on ChromeOS PK11_GetBestSlot is matching slot from |
| + // TPM here on a fresh machine when an account is just created. Need to |
| + // investigate what is the underlying cause of this transient behavior. |
| + plat_->slot_.reset(GetPublicNSSKeySlot()); |
| +#else |
| plat_->slot_.reset(PK11_GetBestSlot(plat_->mechanism_, NULL)); |
|
wtc
2011/10/22 22:58:23
Please try
plat_->slot_.reset(PK11_GetInternal
|
| +#endif |
| if (!plat_->slot_.get()) { |
| NOTREACHED(); |
| return false; |