Use BigIntegers.intValueExact() for compatibility
import org.bouncycastle.asn1.x509.Extensions;
import org.bouncycastle.jcajce.PKIXCertRevocationCheckerParameters;
import org.bouncycastle.jcajce.util.JcaJceHelper;
+import org.bouncycastle.util.BigIntegers;
import org.bouncycastle.util.io.Streams;
class OcspCache
@@ -173,7 +174,7 @@ static OCSPResponse getOcspResponse(
}
OCSPResponse response = OCSPResponse.getInstance(Streams.readAllLimited(reqIn, contentLength));
- if (OCSPResponseStatus.SUCCESSFUL == response.getResponseStatus().getValue().intValueExact())
+ if (OCSPResponseStatus.SUCCESSFUL == BigIntegers.intValueExact(response.getResponseStatus().getValue()))
{
boolean validated = false;
ResponseBytes respBytes = ResponseBytes.getInstance(response.getResponseBytes());
