Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ p256 = { version = "0.13", default-features = false, features = ["arithmetic", "
[dev-dependencies]
env_logger = "^0.6"
getopts = "^0.2"
assert_matches = "1.2"
rpassword = "5.0"
flate3 = "~1.1"
aes-gcm = "0.10"
Expand Down
12 changes: 6 additions & 6 deletions src/authenticatorservice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ mod tests {
let (status_tx, _) = channel::<StatusUpdate>();

let mut s = AuthenticatorService::new().unwrap();
assert_matches!(
assert!(matches!(
s.register(
1_000,
RegisterArgs {
Expand Down Expand Up @@ -459,9 +459,9 @@ mod tests {
)
.unwrap_err(),
crate::errors::AuthenticatorError::NoConfiguredTransports
);
));

assert_matches!(
assert!(matches!(
s.sign(
1_000,
SignArgs {
Expand All @@ -480,12 +480,12 @@ mod tests {
)
.unwrap_err(),
crate::errors::AuthenticatorError::NoConfiguredTransports
);
));

assert_matches!(
assert!(matches!(
s.cancel().unwrap_err(),
crate::errors::AuthenticatorError::NoConfiguredTransports
);
));
}

#[test]
Expand Down
4 changes: 4 additions & 0 deletions src/crypto/der.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use super::CryptoError;

pub const TAG_INTEGER: u8 = 0x02;
Expand Down
4 changes: 4 additions & 0 deletions src/crypto/dummy.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use super::CryptoError;

/*
Expand Down
4 changes: 4 additions & 0 deletions src/crypto/nss.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use super::CryptoError;
use nss_rs::p11::{
PK11Origin, PK11_CreateContextBySymKey, PK11_Decrypt, PK11_DigestFinal, PK11_DigestOp,
Expand Down
4 changes: 4 additions & 0 deletions src/crypto/openssl.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use super::CryptoError;
use openssl::bn::BigNumContext;
use openssl::derive::Deriver;
Expand Down
4 changes: 4 additions & 0 deletions src/crypto/rustcrypto.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use super::CryptoError;
use aes::cipher::{BlockDecryptMut, BlockEncryptMut, KeyIvInit};
use hmac::Mac;
Expand Down
4 changes: 4 additions & 0 deletions src/ctap2/attestation.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use super::server::AuthenticatorExtensionsCredBlob;
use super::utils::{from_slice_stream, read_be_u16, read_be_u32, read_byte};
use crate::crypto::{COSEAlgorithm, CryptoError, SharedSecret};
Expand Down
4 changes: 4 additions & 0 deletions src/ctap2/client_data.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use super::commands::CommandError;
use crate::transport::errors::HIDError;
use base64::Engine;
Expand Down
8 changes: 6 additions & 2 deletions src/ctap2/commands/authenticator_config.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use super::{Command, CommandError, PinUvAuthCommand, RequestCtap2, StatusCode};
use crate::{
crypto::{PinUvAuthParam, PinUvAuthToken},
Expand All @@ -14,9 +18,9 @@ pub struct SetMinPINLength {
/// Minimum PIN length in code points
pub new_min_pin_length: Option<u64>,
/// RP IDs which are allowed to get this information via the minPinLength extension.
/// This parameter MUST NOT be used unless the minPinLength extension is supported.
/// This parameter MUST NOT be used unless the minPinLength extension is supported.
pub min_pin_length_rpids: Option<Vec<String>>,
/// The authenticator returns CTAP2_ERR_PIN_POLICY_VIOLATION until changePIN is successful.
/// The authenticator returns CTAP2_ERR_PIN_POLICY_VIOLATION until changePIN is successful.
pub force_change_pin: Option<bool>,
}

Expand Down
4 changes: 4 additions & 0 deletions src/ctap2/commands/bio_enrollment.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use crate::{
crypto::{PinUvAuthParam, PinUvAuthToken},
ctap2::server::UserVerificationRequirement,
Expand Down
4 changes: 4 additions & 0 deletions src/ctap2/commands/client_pin.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

#![allow(non_upper_case_globals)]
use super::CtapResponse;
// Note: Needed for PinUvAuthTokenPermission
Expand Down
4 changes: 4 additions & 0 deletions src/ctap2/commands/credential_management.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use super::{Command, CommandError, CtapResponse, PinUvAuthCommand, RequestCtap2, StatusCode};
use crate::{
crypto::{COSEKey, PinUvAuthParam, PinUvAuthToken},
Expand Down
Loading
Loading