Search in sources :

Example 16 with CertStoreException

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

the class CertStoreExceptionTest method testCertStoreException06.

/**
     * Test for <code>CertStoreException(String, Throwable)</code> constructor
     * Assertion: constructs CertStoreException when <code>cause</code> is
     * null <code>msg</code> is null
     */
public void testCertStoreException06() {
    CertStoreException tE = new CertStoreException(null, null);
    assertNull("getMessage() must return null", tE.getMessage());
    assertNull("getCause() must return null", tE.getCause());
}
Also used : CertStoreException(java.security.cert.CertStoreException)

Example 17 with CertStoreException

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

the class CertStoreExceptionTest method testCertStoreException05.

/**
     * Test for <code>CertStoreException(Throwable)</code> constructor
     * Assertion: constructs CertStoreException when <code>cause</code> is not
     * null
     */
public void testCertStoreException05() {
    CertStoreException tE = new CertStoreException(tCause);
    if (tE.getMessage() != null) {
        String toS = tCause.toString();
        String getM = tE.getMessage();
        assertTrue("getMessage() should contain ".concat(toS), (getM.indexOf(toS) != -1));
    }
    assertNotNull("getCause() must not return null", tE.getCause());
    assertEquals("getCause() must return ".concat(tCause.toString()), tE.getCause(), tCause);
}
Also used : CertStoreException(java.security.cert.CertStoreException)

Example 18 with CertStoreException

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

the class CertStoreExceptionTest method testCertStoreException01.

/**
     * Test for <code>CertStoreException()</code> constructor Assertion:
     * constructs CertStoreException with no detail message
     */
public void testCertStoreException01() {
    CertStoreException tE = new CertStoreException();
    assertNull("getMessage() must return null.", tE.getMessage());
    assertNull("getCause() must return null", tE.getCause());
}
Also used : CertStoreException(java.security.cert.CertStoreException)

Example 19 with CertStoreException

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

the class CertStoreExceptionTest method testCertStoreException08.

/**
     * Test for <code>CertStoreException(String, Throwable)</code> constructor
     * Assertion: constructs CertStoreException when <code>cause</code> is not
     * null <code>msg</code> is null
     */
public void testCertStoreException08() {
    CertStoreException tE = new CertStoreException(null, tCause);
    if (tE.getMessage() != null) {
        String toS = tCause.toString();
        String getM = tE.getMessage();
        assertTrue("getMessage() must should ".concat(toS), (getM.indexOf(toS) != -1));
    }
    assertNotNull("getCause() must not return null", tE.getCause());
    assertEquals("getCause() must return ".concat(tCause.toString()), tE.getCause(), tCause);
}
Also used : CertStoreException(java.security.cert.CertStoreException)

Example 20 with CertStoreException

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

the class CertStoreExceptionTest method testCertStoreException02.

/**
     * Test for <code>CertStoreException(String)</code> constructor Assertion:
     * constructs CertStoreException with detail message msg. Parameter
     * <code>msg</code> is not null.
     */
public void testCertStoreException02() {
    CertStoreException tE;
    for (int i = 0; i < msgs.length; i++) {
        tE = new CertStoreException(msgs[i]);
        assertEquals("getMessage() must return: ".concat(msgs[i]), tE.getMessage(), msgs[i]);
        assertNull("getCause() must return null", tE.getCause());
    }
}
Also used : CertStoreException(java.security.cert.CertStoreException)

Aggregations

CertStoreException (java.security.cert.CertStoreException)23 CertStore (java.security.cert.CertStore)10 X509Certificate (java.security.cert.X509Certificate)5 IOException (java.io.IOException)4 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)4 HashSet (java.util.HashSet)4 Iterator (java.util.Iterator)4 Set (java.util.Set)4 StoreException (org.bouncycastle.util.StoreException)4 X509Store (org.bouncycastle.x509.X509Store)4 InputStream (java.io.InputStream)3 URLConnection (java.net.URLConnection)3 InvalidAlgorithmParameterException (java.security.InvalidAlgorithmParameterException)3 CertificateException (java.security.cert.CertificateException)3 HttpURLConnection (java.net.HttpURLConnection)2 KeyStoreException (java.security.KeyStoreException)2 UnrecoverableKeyException (java.security.UnrecoverableKeyException)2 Collection (java.util.Collection)2 URI (java.net.URI)1 CodeSigner (java.security.CodeSigner)1