java.security.cert.CRLSelector Java Examples

The following examples show how to use java.security.cert.CRLSelector. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PKIXCRLStoreSelector.java    From ripple-lib-java with ISC License 6 votes vote down vote up
public static Collection<? extends CRL> getCRLs(final PKIXCRLStoreSelector selector, CertStore certStore)
    throws CertStoreException
{
    return certStore.getCRLs(new CRLSelector()
    {
        public boolean match(CRL crl)
        {
            return selector.match(crl);
        }

        public Object clone()
        {
            return this;
        }
    });
}
 
Example #2
Source File: MultiCertStoreSpi.java    From ripple-lib-java with ISC License 6 votes vote down vote up
public Collection engineGetCRLs(CRLSelector crlSelector)
    throws CertStoreException
{
    boolean searchAllStores = params.getSearchAllStores();
    Iterator iter = params.getCertStores().iterator();
    List allCRLs = searchAllStores ? new ArrayList() : Collections.EMPTY_LIST;
    
    while (iter.hasNext())
    {
        CertStore store = (CertStore)iter.next();
        Collection crls = store.getCRLs(crlSelector);

        if (searchAllStores)
        {
            allCRLs.addAll(crls);
        }
        else if (!crls.isEmpty())
        {
            return crls;
        }
    }

    return allCRLs;
}
 
Example #3
Source File: PKIXCRLStoreSelector.java    From RipplePower with Apache License 2.0 6 votes vote down vote up
public static Collection<? extends CRL> getCRLs(final PKIXCRLStoreSelector selector, CertStore certStore)
    throws CertStoreException
{
    return certStore.getCRLs(new CRLSelector()
    {
        public boolean match(CRL crl)
        {
            return selector.match(crl);
        }

        public Object clone()
        {
            return this;
        }
    });
}
 
Example #4
Source File: MultiCertStoreSpi.java    From RipplePower with Apache License 2.0 6 votes vote down vote up
public Collection engineGetCRLs(CRLSelector crlSelector)
    throws CertStoreException
{
    boolean searchAllStores = params.getSearchAllStores();
    Iterator iter = params.getCertStores().iterator();
    List allCRLs = searchAllStores ? new ArrayList() : Collections.EMPTY_LIST;
    
    while (iter.hasNext())
    {
        CertStore store = (CertStore)iter.next();
        Collection crls = store.getCRLs(crlSelector);

        if (searchAllStores)
        {
            allCRLs.addAll(crls);
        }
        else if (!crls.isEmpty())
        {
            return crls;
        }
    }

    return allCRLs;
}
 
Example #5
Source File: CertStoreSpiTest.java    From j2objc with Apache License 2.0 6 votes vote down vote up
/**
 * Test for <code>CertStoreSpi</code> constructor Assertion: constructs
 * CertStoreSpi
 */
public void testCertStoreSpi01() throws InvalidAlgorithmParameterException,
        CertStoreException {
    CertStoreSpi certStoreSpi = null;
    CertSelector certSelector = new tmpCertSelector();//new
                                                      // X509CertSelector();
    CRLSelector crlSelector = new tmpCRLSelector();//new X509CRLSelector();
    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));
}
 
Example #6
Source File: URICertStore.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the specified X509CRL matches the criteria specified in the
 * CRLSelector.
 */
private static Collection<X509CRL> getMatchingCRLs
    (X509CRL crl, CRLSelector selector) {
    if (selector == null || (crl != null && selector.match(crl))) {
        return Collections.singletonList(crl);
    } else {
        return Collections.emptyList();
    }
}
 
Example #7
Source File: CertStore2Test.java    From j2objc with Apache License 2.0 5 votes vote down vote up
@Override
public Collection<? extends CRL> engineGetCRLs(CRLSelector selector)
        throws CertStoreException {
    if (selector != null) {
        if (!(selector instanceof MyCRLSelector)) {
            throw new CertStoreException();
        }
        return new ArrayList<CRL>();
    }
    return null;
}
 
