/** * Creates an instance of <code>PKIXBuilderParameters</code> with the * specified <code>Set</code> of most-trusted CAs. Each element of the set * is a {@link TrustAnchor TrustAnchor}. * * <p> * Note that the <code>Set</code> is copied to protect against subsequent * modifications. * * @param trustAnchors a <code>Set</code> of <code>TrustAnchor</code>s * @param targetConstraints a <code>Selector</code> specifying the * constraints on the target certificate or attribute * certificate. * @throws InvalidAlgorithmParameterException if <code>trustAnchors</code> * is empty. * @throws NullPointerException if <code>trustAnchors</code> is * <code>null</code> * @throws ClassCastException if any of the elements of * <code>trustAnchors</code> is not of type * <code>java.security.cert.TrustAnchor</code> */ public ExtendedPKIXBuilderParameters(Set trustAnchors, Selector targetConstraints) throws InvalidAlgorithmParameterException { super(trustAnchors); setTargetConstraints(targetConstraints); }
/** * Creates an instance of <code>PKIXBuilderParameters</code> with the * specified <code>Set</code> of most-trusted CAs. Each element of the set * is a {@link TrustAnchor TrustAnchor}. * * <p> * Note that the <code>Set</code> is copied to protect against subsequent * modifications. * * @param trustAnchors a <code>Set</code> of <code>TrustAnchor</code>s * @param targetConstraints a <code>Selector</code> specifying the * constraints on the target certificate or attribute * certificate. * @throws InvalidAlgorithmParameterException if <code>trustAnchors</code> * is empty. * @throws NullPointerException if <code>trustAnchors</code> is * <code>null</code> * @throws ClassCastException if any of the elements of * <code>trustAnchors</code> is not of type * <code>java.security.cert.TrustAnchor</code> */ public ExtendedPKIXBuilderParameters(Set trustAnchors, Selector targetConstraints) throws InvalidAlgorithmParameterException { super(trustAnchors); setTargetConstraints(targetConstraints); }
params.setTargetConstraints(selector); CertPathBuilder builder = null; try