Search in sources :

Example 16 with CertPath

use of java.security.cert.CertPath in project robovm by robovm.

the class CertPathTest method testGetEncodings.

/**
     * This test just calls <code>getEncodings()</code> method<br>
     */
public final void testGetEncodings() {
    CertPath cp1 = new MyCertPath(testEncoding);
    cp1.getEncodings();
}
Also used : MyCertPath(org.apache.harmony.security.tests.support.cert.MyCertPath) MyCertPath(org.apache.harmony.security.tests.support.cert.MyCertPath) CertPath(java.security.cert.CertPath) MyFailingCertPath(org.apache.harmony.security.tests.support.cert.MyFailingCertPath)

Example 17 with CertPath

use of java.security.cert.CertPath in project robovm by robovm.

the class CertPathTest method testHashCodeEqualsObject.

/**
     * Test for <code>hashCode()</code> method<br>
     * Assertion: hash code of equal objects should be the same
     */
public final void testHashCodeEqualsObject() {
    CertPath cp1 = new MyCertPath(testEncoding);
    CertPath cp2 = new MyCertPath(testEncoding);
    assertTrue((cp1.hashCode() == cp2.hashCode()) && cp1.equals(cp2));
}
Also used : MyCertPath(org.apache.harmony.security.tests.support.cert.MyCertPath) MyCertPath(org.apache.harmony.security.tests.support.cert.MyCertPath) CertPath(java.security.cert.CertPath) MyFailingCertPath(org.apache.harmony.security.tests.support.cert.MyFailingCertPath)

Example 18 with CertPath

use of java.security.cert.CertPath in project robovm by robovm.

the class CertPathTest method testSerializationCompatibility.

/**
     * serialization/deserialization compatibility with RI.
     */
public void testSerializationCompatibility() throws Exception {
    TestUtils.initCertPathSSCertChain();
    CertPath certPath = TestUtils.buildCertPathSSCertChain();
    SerializationTest.verifyGolden(this, certPath);
}
Also used : MyCertPath(org.apache.harmony.security.tests.support.cert.MyCertPath) CertPath(java.security.cert.CertPath) MyFailingCertPath(org.apache.harmony.security.tests.support.cert.MyFailingCertPath)

Example 19 with CertPath

use of java.security.cert.CertPath in project robovm by robovm.

the class CertPathTest method testEqualsObject02.

/**
     * Test for <code>equals(Object)</code> method<br>
     * Assertion: object equals to other <code>CertPath</code>
     * instance with the same state
     */
public final void testEqualsObject02() {
    CertPath cp1 = new MyCertPath(testEncoding);
    CertPath cp2 = new MyCertPath(testEncoding);
    assertTrue(cp1.equals(cp2) && cp2.equals(cp1));
}
Also used : MyCertPath(org.apache.harmony.security.tests.support.cert.MyCertPath) MyCertPath(org.apache.harmony.security.tests.support.cert.MyCertPath) CertPath(java.security.cert.CertPath) MyFailingCertPath(org.apache.harmony.security.tests.support.cert.MyFailingCertPath)

Example 20 with CertPath

use of java.security.cert.CertPath in project robovm by robovm.

the class CertPathTest method testGetEncoded.

/**
     * This test just calls <code>getEncoded()</code> method<br>
     *
     * @throws CertificateEncodingException
     */
public final void testGetEncoded() throws CertificateEncodingException {
    CertPath cp1 = new MyCertPath(testEncoding);
    cp1.getEncoded();
}
Also used : MyCertPath(org.apache.harmony.security.tests.support.cert.MyCertPath) MyCertPath(org.apache.harmony.security.tests.support.cert.MyCertPath) CertPath(java.security.cert.CertPath) MyFailingCertPath(org.apache.harmony.security.tests.support.cert.MyFailingCertPath)

Aggregations

CertPath (java.security.cert.CertPath)55 X509Certificate (java.security.cert.X509Certificate)17 MyCertPath (org.apache.harmony.security.tests.support.cert.MyCertPath)16 CertificateFactory (java.security.cert.CertificateFactory)15 MyFailingCertPath (org.apache.harmony.security.tests.support.cert.MyFailingCertPath)14 CertPathValidatorException (java.security.cert.CertPathValidatorException)13 ArrayList (java.util.ArrayList)10 InvalidAlgorithmParameterException (java.security.InvalidAlgorithmParameterException)9 CertPathValidator (java.security.cert.CertPathValidator)9 CertPathBuilderResult (java.security.cert.CertPathBuilderResult)8 TrustAnchor (java.security.cert.TrustAnchor)8 ByteArrayInputStream (java.io.ByteArrayInputStream)7 Certificate (java.security.cert.Certificate)7 PKIXCertPathValidatorResult (java.security.cert.PKIXCertPathValidatorResult)7 PKIXParameters (java.security.cert.PKIXParameters)7 HashSet (java.util.HashSet)7 CertPathBuilder (java.security.cert.CertPathBuilder)6 CertPathBuilderException (java.security.cert.CertPathBuilderException)6 CertificateException (java.security.cert.CertificateException)6 PKIXBuilderParameters (java.security.cert.PKIXBuilderParameters)6