Example #8
Source File: MyCertStoreSpi.java    From j2objc with Apache License 2.0 5 votes vote down vote up
public Collection<CRL> engineGetCRLs(CRLSelector selector)
        throws CertStoreException {
    if (selector == null) {
        throw new CertStoreException("Parameter is null");
    }
    return null;
}
 
Example #9
Source File: URICertStore.java    From j2objc with Apache License 2.0 5 votes vote down vote up
/**
 * Checks if the specified X509CRL matches the criteria specified in the
 * CRLSelector.
 */
private static Collection<X509CRL> getMatchingCRLs
    (X509CRL crl, CRLSelector selector) {
    if (selector == null || (crl != null && selector.match(crl))) {
        return Collections.singletonList(crl);
    } else {
        return Collections.emptyList();
    }
}
 
Example #10
Source File: URICertStore.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the specified X509CRL matches the criteria specified in the
 * CRLSelector.
 */
private static Collection<X509CRL> getMatchingCRLs
    (X509CRL crl, CRLSelector selector) {
    if (selector == null || (crl != null && selector.match(crl))) {
        return Collections.singletonList(crl);
    } else {
        return Collections.emptyList();
    }
}
 
Example #11
Source File: URICertStore.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the specified X509CRL matches the criteria specified in the
 * CRLSelector.
 */
private static Collection<X509CRL> getMatchingCRLs
    (X509CRL crl, CRLSelector selector) {
    if (selector == null || (crl != null && selector.match(crl))) {
        return Collections.singletonList(crl);
    } else {
        return Collections.emptyList();
    }
}
 
Example #12
Source File: URICertStore.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the specified X509CRL matches the criteria specified in the
 * CRLSelector.
 */
private static Collection<X509CRL> getMatchingCRLs
    (X509CRL crl, CRLSelector selector) {
    if (selector == null || (crl != null && selector.match(crl))) {
        return Collections.singletonList(crl);
    } else {
        return Collections.emptyList();
    }
}
 
Example #13
Source File: URICertStore.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the specified X509CRL matches the criteria specified in the
 * CRLSelector.
 */
private static Collection<X509CRL> getMatchingCRLs
    (X509CRL crl, CRLSelector selector) {
    if (selector == null || (crl != null && selector.match(crl))) {
        return Collections.singletonList(crl);
    } else {
        return Collections.emptyList();
    }
}
 
Example #14
Source File: URICertStore.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the specified X509CRL matches the criteria specified in the
 * CRLSelector.
 */
private static Collection<X509CRL> getMatchingCRLs
    (X509CRL crl, CRLSelector selector) {
    if (selector == null || (crl != null && selector.match(crl))) {
        return Collections.singletonList(crl);
    } else {
        return Collections.emptyList();
    }
}
 
Example #15
Source File: URICertStore.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the specified X509CRL matches the criteria specified in the
 * CRLSelector.
 */
private static Collection<X509CRL> getMatchingCRLs
    (X509CRL crl, CRLSelector selector) {
    if (selector == null || (crl != null && selector.match(crl))) {
        return Collections.singletonList(crl);
    } else {
        return Collections.emptyList();
    }
}
 
Example #16
Source File: URICertStore.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the specified X509CRL matches the criteria specified in the
 * CRLSelector.
 */
private static Collection<X509CRL> getMatchingCRLs
    (X509CRL crl, CRLSelector selector) {
    if (selector == null || (crl != null && selector.match(crl))) {
        return Collections.singletonList(crl);
    } else {
        return Collections.emptyList();
    }
}
 
Example #17
Source File: URICertStore.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the specified X509CRL matches the criteria specified in the
 * CRLSelector.
 */
private static Collection<X509CRL> getMatchingCRLs
    (X509CRL crl, CRLSelector selector) {
    if (selector == null || (crl != null && selector.match(crl))) {
        return Collections.singletonList(crl);
    } else {
        return Collections.emptyList();
    }
}
 
