Skip to content

Commit

Permalink
winhello: support entattest
Browse files Browse the repository at this point in the history
  • Loading branch information
LDVG committed Aug 21, 2024
1 parent a8e9dda commit 71966bc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/winhello.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022 Yubico AB. All rights reserved.
* Copyright (c) 2021-2024 Yubico AB. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
* SPDX-License-Identifier: BSD-2-Clause
Expand Down Expand Up @@ -735,6 +735,10 @@ translate_fido_cred(struct winhello_cred *ctx, const fido_cred_t *cred,
if (cred->rk == FIDO_OPT_TRUE) {
opt->bRequireResidentKey = true;
}
if (cred->ea.mode != 0) {
opt->dwVersion = WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_VERSION_4;
opt->dwEnterpriseAttestation = (DWORD)cred->ea.mode;
}

return FIDO_OK;
}
Expand All @@ -760,6 +764,8 @@ translate_winhello_cred(fido_cred_t *cred,
fido_log_debug("%s: cbor_decode_attobj", __func__);
goto fail;
}
if (att->dwVersion >= WEBAUTHN_CREDENTIAL_ATTESTATION_VERSION_4)
cred->ea.att = att->bEpAtt;

r = FIDO_OK;
fail:
Expand Down

0 comments on commit 71966bc

Please sign in to comment.