CertificateFactory factory = CertificateFactory.getInstance("X.509");
ByteArrayInputStream bais = new ByteArrayInputStream(
Base64.decode(pkcs7so.getBytes("UTF-8")));
try {
factory.generateCRL(bais);
fail("Expected exception was not thrown");
} catch (Exception e) { }
bais = new ByteArrayInputStream(Base64.decode(pkcs7so.getBytes("UTF-8")));
try {
factory.generateCertificate(bais);