Skip to content

Commit

Permalink
added invalid OID override
Browse files Browse the repository at this point in the history
  • Loading branch information
dghgit committed Dec 30, 2024
1 parent 728acd7 commit 4de7061
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.util.Map;

import org.bouncycastle.util.Arrays;
import org.bouncycastle.util.Properties;

public class ASN1RelativeOID
extends ASN1Primitive
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4de7061

Please sign in to comment.