Example #18
Source File: URICertStore.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the specified X509CRL matches the criteria specified in the
 * CRLSelector.
 */
private static Collection<X509CRL> getMatchingCRLs
    (X509CRL crl, CRLSelector selector) {
    if (selector == null || (crl != null && selector.match(crl))) {
        return Collections.singletonList(crl);
    } else {
        return Collections.emptyList();
    }
}
 
Example #19
Source File: URICertStore.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the specified X509CRL matches the criteria specified in the
 * CRLSelector.
 */
private static Collection<X509CRL> getMatchingCRLs
    (X509CRL crl, CRLSelector selector) {
    if (selector == null || (crl != null && selector.match(crl))) {
        return Collections.singletonList(crl);
    } else {
        return Collections.emptyList();
    }
}
 
Example #20
Source File: URICertStore.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the specified X509CRL matches the criteria specified in the
 * CRLSelector.
 */
private static Collection<X509CRL> getMatchingCRLs
    (X509CRL crl, CRLSelector selector) {
    if (selector == null || (crl != null && selector.match(crl))) {
        return Collections.singletonList(crl);
    } else {
        return Collections.emptyList();
    }
}
 
Example #21
Source File: URICertStore.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Checks if the specified X509CRL matches the criteria specified in the
 * CRLSelector.
 */
private static Collection<X509CRL> getMatchingCRLs
    (X509CRL crl, CRLSelector selector) {
    if (selector == null || (crl != null && selector.match(crl))) {
        return Collections.singletonList(crl);
    } else {
        return Collections.emptyList();
    }
}
 
Example #22
Source File: URICertStore.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checks if the specified X509CRL matches the criteria specified in the
 * CRLSelector.
 */
private static Collection<X509CRL> getMatchingCRLs
    (X509CRL crl, CRLSelector selector) {
    if (selector == null || (crl != null && selector.match(crl))) {
        return Collections.singletonList(crl);
    } else {
        return Collections.emptyList();
    }
}
 
Example #23
Source File: SSLServerCertStore.java    From openjsse with GNU General Public License v2.0 4 votes vote down vote up
public Collection<X509CRL> engineGetCRLs(CRLSelector selector)
    throws CertStoreException
{
    throw new UnsupportedOperationException();
}
 
Example #24
Source File: SSLServerCertStore.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Collection<X509CRL> engineGetCRLs(CRLSelector selector)
    throws CertStoreException
{
    throw new UnsupportedOperationException();
}
 
Example #25
Source File: PKIXCRLStoreSelector.java    From ripple-lib-java with ISC License 4 votes vote down vote up
public Builder(CRLSelector certSelector)
{
    this.baseSelector = (CRLSelector)certSelector.clone();
}
 
Example #26
Source File: SSLServerCertStore.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
public Collection<X509CRL> engineGetCRLs(CRLSelector selector)
    throws CertStoreException
{
    throw new UnsupportedOperationException();
}
 
Example #27
Source File: PKIXCRLStoreSelector.java    From RipplePower with Apache License 2.0 4 votes vote down vote up
public Builder(CRLSelector certSelector)
{
    this.baseSelector = (CRLSelector)certSelector.clone();
}
 
Example #28
Source File: SSLServerCertStore.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public Collection<X509CRL> engineGetCRLs(CRLSelector selector)
    throws CertStoreException
{
    throw new UnsupportedOperationException();
}
 
Example #29
Source File: SSLServerCertStore.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public Collection<X509CRL> engineGetCRLs(CRLSelector selector)
    throws CertStoreException
{
    throw new UnsupportedOperationException();
}
 
Example #30
Source File: SSLServerCertStore.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Collection<X509CRL> engineGetCRLs(CRLSelector selector)
    throws CertStoreException
{
    throw new UnsupportedOperationException();
}