use of java.security.cert.CertPath in project robovm by robovm.
the class CertPathTest method testSerializationSelf.
/**
* serialization/deserialization compatibility.
*/
public void testSerializationSelf() throws Exception {
TestUtils.initCertPathSSCertChain();
CertPath certPath = TestUtils.buildCertPathSSCertChain();
SerializationTest.verifySelf(certPath);
}
use of java.security.cert.CertPath in project robovm by robovm.
the class CertPathTest method testEqualsObject01.
/**
* Test #1 for <code>equals(Object)</code> method<br>
* Assertion: object equals to itself
*/
public final void testEqualsObject01() {
CertPath cp1 = new MyCertPath(testEncoding);
assertTrue(cp1.equals(cp1));
}
use of java.security.cert.CertPath in project robovm by robovm.
the class CertPathTest method testEqualsObject03.
/**
* Test for <code>equals(Object)</code> method<br>
* Assertion: object not equals to <code>null</code>
*/
public final void testEqualsObject03() {
CertPath cp1 = new MyCertPath(testEncoding);
assertFalse(cp1.equals(null));
}
use of java.security.cert.CertPath in project robovm by robovm.
the class CertPathTest method testToString.
/**
* Test for <code>toString()</code> method<br>
* Assertion: returns string representation of
* <code>CertPath</code> object
*/
public final void testToString() {
CertPath cp1 = new MyCertPath(testEncoding);
assertNotNull(cp1.toString());
}
use of java.security.cert.CertPath in project robovm by robovm.
the class myCertPathBuilder method testBuild.
// Test passed on RI
@KnownFailure(value = "expired certificate bug 2322662")
public void testBuild() throws Exception {
TestUtils.initCertPathSSCertChain();
CertPathParameters params = TestUtils.getCertPathParameters();
CertPathBuilder builder = TestUtils.getCertPathBuilder();
try {
CertPathBuilderResult result = builder.build(params);
assertNotNull("builder result is null", result);
CertPath certPath = result.getCertPath();
assertNotNull("certpath of builder result is null", certPath);
} catch (InvalidAlgorithmParameterException e) {
fail("unexpected Exception: " + e);
}
}
Aggregations