From 4de7061858b5e1dbee8a35c3fd0d672f3a2bbb03 Mon Sep 17 00:00:00 2001 From: David Hook Date: Tue, 31 Dec 2024 10:06:40 +1100 Subject: [PATCH] added invalid OID override --- .../main/jdk1.4/org/bouncycastle/asn1/ASN1RelativeOID.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/jdk1.4/org/bouncycastle/asn1/ASN1RelativeOID.java b/core/src/main/jdk1.4/org/bouncycastle/asn1/ASN1RelativeOID.java index c46900018b..eb8e42956f 100644 --- a/core/src/main/jdk1.4/org/bouncycastle/asn1/ASN1RelativeOID.java +++ b/core/src/main/jdk1.4/org/bouncycastle/asn1/ASN1RelativeOID.java @@ -7,6 +7,7 @@ import java.util.Map; import org.bouncycastle.util.Arrays; +import org.bouncycastle.util.Properties; public class ASN1RelativeOID extends ASN1Primitive @@ -229,6 +230,11 @@ static ASN1RelativeOID createPrimitive(byte[] contents, boolean clone) static boolean isValidContents(byte[] contents) { + if (Properties.isOverrideSet("org.bouncycastle.asn1.allow_wrong_oid_enc")) + { + return true; + } + if (contents.length < 1) { return false;