2362N/A * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * A <code>CertStore</code> that retrieves <code>Certificates</code> and 0N/A * <code>CRL</code>s from a <code>Collection</code>. 0N/A * Before calling the {@link #engineGetCertificates engineGetCertificates} or 0N/A * {@link #engineGetCRLs engineGetCRLs} methods, the 0N/A * {@link #CollectionCertStore(CertStoreParameters) 0N/A * CollectionCertStore(CertStoreParameters)} constructor is called to 0N/A * create the <code>CertStore</code> and establish the 0N/A * <code>Collection</code> from which <code>Certificate</code>s and 0N/A * <code>CRL</code>s will be retrieved. If the specified 0N/A * <code>Collection</code> contains an object that is not a 0N/A * <code>Certificate</code> or <code>CRL</code>, that object will be 0N/A * <b>Concurrent Access</b> 0N/A * As described in the javadoc for <code>CertStoreSpi</code>, the 0N/A * <code>engineGetCertificates</code> and <code>engineGetCRLs</code> methods 0N/A * must be thread-safe. That is, multiple threads may concurrently 0N/A * invoke these methods on a single <code>CollectionCertStore</code> 0N/A * object (or more than one) with no ill effects. 0N/A * This is achieved by requiring that the <code>Collection</code> passed to 0N/A * the {@link #CollectionCertStore(CertStoreParameters) 0N/A * CollectionCertStore(CertStoreParameters)} constructor (via the 0N/A * <code>CollectionCertStoreParameters</code> object) must have fail-fast 0N/A * iterators. Simultaneous modifications to the <code>Collection</code> can thus be 0N/A * detected and certificate or CRL retrieval can be retried. The fact that 0N/A * <code>Certificate</code>s and <code>CRL</code>s must be thread-safe is also 0N/A * @see java.security.cert.CertStore 0N/A * @author Steve Hanna 0N/A * Creates a <code>CertStore</code> with the specified parameters. 0N/A * For this class, the parameters object must be an instance of 0N/A * <code>CollectionCertStoreParameters</code>. The <code>Collection</code> 0N/A * included in the <code>CollectionCertStoreParameters</code> object 0N/A * must be thread-safe. 0N/A * @param params the algorithm parameters 0N/A * @exception InvalidAlgorithmParameterException if params is not an 0N/A * instance of <code>CollectionCertStoreParameters</code> 0N/A "parameters must be CollectionCertStoreParameters");
0N/A * Returns a <code>Collection</code> of <code>Certificate</code>s that 0N/A * match the specified selector. If no <code>Certificate</code>s 0N/A * match the selector, an empty <code>Collection</code> will be returned. 0N/A * @param selector a <code>CertSelector</code> used to select which 0N/A * <code>Certificate</code>s should be returned. Specify <code>null</code> 0N/A * to return all <code>Certificate</code>s. 0N/A * @return a <code>Collection</code> of <code>Certificate</code>s that 0N/A * match the specified selector 0N/A * @throws CertStoreException if an exception occurs 0N/A // Tolerate a few ConcurrentModificationExceptions 0N/A for (
int c =
0; c <
10; c++) {
0N/A +
"ConcurrentModificationExceptions");
0N/A * Returns a <code>Collection</code> of <code>CRL</code>s that 0N/A * match the specified selector. If no <code>CRL</code>s 0N/A * match the selector, an empty <code>Collection</code> will be returned. 0N/A * @param selector a <code>CRLSelector</code> used to select which 0N/A * <code>CRL</code>s should be returned. Specify <code>null</code> 0N/A * to return all <code>CRL</code>s. 0N/A * @return a <code>Collection</code> of <code>CRL</code>s that 0N/A * match the specified selector 0N/A * @throws CertStoreException if an exception occurs 0N/A // Tolerate a few ConcurrentModificationExceptions 0N/A for (
int c =
0; c <
10; c++) {
0N/A +
"ConcurrentModificationExceptions");