mirror of
https://github.com/trussed-dev/fido-authenticator.git
synced 2026-06-20 04:16:16 -07:00
Update ctap-types
This patch updates the ctap-types dependency to pull in support for the largeBlobKey extension and the largeBlobs command.
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@ trussed = { version = "0.1", features = ["virt"] }
|
||||
features = ["dispatch"]
|
||||
|
||||
[patch.crates-io]
|
||||
ctap-types = { git = "https://github.com/nitrokey/ctap-types.git", tag = "v0.1.2-nitrokey.4" }
|
||||
ctap-types = { git = "https://github.com/trussed-dev/ctap-types.git", rev = "785bcc52720ce2e2054ae32034a2a24c500e1043" }
|
||||
ctaphid-dispatch = { git = "https://github.com/trussed-dev/ctaphid-dispatch.git", rev = "57cb3317878a8593847595319aa03ef17c29ec5b" }
|
||||
apdu-dispatch = { git = "https://github.com/trussed-dev/apdu-dispatch.git", rev = "915fc237103fcecc29d0f0b73391f19abf6576de" }
|
||||
trussed = { git = "https://github.com/trussed-dev/trussed.git", rev = "51e68500d7601d04f884f5e95567d14b9018a6cb" }
|
||||
|
||||
+7
-2
@@ -50,7 +50,7 @@ impl<UP: UserPresence, T: TrussedRequirements> Authenticator for crate::Authenti
|
||||
.push(String::from_str("FIDO_2_1_PRE").unwrap())
|
||||
.unwrap();
|
||||
|
||||
let mut extensions = Vec::<String<11>, 4>::new();
|
||||
let mut extensions = Vec::<String<13>, 4>::new();
|
||||
// extensions.push(String::from_str("credProtect").unwrap()).unwrap();
|
||||
extensions
|
||||
.push(String::from_str("credProtect").unwrap())
|
||||
@@ -444,6 +444,7 @@ impl<UP: UserPresence, T: TrussedRequirements> Authenticator for crate::Authenti
|
||||
Some(ctap2::make_credential::Extensions {
|
||||
cred_protect: parameters.extensions.as_ref().unwrap().cred_protect,
|
||||
hmac_secret: parameters.extensions.as_ref().unwrap().hmac_secret,
|
||||
large_blob_key: None,
|
||||
})
|
||||
} else {
|
||||
None
|
||||
@@ -551,6 +552,8 @@ impl<UP: UserPresence, T: TrussedRequirements> Authenticator for crate::Authenti
|
||||
fmt,
|
||||
auth_data: serialized_auth_data,
|
||||
att_stmt,
|
||||
ep_att: None,
|
||||
large_blob_key: None,
|
||||
};
|
||||
|
||||
Ok(attestation_object)
|
||||
@@ -1526,7 +1529,7 @@ impl<UP: UserPresence, T: TrussedRequirements> crate::Authenticator<UP, T> {
|
||||
rp_id_hash,
|
||||
|
||||
flags: {
|
||||
let mut flags = Flags::EMPTY;
|
||||
let mut flags = Flags::empty();
|
||||
if data.up_performed {
|
||||
flags |= Flags::USER_PRESENCE;
|
||||
}
|
||||
@@ -1581,6 +1584,8 @@ impl<UP: UserPresence, T: TrussedRequirements> crate::Authenticator<UP, T> {
|
||||
signature,
|
||||
user: None,
|
||||
number_of_credentials: num_credentials,
|
||||
user_selected: None,
|
||||
large_blob_key: None,
|
||||
};
|
||||
|
||||
// User with empty IDs are ignored for compatibility
|
||||
|
||||
@@ -211,6 +211,7 @@ fn request_operation(request: &ctap2::Request) -> ctap2::Operation {
|
||||
ctap2::Request::Reset => ctap2::Operation::Reset,
|
||||
ctap2::Request::CredentialManagement(_) => ctap2::Operation::CredentialManagement,
|
||||
ctap2::Request::Selection => ctap2::Operation::Selection,
|
||||
ctap2::Request::LargeBlobs(_) => ctap2::Operation::LargeBlobs,
|
||||
ctap2::Request::Vendor(operation) => ctap2::Operation::Vendor(*operation),
|
||||
}
|
||||
}
|
||||
@@ -226,6 +227,7 @@ fn response_operation(request: &ctap2::Response) -> Option<ctap2::Operation> {
|
||||
ctap2::Response::Reset => Some(ctap2::Operation::Reset),
|
||||
ctap2::Response::CredentialManagement(_) => Some(ctap2::Operation::CredentialManagement),
|
||||
ctap2::Response::Selection => Some(ctap2::Operation::Selection),
|
||||
ctap2::Response::LargeBlobs(_) => Some(ctap2::Operation::LargeBlobs),
|
||||
ctap2::Response::Vendor => None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user