Skip to content

Commit 54fd227

Browse files
committed
Don't init platform key for U2F
This key isn't used for anything in CTAP1, so wait until we receive a CTAP2 operation to initialize it.
1 parent c1649d9 commit 54fd227

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
@@ -3444,8 +3444,6 @@ public void process(APDU apdu) throws ISOException {
34443444
}
34453445
}
34463446

3447-
initKeyAgreementKeyIfNecessary();
3448-
34493447
if (attestationData != null && filledAttestationData < attestationData.length &&
34503448
transientStorage.getChainIncomingReadOffset() > 0 &&
34513449
bufferMem[0] == FIDOConstants.CMD_INSTALL_CERTS
@@ -3530,6 +3528,8 @@ public void process(APDU apdu) throws ISOException {
35303528
return;
35313529
}
35323530

3531+
initKeyAgreementKeyIfNecessary();
3532+
35333533
if (apduBytes[ISO7816.OFFSET_CLA] != (byte) 0x80) {
35343534
throwException(ISO7816.SW_CLA_NOT_SUPPORTED);
35353535
}

0 commit comments

Comments
 (0)