Skip to content

Commit 53e1950

Browse files
committed
Remove unnecessary .getHex() calls in human-readable messages
1 parent 6008784 commit 53e1950

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

webauthn-server-core/src/main/java/com/yubico/webauthn/FidoU2fAttestationStatementVerifier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private static ByteArray getRawUserPublicKey(AttestationObject attestationObject
8787
try {
8888
pubkey = WebAuthnCodecs.importCosePublicKey(pubkeyCose);
8989
} catch (InvalidKeySpecException | NoSuchAlgorithmException e) {
90-
throw ExceptionUtil.wrapAndLog(log, "Failed to decode public key: " + pubkeyCose.getHex(), e);
90+
throw ExceptionUtil.wrapAndLog(log, "Failed to decode public key: " + pubkeyCose, e);
9191
}
9292

9393
final ECPublicKey ecPubkey;

webauthn-server-core/src/main/java/com/yubico/webauthn/data/AuthenticatorData.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ private static VariableLengthParseResult parseAttestedCredentialData(
155155
"Attested credential data must contain at least %d bytes, was %d: %s",
156156
CREDENTIAL_ID_LENGTH_END,
157157
bytes.length,
158-
new ByteArray(bytes).getHex());
158+
new ByteArray(bytes));
159159

160160
byte[] credentialIdLengthBytes =
161161
Arrays.copyOfRange(bytes, CREDENTIAL_ID_LENGTH_INDEX, CREDENTIAL_ID_LENGTH_END);
@@ -179,7 +179,7 @@ private static VariableLengthParseResult parseAttestedCredentialData(
179179
"Expected credential ID of length %d, but attested credential data and extension data is only %d bytes: %s",
180180
CREDENTIAL_ID_END,
181181
bytes.length,
182-
new ByteArray(bytes).getHex());
182+
new ByteArray(bytes));
183183

184184
ByteArrayInputStream indefiniteLengthBytes =
185185
new ByteArrayInputStream(

webauthn-server-demo/src/main/java/com/yubico/webauthn/attestation/matcher/ExtensionMatcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public boolean matches(X509Certificate attestationCertificate, JsonNode paramete
7070
} catch (IOException e) {
7171
log.error(
7272
"Failed to parse extension value as ASN1: {}",
73-
new ByteArray(extensionValue).getHex(),
73+
new ByteArray(extensionValue),
7474
e);
7575
}
7676
}

0 commit comments

Comments
 (0)