Skip to content

Commit 08e172b

Browse files
committed
added use of depth property to deal with dodgy ASN.1
1 parent 00eb352 commit 08e172b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pkix/src/test/java/org/bouncycastle/openssl/test/ParserTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,10 +639,14 @@ private void doParseAttrECKeyTest()
639639
throws Exception
640640
{
641641
// EC private key extremely dodgy attributes.
642+
System.setProperty("org.bouncycastle.asn1.max_cons_depth", "45");
643+
642644
PEMParser pemRd = openPEMResource("ec_attr_key.pem");
643645

644646
PEMKeyPair kp = (PEMKeyPair)pemRd.readObject();
645647

648+
System.clearProperty("org.bouncycastle.asn1.max_cons_depth");
649+
646650
isTrue(kp.getPublicKeyInfo() == null);
647651
}
648652

0 commit comments

Comments
 (0)