Skip to content

Commit 52050d8

Browse files
committed
Rename inaccurately named test case
1 parent 4008991 commit 52050d8

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from .ctap_test import CTAPTestCase
88

99

10-
class CredManagementTestCase(CTAPTestCase):
10+
class AuthenticatorConfigTestCase(CTAPTestCase):
1111

1212
cp: ClientPin
1313

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,11 @@ private void makeCredential(APDU apdu, short lc, byte[] buffer) {
719719
Util.arrayCompare(buffer, readIdx,
720720
CannedCBOR.LARGE_BLOB_EXTENSION_ID, (short) 0, sLen) == 0) {
721721
readIdx += sLen;
722-
if (buffer[readIdx++] != (byte) 0xF5) { // largeBlobKey must be true if present
722+
if (buffer[readIdx] == (byte) 0xF4) {
723+
// largeBlobKey must be true if present
723724
sendErrorByte(apdu, FIDOConstants.CTAP1_ERR_INVALID_PARAMETER);
725+
} else if (buffer[readIdx] != (byte) 0xF5) {
726+
sendErrorByte(apdu, FIDOConstants.CTAP2_ERR_CBOR_UNEXPECTED_TYPE);
724727
}
725728
largeBlobKeyRequested = true;
726729
} else {
@@ -1883,8 +1886,10 @@ private void getAssertion(final APDU apdu, final short lc, final byte[] buffer,
18831886
byte valueByte = buffer[readIdx++];
18841887
if (valueByte == (byte) 0xF5) { // true
18851888
stateKeepingBuffer[(short)(stateKeepingIdx + 1)] |= 0x04;
1886-
} else {
1889+
} else if (valueByte == (byte) 0xF4) {
18871890
sendErrorByte(apdu, FIDOConstants.CTAP2_ERR_INVALID_OPTION);
1891+
} else {
1892+
sendErrorByte(apdu, FIDOConstants.CTAP2_ERR_CBOR_UNEXPECTED_TYPE);
18881893
}
18891894
continue;
18901895
}

0 commit comments

Comments
 (0)