expose needs_pin

This commit is contained in:
shimun 2020-10-18 20:10:54 +02:00
parent f5d52ee8b5
commit 3a6dd90ec4
Signed by: shimun
GPG Key ID: E81D8382DC2F971B
2 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,7 @@
[package] [package]
name = "ctap_hmac" name = "ctap_hmac"
description = "A Rust implementation of the FIDO2 CTAP protocol, including the HMAC extension" description = "A Rust implementation of the FIDO2 CTAP protocol, including the HMAC extension"
version = "0.4.3" version = "0.4.4"
license = "Apache-2.0/MIT" license = "Apache-2.0/MIT"
homepage = "https://github.com/shimunn/ctap" homepage = "https://github.com/shimunn/ctap"
repository = "https://github.com/shimunn/ctap" repository = "https://github.com/shimunn/ctap"

View File

@ -325,6 +325,11 @@ impl FidoDevice {
} }
} }
/// True if this authenticator requires a PIN
pub fn needs_pin(&self) -> bool {
self.needs_pin
}
/// Unlock the device with the provided PIN. Internally this will generate /// Unlock the device with the provided PIN. Internally this will generate
/// an ECDH keypair, send the encrypted PIN to the device and store the PIN /// an ECDH keypair, send the encrypted PIN to the device and store the PIN
/// token that the device generates on every power cycle. The PIN itself is /// token that the device generates on every power cycle. The PIN itself is