use of java.security.cert.X509CRL in project robovm by robovm.
the class X509CRLTest method getTBSCertList.
private void getTBSCertList(CertificateFactory f) throws Exception {
X509CRL crlRsa = getCRL(f, CRL_RSA);
byte[] expected = getResourceAsBytes(CRL_RSA_TBS);
assertEquals(Arrays.toString(expected), Arrays.toString(crlRsa.getTBSCertList()));
}
use of java.security.cert.X509CRL in project robovm by robovm.
the class X509CRLTest method getCRL.
private final X509CRL getCRL(CertificateFactory f, String name) throws Exception {
final InputStream is = Support_Resources.getStream(name);
assertNotNull("File does not exist: " + name, is);
try {
X509CRL crl = (X509CRL) f.generateCRL(is);
assertNotNull(crl);
return crl;
} finally {
try {
is.close();
} catch (IOException ignored) {
}
}
}
use of java.security.cert.X509CRL in project robovm by robovm.
the class X509CRLTest method getEncoded.
private void getEncoded(CertificateFactory f) throws Exception {
X509CRL crlRsa = getCRL(f, CRL_RSA);
byte[] crlRsaBytes = getResourceAsBytes(CRL_RSA);
assertEquals(Arrays.toString(crlRsaBytes), Arrays.toString(crlRsa.getEncoded()));
}
use of java.security.cert.X509CRL in project robovm by robovm.
the class X509CRLTest method hasUnsupportedCriticalExtension.
private void hasUnsupportedCriticalExtension(CertificateFactory f) throws Exception {
X509CRL crlRsa = getCRL(f, CRL_RSA);
assertFalse(crlRsa.hasUnsupportedCriticalExtension());
X509CRL unsupportedCrl = getCRL(f, CRL_UNSUPPORTED);
assertTrue(unsupportedCrl.hasUnsupportedCriticalExtension());
}
use of java.security.cert.X509CRL in project robovm by robovm.
the class X509CRLTest method getSigAlgOID.
private void getSigAlgOID(CertificateFactory f) throws Exception {
X509CRL crlRsa = getCRL(f, CRL_RSA);
assertEquals("1.2.840.113549.1.1.5", crlRsa.getSigAlgOID());
}
Aggregations