Compare commits

...

2 Commits

Author SHA1 Message Date
a66fdb0edd fix test
Some checks failed
continuous-integration/drone/tag Build is failing
2020-10-13 14:10:22 +02:00
0ec859f4a6 remove trailing newline from pin
Some checks failed
continuous-integration/drone/push Build is failing
2020-09-25 12:40:34 +02:00
4 changed files with 4 additions and 4 deletions

2
Cargo.lock generated
View File

@@ -377,7 +377,7 @@ dependencies = [
[[package]]
name = "fido2luks"
version = "0.2.14"
version = "0.2.15"
dependencies = [
"ctap_hmac",
"failure",

View File

@@ -1,6 +1,6 @@
[package]
name = "fido2luks"
version = "0.2.14"
version = "0.2.15"
authors = ["shimunn <shimun@shimun.net>"]
edition = "2018"

View File

@@ -25,7 +25,7 @@ fn read_pin(ap: &AuthenticatorParameters) -> Fido2LuksResult<String> {
if let Some(src) = ap.pin_source.as_ref() {
let mut pin = String::new();
File::open(src)?.read_to_string(&mut pin)?;
Ok(pin)
Ok(pin.trim_end_matches("\n").to_string()) //remove trailing newline
} else {
util::read_password("Authenticator PIN", false)
}

View File

@@ -198,7 +198,7 @@ mod test {
fn input_salt_obtain() {
assert_eq!(
SecretInput::String("abc".into())
.obtain(&PasswordHelper::Stdin)
.obtain_sha256(&PasswordHelper::Stdin)
.unwrap(),
[
186, 120, 22, 191, 143, 1, 207, 234, 65, 65, 64, 222, 93, 174, 34, 35, 176, 3, 97,