Skip to content

Commit 7667c0e

Browse files
committed
Use hexadecimal notation instead of negative decimal
1 parent 7ede25a commit 7667c0e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,17 @@ final class WebAuthnCodecs {
4747
private static final ByteArray EC_PUBLIC_KEY_OID =
4848
new ByteArray(
4949
new byte[] {
50-
0x2A, -122, 0x48, -50, 0x3D, 2, 1
50+
0x2A, (byte) 0x86, 0x48, (byte) 0xCE, 0x3D, 2, 1
5151
}); // OID 1.2.840.10045.2.1 ecPublicKey (ANSI X9.62 public key type)
5252
private static final ByteArray P256_CURVE_OID =
5353
new ByteArray(
54-
new byte[] {0x2A, -122, 0x48, -50, 0x3D, 3, 1, 7}); // OID 1.2.840.10045.3.1.7
54+
new byte[] {
55+
0x2A, (byte) 0x86, 0x48, (byte) 0xCE, 0x3D, 3, 1, 7 // OID 1.2.840.10045.3.1.7
56+
});
5557
private static final ByteArray P384_CURVE_OID =
56-
new ByteArray(new byte[] {0x2B, -127, 0x04, 0, 34}); // OID 1.3.132.0.34
58+
new ByteArray(new byte[] {0x2B, (byte) 0x81, 0x04, 0, 34}); // OID 1.3.132.0.34
5759
private static final ByteArray P512_CURVE_OID =
58-
new ByteArray(new byte[] {0x2B, -127, 0x04, 0, 35}); // OID 1.3.132.0.35
60+
new ByteArray(new byte[] {0x2B, (byte) 0x81, 0x04, 0, 35}); // OID 1.3.132.0.35
5961

6062
private static final ByteArray ED25519_ALG_ID =
6163
new ByteArray(

0 commit comments

Comments
 (0)