author | ascarpino |
Mon, 19 Oct 2015 17:35:18 -0700 | |
changeset 33241 | 27eb2d6abda9 |
parent 25859 | 3317bb8137f4 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
2 |
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package java.security.cert; |
|
27 |
||
28 |
import java.security.InvalidAlgorithmParameterException; |
|
29 |
import java.util.Collection; |
|
30 |
||
31 |
/** |
|
32 |
* The <i>Service Provider Interface</i> (<b>SPI</b>) |
|
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
33 |
* for the {@link CertStore CertStore} class. All {@code CertStore} |
2 | 34 |
* implementations must include a class (the SPI class) that extends |
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
35 |
* this class ({@code CertStoreSpi}), provides a constructor with |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
36 |
* a single argument of type {@code CertStoreParameters}, and implements |
2 | 37 |
* all of its methods. In general, instances of this class should only be |
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
38 |
* accessed through the {@code CertStore} class. |
2 | 39 |
* For details, see the Java Cryptography Architecture. |
40 |
* <p> |
|
41 |
* <b>Concurrent Access</b> |
|
42 |
* <p> |
|
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
43 |
* The public methods of all {@code CertStoreSpi} objects must be |
2 | 44 |
* thread-safe. That is, multiple threads may concurrently invoke these |
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
45 |
* methods on a single {@code CertStoreSpi} object (or more than one) |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
46 |
* with no ill effects. This allows a {@code CertPathBuilder} to search |
2 | 47 |
* for a CRL while simultaneously searching for further certificates, for |
48 |
* instance. |
|
49 |
* <p> |
|
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
50 |
* Simple {@code CertStoreSpi} implementations will probably ensure |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
51 |
* thread safety by adding a {@code synchronized} keyword to their |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
52 |
* {@code engineGetCertificates} and {@code engineGetCRLs} methods. |
2 | 53 |
* More sophisticated ones may allow truly concurrent access. |
54 |
* |
|
55 |
* @since 1.4 |
|
56 |
* @author Steve Hanna |
|
57 |
*/ |
|
58 |
public abstract class CertStoreSpi { |
|
59 |
||
60 |
/** |
|
61 |
* The sole constructor. |
|
62 |
* |
|
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
63 |
* @param params the initialization parameters (may be {@code null}) |
2 | 64 |
* @throws InvalidAlgorithmParameterException if the initialization |
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
65 |
* parameters are inappropriate for this {@code CertStoreSpi} |
2 | 66 |
*/ |
67 |
public CertStoreSpi(CertStoreParameters params) |
|
68 |
throws InvalidAlgorithmParameterException { } |
|
69 |
||
70 |
/** |
|
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
71 |
* Returns a {@code Collection} of {@code Certificate}s that |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
72 |
* match the specified selector. If no {@code Certificate}s |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
73 |
* match the selector, an empty {@code Collection} will be returned. |
2 | 74 |
* <p> |
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
75 |
* For some {@code CertStore} types, the resulting |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
76 |
* {@code Collection} may not contain <b>all</b> of the |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
77 |
* {@code Certificate}s that match the selector. For instance, |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
78 |
* an LDAP {@code CertStore} may not search all entries in the |
2 | 79 |
* directory. Instead, it may just search entries that are likely to |
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
80 |
* contain the {@code Certificate}s it is looking for. |
2 | 81 |
* <p> |
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
82 |
* Some {@code CertStore} implementations (especially LDAP |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
83 |
* {@code CertStore}s) may throw a {@code CertStoreException} |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
84 |
* unless a non-null {@code CertSelector} is provided that includes |
2 | 85 |
* specific criteria that can be used to find the certificates. Issuer |
86 |
* and/or subject names are especially useful criteria. |
|
87 |
* |
|
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
88 |
* @param selector A {@code CertSelector} used to select which |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
89 |
* {@code Certificate}s should be returned. Specify {@code null} |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
90 |
* to return all {@code Certificate}s (if supported). |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
91 |
* @return A {@code Collection} of {@code Certificate}s that |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
92 |
* match the specified selector (never {@code null}) |
2 | 93 |
* @throws CertStoreException if an exception occurs |
94 |
*/ |
|
95 |
public abstract Collection<? extends Certificate> engineGetCertificates |
|
96 |
(CertSelector selector) throws CertStoreException; |
|
97 |
||
98 |
/** |
|
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
99 |
* Returns a {@code Collection} of {@code CRL}s that |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
100 |
* match the specified selector. If no {@code CRL}s |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
101 |
* match the selector, an empty {@code Collection} will be returned. |
2 | 102 |
* <p> |
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
103 |
* For some {@code CertStore} types, the resulting |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
104 |
* {@code Collection} may not contain <b>all</b> of the |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
105 |
* {@code CRL}s that match the selector. For instance, |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
106 |
* an LDAP {@code CertStore} may not search all entries in the |
2 | 107 |
* directory. Instead, it may just search entries that are likely to |
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
108 |
* contain the {@code CRL}s it is looking for. |
2 | 109 |
* <p> |
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
110 |
* Some {@code CertStore} implementations (especially LDAP |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
111 |
* {@code CertStore}s) may throw a {@code CertStoreException} |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
112 |
* unless a non-null {@code CRLSelector} is provided that includes |
2 | 113 |
* specific criteria that can be used to find the CRLs. Issuer names |
114 |
* and/or the certificate to be checked are especially useful. |
|
115 |
* |
|
18551
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
116 |
* @param selector A {@code CRLSelector} used to select which |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
117 |
* {@code CRL}s should be returned. Specify {@code null} |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
118 |
* to return all {@code CRL}s (if supported). |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
119 |
* @return A {@code Collection} of {@code CRL}s that |
882a3948c6e6
8017325: Cleanup of the javadoc <code> tag in java.security.cert
juh
parents:
5506
diff
changeset
|
120 |
* match the specified selector (never {@code null}) |
2 | 121 |
* @throws CertStoreException if an exception occurs |
122 |
*/ |
|
123 |
public abstract Collection<? extends CRL> engineGetCRLs |
|
124 |
(CRLSelector selector) throws CertStoreException; |
|
125 |
} |