Add attestation formats in get_info

This commit is contained in:
Robin Krahl
2024-06-27 12:50:58 +02:00
parent 3edba7bdab
commit 8025fd9d52
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ name = "usbip"
required-features = ["dispatch"]
[dependencies]
ctap-types = { version = "0.2.0", features = ["large-blobs", "third-party-payment"] }
ctap-types = { version = "0.2.0", features = ["get-info-full", "large-blobs", "third-party-payment"] }
cosey = "0.3"
delog = "0.1.0"
heapless = "0.7"
+9
View File
@@ -85,6 +85,14 @@ impl<UP: UserPresence, T: TrussedRequirements> Authenticator for crate::Authenti
}
transports.push(Transport::Usb).unwrap();
let mut attestation_formats = Vec::new();
attestation_formats
.push(AttestationStatementFormat::Packed)
.unwrap();
attestation_formats
.push(AttestationStatementFormat::None)
.unwrap();
let (_, aaguid) = self.state.identity.attestation(&mut self.trussed);
let mut response = ctap2::get_info::Response::default();
@@ -98,6 +106,7 @@ impl<UP: UserPresence, T: TrussedRequirements> Authenticator for crate::Authenti
response.pin_protocols = Some(pin_protocols);
response.max_creds_in_list = Some(ctap_types::sizes::MAX_CREDENTIAL_COUNT_IN_LIST);
response.max_cred_id_length = Some(ctap_types::sizes::MAX_CREDENTIAL_ID_LENGTH);
response.attestation_formats = Some(attestation_formats);
response
}