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a01gZhz5v6yAlGYuuUGK02XThIAC71AdXkbc98m6tTR8KvPG2F9fVJ3bTc0R5/0UAoNmXsimABKgX77OFP67H6dh96tK8QYUn8pJQsKpvO2FsauBQeYNxUJpU4c5nUwfAA4+Bw11V0SoU7Q2dmSZ3G7rPUZuFF1eR1ONeE3gJ7uOhXY="; try (InputStream crlIS = AbstractTestCRLUtils.class.getResourceAsStream("/infinite-loop.crl"); InputStream certIS = new ByteArrayInputStream(Base64.getDecoder().decode(certB64))) { byte[] base64 = toByteArray(crlIS); CertificateToken certificateToken = loadCert(certIS); CRLBinary crlBinary = CRLUtils.buildCRLBinary(Base64.getDecoder().decode(base64)); CRLValidity validity = CRLUtils.buildCRLValidity(crlBinary, certificateToken); assertNotNull(validity); assertNotNull(validity.getThisUpdate()); assertNotNull(validity.getNextUpdate()); assertEquals(SignatureAlgorithm.RSA_SHA256, validity.getSignatureAlgorithm()); assertFalse(validity.isValid()); assertNull(CRLUtils.getRevocationInfo(validity, BigInteger.ZERO)); assertNotNull(CRLUtils.getRevocationInfo(validity, new BigInteger("1938296"))); } }
public CRLBinary buildCRLBinary(byte[] binaries) throws IOException { return new CRLBinary(getDERContent(binaries)); }
AbstractCRLUtils { public CRLBinary buildCRLBinary(byte[] binaries) throws IOException { return new CRLBinary(getDERContent(binaries)); } }
AbstractCRLUtils { public CRLBinary buildCRLBinary(byte[] binaries) throws IOException { return new CRLBinary(getDERContent(binaries)); }  }
AbstractCRLUtils { public CRLBinary buildCRLBinary(byte[] binaries) throws IOException { return new CRLBinary(getDERContent(binaries)); }  CRLBinary buildCRLBinary(byte[] binaries); }
AbstractCRLUtils { public CRLBinary buildCRLBinary(byte[] binaries) throws IOException { return new CRLBinary(getDERContent(binaries)); }  CRLBinary buildCRLBinary(byte[] binaries);  }