55 |
* Parameters for verifying certificate paths using the PKIX |
* Parameters for verifying certificate paths using the PKIX |
56 |
* (Public-Key Infrastructure (X.509)) algorithm. |
* (Public-Key Infrastructure (X.509)) algorithm. |
57 |
* |
* |
58 |
* @see CertPathBulider |
* @see CertPathBuilder |
59 |
|
* @since 1.4 |
60 |
*/ |
*/ |
61 |
public class PKIXParameters implements CertPathParameters |
public class PKIXParameters implements CertPathParameters |
62 |
{ |
{ |
145 |
* @throws ClassCastException If every element in <i>trustAnchors</i> |
* @throws ClassCastException If every element in <i>trustAnchors</i> |
146 |
* is not a {@link TrustAnchor}. |
* is not a {@link TrustAnchor}. |
147 |
*/ |
*/ |
148 |
public PKIXParameters(Set trustAnchors) |
public PKIXParameters(Set<TrustAnchor> trustAnchors) |
149 |
throws InvalidAlgorithmParameterException |
throws InvalidAlgorithmParameterException |
150 |
{ |
{ |
151 |
this(); |
this(); |
200 |
* |
* |
201 |
* @return A (never null, never empty) immutable set of trust anchors. |
* @return A (never null, never empty) immutable set of trust anchors. |
202 |
*/ |
*/ |
203 |
public Set getTrustAnchors() |
public Set<TrustAnchor> getTrustAnchors() |
204 |
{ |
{ |
205 |
return Collections.unmodifiableSet(trustAnchors); |
return Collections.unmodifiableSet(trustAnchors); |
206 |
} |
} |
217 |
* @throws ClassCastException If every element in <i>trustAnchors</i> |
* @throws ClassCastException If every element in <i>trustAnchors</i> |
218 |
* is not a {@link TrustAnchor}. |
* is not a {@link TrustAnchor}. |
219 |
*/ |
*/ |
220 |
public void setTrustAnchors(Set trustAnchors) |
public void setTrustAnchors(Set<TrustAnchor> trustAnchors) |
221 |
throws InvalidAlgorithmParameterException |
throws InvalidAlgorithmParameterException |
222 |
{ |
{ |
223 |
if (trustAnchors.isEmpty()) |
if (trustAnchors.isEmpty()) |
236 |
* @return An immutable set of initial policy OID strings, or the |
* @return An immutable set of initial policy OID strings, or the |
237 |
* empty set if any policy is acceptable. |
* empty set if any policy is acceptable. |
238 |
*/ |
*/ |
239 |
public Set getInitialPolicies() |
public Set<String> getInitialPolicies() |
240 |
{ |
{ |
241 |
return Collections.unmodifiableSet(initPolicies); |
return Collections.unmodifiableSet(initPolicies); |
242 |
} |
} |
250 |
* @throws ClassCastException If any element in <i>initPolicies</i> is |
* @throws ClassCastException If any element in <i>initPolicies</i> is |
251 |
* not a string. |
* not a string. |
252 |
*/ |
*/ |
253 |
public void setInitialPolicies(Set initPolicies) |
public void setInitialPolicies(Set<String> initPolicies) |
254 |
{ |
{ |
255 |
this.initPolicies.clear(); |
this.initPolicies.clear(); |
256 |
if (initPolicies == null) |
if (initPolicies == null) |
278 |
* |
* |
279 |
* @return The list of cert stores. |
* @return The list of cert stores. |
280 |
*/ |
*/ |
281 |
public List getCertStores() |
public List<CertStore> getCertStores() |
282 |
{ |
{ |
283 |
return Collections.unmodifiableList(certStores); |
return Collections.unmodifiableList(certStores); |
284 |
} |
} |
289 |
* |
* |
290 |
* @param certStores The cert stores. |
* @param certStores The cert stores. |
291 |
*/ |
*/ |
292 |
public void setCertStores(List certStores) |
public void setCertStores(List<CertStore> certStores) |
293 |
{ |
{ |
294 |
this.certStores.clear(); |
this.certStores.clear(); |
295 |
if (certStores == null) |
if (certStores == null) |
447 |
* |
* |
448 |
* @return An immutable list of all certificate path checkers. |
* @return An immutable list of all certificate path checkers. |
449 |
*/ |
*/ |
450 |
public List getCertPathCheckers() |
public List<PKIXCertPathChecker> getCertPathCheckers() |
451 |
{ |
{ |
452 |
return Collections.unmodifiableList(pathCheckers); |
return Collections.unmodifiableList(pathCheckers); |
453 |
} |
} |
460 |
* @throws ClassCastException If any element of <i>pathCheckers</i> is |
* @throws ClassCastException If any element of <i>pathCheckers</i> is |
461 |
* not a {@link PKIXCertPathChecker}. |
* not a {@link PKIXCertPathChecker}. |
462 |
*/ |
*/ |
463 |
public void setCertPathCheckers(List pathCheckers) |
public void setCertPathCheckers(List<PKIXCertPathChecker> pathCheckers) |
464 |
{ |
{ |
465 |
this.pathCheckers.clear(); |
this.pathCheckers.clear(); |
466 |
if (pathCheckers == null) |
if (pathCheckers == null) |