Search in sources :

Example 1 with CRLSelector

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

the class CertStoreSpiTest method testCertStoreSpi01.

/**
     * Test for <code>CertStoreSpi</code> constructor Assertion: constructs
     * CertStoreSpi
     */
public void testCertStoreSpi01() throws InvalidAlgorithmParameterException, CertStoreException {
    CertStoreSpi certStoreSpi = null;
    //new
    CertSelector certSelector = new tmpCertSelector();
    // X509CertSelector();
    //new X509CRLSelector();
    CRLSelector crlSelector = new tmpCRLSelector();
    try {
        certStoreSpi = new MyCertStoreSpi(null);
        fail("InvalidAlgorithmParameterException must be thrown");
    } catch (InvalidAlgorithmParameterException e) {
    }
    certStoreSpi = new MyCertStoreSpi(new MyCertStoreParameters());
    assertNull("Not null collection", certStoreSpi.engineGetCertificates(certSelector));
    assertNull("Not null collection", certStoreSpi.engineGetCRLs(crlSelector));
}
Also used : InvalidAlgorithmParameterException(java.security.InvalidAlgorithmParameterException) MyCertStoreSpi(org.apache.harmony.security.tests.support.cert.MyCertStoreSpi) CertStoreSpi(java.security.cert.CertStoreSpi) CertSelector(java.security.cert.CertSelector) MyCertStoreSpi(org.apache.harmony.security.tests.support.cert.MyCertStoreSpi) CRLSelector(java.security.cert.CRLSelector) MyCertStoreParameters(org.apache.harmony.security.tests.support.cert.MyCertStoreParameters)

Aggregations

InvalidAlgorithmParameterException (java.security.InvalidAlgorithmParameterException)1 CRLSelector (java.security.cert.CRLSelector)1 CertSelector (java.security.cert.CertSelector)1 CertStoreSpi (java.security.cert.CertStoreSpi)1 MyCertStoreParameters (org.apache.harmony.security.tests.support.cert.MyCertStoreParameters)1 MyCertStoreSpi (org.apache.harmony.security.tests.support.cert.MyCertStoreSpi)1