Skip to content

Commit a5e2a6b

Browse files
committed
Repair info with certs / different buffer sizes
1 parent 5bbb742 commit a5e2a6b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5513,7 +5513,7 @@ private void sendAuthInfo(APDU apdu) {
55135513

55145514
short offset = 0;
55155515

5516-
byte numOptions = (byte) 0xB0;
5516+
short numOptions = 0x00B0;
55175517
boolean includeMaxMsgSize = bufferMem.length != 1024;
55185518
boolean includeCertifications = CERTIFICATION_LEVEL > 0;
55195519
if (includeMaxMsgSize) {
@@ -5524,7 +5524,7 @@ private void sendAuthInfo(APDU apdu) {
55245524
}
55255525

55265526
buffer[offset++] = FIDOConstants.CTAP2_OK;
5527-
buffer[offset++] = numOptions; // Map - some number of options
5527+
buffer[offset++] = (byte) numOptions; // Map - some number of options
55285528
buffer[offset++] = 0x01; // map key: versions
55295529

55305530
if (alwaysUv || attestationData == null || filledAttestationData < attestationData.length) {
@@ -5581,8 +5581,7 @@ private void sendAuthInfo(APDU apdu) {
55815581
if (includeMaxMsgSize) {
55825582
buffer[offset++] = 0x05; // map key: maxMsgSize
55835583
buffer[offset++] = 0x19; // two-byte integer
5584-
Util.setShort(buffer, offset, (short) bufferMem.length);
5585-
offset += 2;
5584+
offset = Util.setShort(buffer, offset, (short) bufferMem.length);
55865585
}
55875586

55885587
buffer[offset++] = 0x06; // map key: pinProtocols

0 commit comments

Comments
 (0)