use transactions, and how to store a bool

This commit is contained in:
Fabian Kaczmarczyck
2021-01-22 10:55:11 +01:00
parent 5fe111698b
commit c38f00624a
2 changed files with 13 additions and 5 deletions

View File

@@ -328,6 +328,7 @@ impl PinProtocolV1 {
let token_encryption_key = crypto::aes256::EncryptionKey::new(&shared_secret);
let pin_decryption_key = crypto::aes256::DecryptionKey::new(&token_encryption_key);
self.verify_pin_hash_enc(rng, persistent_store, &pin_decryption_key, pin_hash_enc)?;
// TODO(kaczmarczyck) can this be moved up in the specification?
if persistent_store.has_force_pin_change()? {
return Err(Ctap2StatusCode::CTAP2_ERR_PIN_INVALID);
}