Skip to content

Commit 7ede25a

Browse files
committed
Use decimal notation for some ASN.1 bytes to better align with comments
1 parent ee3ecf3 commit 7ede25a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ final class WebAuthnCodecs {
4747
private static final ByteArray EC_PUBLIC_KEY_OID =
4848
new ByteArray(
4949
new byte[] {
50-
0x2A, -122, 0x48, -50, 0x3D, 0x02, 0x01
50+
0x2A, -122, 0x48, -50, 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, 0x03, 0x01, 7}); // OID 1.2.840.10045.3.1.7
54+
new byte[] {0x2A, -122, 0x48, -50, 0x3D, 3, 1, 7}); // OID 1.2.840.10045.3.1.7
5555
private static final ByteArray P384_CURVE_OID =
5656
new ByteArray(new byte[] {0x2B, -127, 0x04, 0, 34}); // OID 1.3.132.0.34
5757
private static final ByteArray P512_CURVE_OID =
@@ -62,14 +62,14 @@ final class WebAuthnCodecs {
6262
new byte[] {
6363
// SEQUENCE (5 bytes)
6464
0x30,
65-
0x05,
65+
5,
6666
// OID (3 bytes)
6767
0x06,
68-
0x03,
68+
3,
6969
// OID 1.3.101.112
7070
0x2B,
71-
0x65,
72-
0x70
71+
101,
72+
112
7373
});
7474

7575
static ByteArray ecPublicKeyToRaw(ECPublicKey key) {

0 commit comments

Comments
 (0)