use of edu.uiuc.ncsa.security.core.exceptions.InvalidCertRequestException in project OA4MP by ncsa.
the class PKCS10_CSR_Test method testBadCSR.
@Test
public void testBadCSR() throws Exception {
try {
MyPKCS10CertRequest certReq = CertUtil.fromStringToCertReq(BAD_GLOBUS_CR);
System.out.println(certReq.getPublicKey());
assert false : "Was able to process a bad cert request.";
} catch (InvalidCertRequestException iox) {
assert true;
}
try {
MyPKCS10CertRequest certReq = CertUtil.fromStringToCertReq(GOOD_GLOBUS_CR);
assert certReq.getPublicKey() != null;
} catch (InvalidCertRequestException iox) {
iox.printStackTrace();
assert false : "Good cert request failed to parse correctly.";
}
}
Aggregations