Commit f702086e authored by Martin Kreichgauer's avatar Martin Kreichgauer Committed by Chromium LUCI CQ

fido/cros: wire up app_id fields for dbus requests

The CrOS side of this isn't yet implemented, but we can just set these
fields already anyway.

Bug: b/165724836
Change-Id: Iee100d6f160bb3a749c913e9df7b0cdd1c4ff524
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2568683Reviewed-by: default avatarAdam Langley <agl@chromium.org>
Commit-Queue: Martin Kreichgauer <martinkr@google.com>
Cr-Commit-Position: refs/heads/master@{#842619}
parent bd9078bd
...@@ -106,6 +106,9 @@ void ChromeOSAuthenticator::MakeCredential(CtapMakeCredentialRequest request, ...@@ -106,6 +106,9 @@ void ChromeOSAuthenticator::MakeCredential(CtapMakeCredentialRequest request,
const std::vector<uint8_t>& id = descriptor.id(); const std::vector<uint8_t>& id = descriptor.id();
req.add_excluded_credential_id(std::string(id.begin(), id.end())); req.add_excluded_credential_id(std::string(id.begin(), id.end()));
} }
if (request.app_id) {
req.set_app_id_exclude(*request.app_id);
}
dbus::MethodCall method_call(u2f::kU2FInterface, u2f::kU2FMakeCredential); dbus::MethodCall method_call(u2f::kU2FInterface, u2f::kU2FMakeCredential);
dbus::MessageWriter writer(&method_call); dbus::MessageWriter writer(&method_call);
...@@ -204,6 +207,9 @@ void ChromeOSAuthenticator::GetAssertion(CtapGetAssertionRequest request, ...@@ -204,6 +207,9 @@ void ChromeOSAuthenticator::GetAssertion(CtapGetAssertionRequest request,
? u2f::VERIFICATION_USER_PRESENCE ? u2f::VERIFICATION_USER_PRESENCE
: u2f::VERIFICATION_USER_VERIFICATION); : u2f::VERIFICATION_USER_VERIFICATION);
req.set_rp_id(request.rp_id); req.set_rp_id(request.rp_id);
if (request.app_id) {
req.set_app_id(*request.app_id);
}
req.set_client_data_hash(std::string(request.client_data_hash.begin(), req.set_client_data_hash(std::string(request.client_data_hash.begin(),
request.client_data_hash.end())); request.client_data_hash.end()));
DCHECK(generate_request_id_callback_); DCHECK(generate_request_id_callback_);
...@@ -297,6 +303,10 @@ bool ChromeOSAuthenticator::HasCredentialForGetAssertionRequest( ...@@ -297,6 +303,10 @@ bool ChromeOSAuthenticator::HasCredentialForGetAssertionRequest(
u2f::HasCredentialsRequest req; u2f::HasCredentialsRequest req;
req.set_rp_id(request.rp_id); req.set_rp_id(request.rp_id);
if (request.app_id) {
req.set_app_id(*request.app_id);
}
for (const PublicKeyCredentialDescriptor& descriptor : request.allow_list) { for (const PublicKeyCredentialDescriptor& descriptor : request.allow_list) {
const std::vector<uint8_t>& id = descriptor.id(); const std::vector<uint8_t>& id = descriptor.id();
req.add_credential_id(std::string(id.begin(), id.end())); req.add_credential_id(std::string(id.begin(), id.end()));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment