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BdQzSIET2tHV0mp try (InputStream crlIS = AbstractTestCRLUtils.class.getResourceAsStream("/hgcaclass2.crl"); InputStream certIS = new ByteArrayInputStream(Base64.getDecoder().decode(certB64))) { CertificateToken certificateToken = loadCert(certIS); CRLBinary crlBinary = CRLUtils.buildCRLBinary(toByteArray(crlIS)); CRLValidity validCRL = CRLUtils.buildCRLValidity(crlBinary, certificateToken); assertNotNull(validCRL); assertTrue(validCRL.isSignatureIntact()); assertFalse(validCRL.isValid()); assertFalse(validCRL.isCrlSignKeyUsage()); assertFalse(certificateToken.checkKeyUsage(KeyUsageBit.CRL_SIGN)); assertEquals(SignatureAlgorithm.RSA_SHA256, validCRL.getSignatureAlgorithm()); } }
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);  }