public static <PUB extends PublicKey, PRIV extends PrivateKey> X509CertificateRule create(String id, KeyPairRule<PUB,PRIV> subject, KeyPairRule<PUB, PRIV> signer, long startDateOffset, long endDateOffset, TimeUnit units) { return new X509CertificateRule("", subject, signer, startDateOffset, endDateOffset, units); }
public static <PUB extends PublicKey, PRIV extends PrivateKey> X509CertificateRule selfSigned(KeyPairRule<PUB,PRIV> subject) { return selfSigned("", subject); }
@Test public void checkServerTrusted1() throws Exception { instance.checkServerTrusted(new X509Certificate[]{cert.certificate()}, "RSA", new Socket()); }
public static <PUB extends PublicKey, PRIV extends PrivateKey> X509CertificateRule create(String id, KeyPairRule<PUB,PRIV> subject, KeyPairRule<PUB, PRIV> signer) { return new X509CertificateRule(id, subject, signer, -7, 7, TimeUnit.DAYS); }
@Test(expected = IllegalArgumentException.class) public void checkServerTrusted1_nonNullEmpty() throws Exception { instance.checkServerTrusted(new X509Certificate[]{cert.certificate()}, "", new Socket()); }
public static <PUB extends PublicKey, PRIV extends PrivateKey> X509CertificateRule selfSigned(String id, KeyPairRule<PUB,PRIV> subject) { return new X509CertificateRule(id, subject, subject, -7, 7, TimeUnit.DAYS); }
@Test(expected = CertificateException.class) public void checkServerUntrusted1() throws Exception { instance.checkServerTrusted(new X509Certificate[]{altCert.certificate()}, "RSA", new Socket()); }
@Test(expected = IllegalArgumentException.class) public void checkClientTrusted1_nonNullEmpty() throws Exception { instance.checkClientTrusted(new X509Certificate[]{cert.certificate()}, "", new Socket()); }
@Test(expected = IllegalArgumentException.class) public void checkServerTrusted1_nonNullEmpty() throws Exception { instance.checkServerTrusted(new X509Certificate[]{cert.certificate()}, "", new Socket()); }
@Test(expected = IllegalArgumentException.class) public void checkClientTrusted1_nonNullNull() throws Exception { instance.checkClientTrusted(new X509Certificate[]{cert.certificate()}, null, new Socket()); }
@Test(expected = IllegalArgumentException.class) public void checkClientTrusted1_nonNullEmpty() throws Exception { instance.checkClientTrusted(new X509Certificate[]{cert.certificate()}, "", new Socket()); }
@Test(expected = IllegalArgumentException.class) public void checkServerTrusted1_nonNullEmpty() throws Exception { instance.checkServerTrusted(new X509Certificate[]{cert.certificate()}, "", new Socket()); }
@Test(expected = CertificateException.class) public void checkClientUntrusted1() throws Exception { instance.checkClientTrusted(new X509Certificate[]{altCert.certificate()}, "RSA", new Socket()); }
@Test(expected = IllegalArgumentException.class) public void checkClientTrusted1_nonNullNull() throws Exception { instance.checkClientTrusted(new X509Certificate[]{cert.certificate()}, null, new Socket()); }
@Test(expected = IllegalArgumentException.class) public void checkServerTrusted1_nonNullNull() throws Exception { instance.checkServerTrusted(new X509Certificate[]{cert.certificate()}, null, new Socket()); }
@Test(expected = IllegalArgumentException.class) public void checkServerTrusted1_nonNullNull() throws Exception { instance.checkServerTrusted(new X509Certificate[]{cert.certificate()}, null, new Socket()); }
@Test public void checkClientTrusted1() throws Exception { instance.checkClientTrusted(new X509Certificate[]{cert.certificate()}, "RSA", new Socket()); }
@Test(expected = IllegalArgumentException.class) public void checkClientTrusted1_nonNullEmpty() throws Exception { instance.checkClientTrusted(new X509Certificate[]{cert.certificate()}, "", new Socket()); }
@Test public void checkClientTrusted1() throws Exception { instance.checkClientTrusted(new X509Certificate[]{cert.certificate()}, "RSA", new Socket()); }
@Test public void checkClientTrusted1() throws Exception { instance.checkClientTrusted(new X509Certificate[]{cert.certificate()}, "RSA", new Socket()); }