From 3cb9f87c544edbfb3186f001c25a7de7f68523fe Mon Sep 17 00:00:00 2001 From: Jill Kleiber Date: Mon, 4 Mar 2024 11:46:15 +0100 Subject: [PATCH] pr-1567: Fix bug in createCompressed() --- .../oer/its/ieee1609dot2/basetypes/EccP256CurvePoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/src/main/java/org/bouncycastle/oer/its/ieee1609dot2/basetypes/EccP256CurvePoint.java b/util/src/main/java/org/bouncycastle/oer/its/ieee1609dot2/basetypes/EccP256CurvePoint.java index 9dcdc6dd31..fa6e4205e4 100644 --- a/util/src/main/java/org/bouncycastle/oer/its/ieee1609dot2/basetypes/EccP256CurvePoint.java +++ b/util/src/main/java/org/bouncycastle/oer/its/ieee1609dot2/basetypes/EccP256CurvePoint.java @@ -165,7 +165,7 @@ else if (encoded[0] == 0x03) choice = compressedY1; } byte[] copy = new byte[encoded.length - 1]; - System.arraycopy(encoded, 0, copy, 0, copy.length); + System.arraycopy(encoded, 1, copy, 0, copy.length); return new EccP256CurvePoint(choice, new DEROctetString(copy)); }