diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/hmac_nss.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/hmac_nss.cc b/crypto/hmac_nss.cc index 81b2e39..cf202e5 100644 --- a/crypto/hmac_nss.cc +++ b/crypto/hmac_nss.cc @@ -48,7 +48,7 @@ bool HMAC::Init(const unsigned char *key, int key_length) { return false; } - plat_->slot_.reset(PK11_GetBestSlot(plat_->mechanism_, NULL)); + plat_->slot_.reset(PK11_GetInternalSlot()); if (!plat_->slot_.get()) { NOTREACHED(); return false; @@ -100,6 +100,9 @@ bool HMAC::Sign(const base::StringPiece& data, if (PK11_DigestOp(context.get(), reinterpret_cast<const unsigned char*>(data.data()), data.length()) != SECSuccess) { + LOG(WARNING) << "PK11_DigestOp failed, error " << PORT_GetError() + << ", slot name " << PK11_GetSlotName(plat_->slot_.get()) + << ", token name " << PK11_GetTokenName(plat_->slot_.get()); NOTREACHED(); return false; } |