Skip to content

Commit 3871640

Browse files
committed
Fix bug with incorrect first responses
We overwrote bufferMem when initializing the platform key, leading to corrupted responses.
1 parent 6fc9e3a commit 3871640

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/us/q3q/fido2/FIDO2Applet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3437,6 +3437,8 @@ public void process(APDU apdu) throws ISOException {
34373437
}
34383438
}
34393439

3440+
initKeyAgreementKeyIfNecessary();
3441+
34403442
if (attestationData != null && filledAttestationData < attestationData.length &&
34413443
transientStorage.getChainIncomingReadOffset() > 0
34423444
&& bufferMem[0] == FIDOConstants.CMD_INSTALL_CERTS
@@ -3542,8 +3544,6 @@ public void process(APDU apdu) throws ISOException {
35423544
throwException(ISO7816.SW_DATA_INVALID);
35433545
}
35443546

3545-
initKeyAgreementKeyIfNecessary();
3546-
35473547
short lcEffective = (short)(lc + 1);
35483548
byte cmdByte = apduBytes[apdu.getOffsetCdata()];
35493549

0 commit comments

Comments
 (0)