/**
* engineGenerateCRL(InputStream inStream) method testing.
*/
public void testEngineGenerateCRL() throws Exception {
X509CertFactoryImpl certFactory = new X509CertFactoryImpl();
CRL crl;
// DER encoded crt generation testing
ByteArrayInputStream bais =
new ByteArrayInputStream(
CertFactoryTestData.getCRLEncoding());
crl = certFactory.engineGenerateCRL(bais);
assertNotNull("First generated CRL is null", crl);
crl = certFactory.engineGenerateCRL(bais);
assertNotNull("Second generated CRL is null", crl);
try {
certFactory.engineGenerateCRL(bais);
fail("Expected CRLException was not thrown.");
} catch (CRLException e) {
}
// Base64 testing
bais = new ByteArrayInputStream(CertFactoryTestData
.getBase64CRLEncoding());
crl = certFactory.engineGenerateCRL(bais);
assertNotNull("First generated CRL is null", crl);
crl = certFactory.engineGenerateCRL(bais);
assertNotNull("Second generated CRL is null", crl);
try {
certFactory.engineGenerateCRL(bais);
fail("Expected CRLException was not thrown.");
} catch (CRLException e) {
}
}