Fixed slot selection in HMAC class to ensure that we are using softtoken instead of TPM slots.
BUG=chromium-os:21633 TEST=make sure that user signin works properly on Alex - we should not show Gaia signin screen on second login after system resote Review URL: http://codereview.chromium.org/8373022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106881 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user