diff --git a/fido/src/main/java/com/yubico/yubikit/fido/webauthn/AuthenticatorAssertionResponse.java b/fido/src/main/java/com/yubico/yubikit/fido/webauthn/AuthenticatorAssertionResponse.java index 68f24bad..320a979f 100644 --- a/fido/src/main/java/com/yubico/yubikit/fido/webauthn/AuthenticatorAssertionResponse.java +++ b/fido/src/main/java/com/yubico/yubikit/fido/webauthn/AuthenticatorAssertionResponse.java @@ -81,7 +81,7 @@ public static AuthenticatorAssertionResponse fromMap( deserializeBytes(Objects.requireNonNull(map.get(CLIENT_DATA_JSON)), serializationType), deserializeBytes(Objects.requireNonNull(map.get(AUTHENTICATOR_DATA)), serializationType), deserializeBytes(Objects.requireNonNull(map.get(SIGNATURE)), serializationType), - deserializeBytes(Objects.requireNonNull(map.get(USER_HANDLE)), serializationType)); + deserializeBytes(map.get(USER_HANDLE), serializationType)); } @Override diff --git a/fido/src/main/java/com/yubico/yubikit/fido/webauthn/AuthenticatorData.java b/fido/src/main/java/com/yubico/yubikit/fido/webauthn/AuthenticatorData.java index ae792b9c..24853a2c 100644 --- a/fido/src/main/java/com/yubico/yubikit/fido/webauthn/AuthenticatorData.java +++ b/fido/src/main/java/com/yubico/yubikit/fido/webauthn/AuthenticatorData.java @@ -186,6 +186,11 @@ public boolean equals(Object o) { return false; } + if ((extensions != null && that.extensions == null) || + (extensions == null && that.extensions != null)) { + return false; + } + return Arrays.equals(rawData, that.rawData); } diff --git a/fido/src/main/java/com/yubico/yubikit/fido/webauthn/PublicKeyCredentialCreationOptions.java b/fido/src/main/java/com/yubico/yubikit/fido/webauthn/PublicKeyCredentialCreationOptions.java index 4652dcb4..e2c6d134 100644 --- a/fido/src/main/java/com/yubico/yubikit/fido/webauthn/PublicKeyCredentialCreationOptions.java +++ b/fido/src/main/java/com/yubico/yubikit/fido/webauthn/PublicKeyCredentialCreationOptions.java @@ -143,10 +143,6 @@ public Extensions getExtensions() { return map; } - public Map toMap() { - return toMap(SerializationType.DEFAULT); - } - @SuppressWarnings("unchecked") public static PublicKeyCredentialCreationOptions fromMap( Map map, diff --git a/fido/src/main/java/com/yubico/yubikit/fido/webauthn/PublicKeyCredentialRequestOptions.java b/fido/src/main/java/com/yubico/yubikit/fido/webauthn/PublicKeyCredentialRequestOptions.java index c04236f4..0096f5af 100644 --- a/fido/src/main/java/com/yubico/yubikit/fido/webauthn/PublicKeyCredentialRequestOptions.java +++ b/fido/src/main/java/com/yubico/yubikit/fido/webauthn/PublicKeyCredentialRequestOptions.java @@ -124,7 +124,7 @@ public static PublicKeyCredentialRequestOptions fromMap(Map map, Seri Number timeout = ((Number) map.get(TIMEOUT)); return new PublicKeyCredentialRequestOptions( - Objects.requireNonNull(deserializeBytes(map.get(CHALLENGE), serializationType)), + deserializeBytes(Objects.requireNonNull(map.get(CHALLENGE)), serializationType), timeout == null ? null : timeout.longValue(), (String) map.get(RP_ID), allowCredentials,