Skip to content

Commit 82b0695

Browse files
committed
made class more forgiving on ASN.1 encodings
1 parent 002a3ec commit 82b0695

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

core/src/main/java/org/bouncycastle/asn1/x509/Extensions.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,8 @@ else if (obj != null)
7171
private Extensions(
7272
ASN1Sequence seq)
7373
{
74-
if (seq.size() == 0)
75-
{
76-
throw new IllegalArgumentException("empty extension sequence found");
77-
}
74+
// it's tempting to check there's at least one entry in the sequence. Don't!
75+
// It turns out there's quite a few empty extension blocks out there...
7876

7977
Enumeration e = seq.getObjects();
8078

0 commit comments

Comments
 (0)