diff --git a/src/credential.rs b/src/credential.rs index ee45d6e..dac78c6 100644 --- a/src/credential.rs +++ b/src/credential.rs @@ -344,7 +344,6 @@ mod test { fn credential_data() -> CredentialData { use ctap_types::webauthn::{PublicKeyCredentialRpEntity, PublicKeyCredentialUserEntity}; - CredentialData { rp: PublicKeyCredentialRpEntity { id: String::from("John Doe"), @@ -424,7 +423,6 @@ mod test { fn random_credential_data() -> CredentialData { use ctap_types::webauthn::{PublicKeyCredentialRpEntity, PublicKeyCredentialUserEntity}; - CredentialData { rp: PublicKeyCredentialRpEntity { id: random_string(), diff --git a/src/ctap1.rs b/src/ctap1.rs index e56e0b0..e519b82 100644 --- a/src/ctap1.rs +++ b/src/ctap1.rs @@ -63,7 +63,7 @@ impl Authenticator for crate::Authenti let wrapped_key = syscall!(self .trussed - .wrap_key_chacha8poly1305(wrapping_key, private_key, ®.app_id,)) + .wrap_key_chacha8poly1305(wrapping_key, private_key, &[])) .wrapped_key; // debug!("wrapped_key = {:?}", &wrapped_key); @@ -208,7 +208,7 @@ impl Authenticator for crate::Authenti let key_result = syscall!(self.trussed.unwrap_key_chacha8poly1305( wrapping_key, bytes, - b"", + &[], Location::Volatile, )) .key; diff --git a/src/ctap2.rs b/src/ctap2.rs index 9fd18e1..ca857a1 100644 --- a/src/ctap2.rs +++ b/src/ctap2.rs @@ -320,12 +320,11 @@ impl Authenticator for crate::Authenti false => { // WrappedKey version let wrapping_key = self.state.persistent.key_wrapping_key(&mut self.trussed)?; - let wrapped_key = syscall!(self.trussed.wrap_key_chacha8poly1305( - wrapping_key, - private_key, - &rp_id_hash, - )) - .wrapped_key; + let wrapped_key = + syscall!(self + .trussed + .wrap_key_chacha8poly1305(wrapping_key, private_key, &[])) + .wrapped_key; // 32B key, 12B nonce, 16B tag + some info on algorithm (P256/Ed25519) // Turns out it's size 92 (enum serialization not optimized yet...) @@ -1465,8 +1464,7 @@ impl crate::Authenticator { let key_result = syscall!(self.trussed.unwrap_key_chacha8poly1305( wrapping_key, &bytes, - b"", - // &rp_id_hash, + &[], Location::Volatile, )) .key;