From f3c7e50e55fa74e2661aa5738a5b3fe6b8b871d0 Mon Sep 17 00:00:00 2001 From: Ackermann Yuriy Date: Tue, 5 Dec 2023 00:00:41 +1300 Subject: [PATCH] Added fix for #68 --- core/device/to1/req-to1-32-ProveToRV.go | 1 + core/device/to2/req-to2-64-ProveDevice.go | 1 + core/shared/other.go | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/core/device/to1/req-to1-32-ProveToRV.go b/core/device/to1/req-to1-32-ProveToRV.go index 3ff15a7..8fbc821 100644 --- a/core/device/to1/req-to1-32-ProveToRV.go +++ b/core/device/to1/req-to1-32-ProveToRV.go @@ -12,6 +12,7 @@ func (h *To1Requestor) ProveToRV32(helloRVAck31 fdoshared.HelloRVAck31, fdoTestI var proveToRV32Payload fdoshared.EATPayloadBase = fdoshared.EATPayloadBase{ EatNonce: helloRVAck31.NonceTO1Proof, + EatUEID: fdoshared.GenerateEatGuid(h.credential.DCGuid), } if fdoTestID == testcom.FIDO_DEVT_32_BAD_TO1PROOF_NONCE { diff --git a/core/device/to2/req-to2-64-ProveDevice.go b/core/device/to2/req-to2-64-ProveDevice.go index 7606c06..1ca2211 100644 --- a/core/device/to2/req-to2-64-ProveDevice.go +++ b/core/device/to2/req-to2-64-ProveDevice.go @@ -39,6 +39,7 @@ func (h *To2Requestor) ProveDevice64(fdoTestID testcom.FDOTestID) (*fdoshared.TO eatPayload := fdoshared.EATPayloadBase{ EatNonce: h.NonceTO2ProveDv61, EatFDO: to2ProveDevicePayload, + EatUEID: fdoshared.GenerateEatGuid(h.Credential.DCGuid), } if fdoTestID == testcom.FIDO_DOT_64_BAD_NONCE_PROVEDV61 { diff --git a/core/shared/other.go b/core/shared/other.go index 66edaed..a6b065f 100644 --- a/core/shared/other.go +++ b/core/shared/other.go @@ -388,3 +388,10 @@ func UrlsToRendezvousInstrList(urls []string) ([]RendezvousInstrList, error) { return rvInfoList, nil } + +func GenerateEatGuid(fdoGuid FdoGuid) [17]byte { + var result [17]byte + copy(result[:], append([]byte{0x01}, fdoGuid[:]...)) + + return result +}