use of java.security.cert.X509CRLSelector in project robovm by robovm.
the class X509CRLSelectorTest method test_addIssuerName$B_4.
/**
* java.security.cert.X509CRLSelector#addIssuerName(byte[])
*/
public void test_addIssuerName$B_4() throws Exception {
//Regression for HARMONY-465
X509CRLSelector obj = new X509CRLSelector();
try {
obj.addIssuerName((byte[]) null);
fail("NullPointerException expected");
} catch (NullPointerException e) {
// expected
}
}
use of java.security.cert.X509CRLSelector in project robovm by robovm.
the class X509CRLSelectorTest method test_addIssuerName$B_3.
/**
* java.security.cert.X509CRLSelector#addIssuerName(byte[])
*/
public void test_addIssuerName$B_3() throws Exception {
//Regression for HARMONY-465
X509CRLSelector obj = new X509CRLSelector();
try {
obj.addIssuerName(new byte[] { (byte) 2, (byte) 3, (byte) 4 });
fail("IOException expected");
} catch (IOException e) {
// expected
}
}
use of java.security.cert.X509CRLSelector in project robovm by robovm.
the class X509CRLSelectorTest method test_addIssuerLjavax_security_auth_x500_X500Principal01.
/**
* java.security.cert.X509CRLSelector#addIssuer(javax.security.auth.x500.X500Principal)
*/
public void test_addIssuerLjavax_security_auth_x500_X500Principal01() throws Exception {
//Regression for HARMONY-465
X509CRLSelector obj = new X509CRLSelector();
try {
obj.addIssuer((X500Principal) null);
fail("NullPointerException expected");
} catch (NullPointerException e) {
// expected
}
}
use of java.security.cert.X509CRLSelector in project robovm by robovm.
the class X509CRLSelectorTest method test_addIssuerNameLjava_lang_String01.
/**
* java.security.cert.X509CRLSelector#addIssuerName(java.lang.String)
*/
public void test_addIssuerNameLjava_lang_String01() throws Exception {
//Regression for HARMONY-465
X509CRLSelector obj = new X509CRLSelector();
try {
obj.addIssuerName("234");
fail("IOException expected");
} catch (IOException e) {
// expected
}
// Regression for HARMONY-1076
try {
new X509CRLSelector().addIssuerName("w=y");
fail("IOException expected");
} catch (IOException e) {
// expected
}
}
use of java.security.cert.X509CRLSelector in project robovm by robovm.
the class X509CRLSelector2Test method testAddIssuerLjavax_security_auth_x500_X500Principal02.
/**
* addIssuer(X500Principal issuer) method testing. Tests if CRLs with
* specified issuers match the selector, and if not specified issuer does
* not match the selector.
*/
public void testAddIssuerLjavax_security_auth_x500_X500Principal02() {
X509CRLSelector selector = new X509CRLSelector();
X500Principal iss1 = new X500Principal("O=First Org.");
X500Principal iss2 = new X500Principal("O=Second Org.");
CRL crl1 = new TestCRL(iss1);
CRL crl2 = new TestCRL(iss2);
selector.addIssuer(iss1);
assertTrue("The CRL should match the selection criteria.", selector.match(crl1));
assertFalse("The CRL should not match the selection criteria.", selector.match(crl2));
selector.addIssuer(iss2);
assertTrue("The CRL should match the selection criteria.", selector.match(crl2));
}
Aggregations