Skip to content

Commit

Permalink
Fix compilation after BC upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
yurem committed Dec 18, 2020
1 parent ce7d05e commit a362610
Showing 1 changed file with 3 additions and 4 deletions.
Expand Up @@ -29,12 +29,11 @@
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.input.BoundedInputStream;
import org.bouncycastle.asn1.ASN1InputStream;
import org.bouncycastle.asn1.ASN1Integer;
import org.bouncycastle.asn1.ASN1OctetString;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1TaggedObject;
import org.bouncycastle.asn1.DERIA5String;
import org.bouncycastle.asn1.DERInteger;
import org.bouncycastle.asn1.DEROctetString;
import org.bouncycastle.asn1.x509.CRLDistPoint;
import org.bouncycastle.asn1.x509.DistributionPoint;
import org.bouncycastle.asn1.x509.DistributionPointName;
Expand Down Expand Up @@ -229,9 +228,9 @@ private BigInteger getCrlNumber(X509CRL crl) throws IOException {
return null;
}

DEROctetString octetString = (DEROctetString) (new ASN1InputStream(new ByteArrayInputStream(crlNumberExtensionValue)).readObject());
ASN1OctetString octetString = (ASN1OctetString) (new ASN1InputStream(new ByteArrayInputStream(crlNumberExtensionValue)).readObject());
byte[] octets = octetString.getOctets();
DERInteger integer = (DERInteger) new ASN1InputStream(octets).readObject();
ASN1Integer integer = (ASN1Integer) new ASN1InputStream(octets).readObject();
BigInteger crlNumber = integer.getPositiveValue();

return crlNumber;
Expand Down

0 comments on commit a362610

Please sign in to comment.