PublicKey pk = cert.getPublicKey();
if (pk instanceof RSAPublicKey) {
RSAPublicKey rsapk = (RSAPublicKey) pk;
assertEquals(rsapk.getAlgorithm(), "RSA");
BigInteger modulus = rsapk.getModulus();
int len = modulus.bitLength();
assertEquals(1024, len);
} else {
assertTrue("Public key is not RSA", false);
}
assertTrue("CA is not valid for the specified duration.", CertTools.getNotAfter(cert).after(