Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
java.security.cert.PKIXParameters
CertPathBuilder
Constructor Summary | |
| |
|
Method Summary | |
void |
|
void |
|
Object |
|
List |
|
List |
|
Date |
|
Set |
|
boolean |
|
String |
|
CertSelector |
|
Set |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
String |
|
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public PKIXParameters(SettrustAnchors) throws InvalidAlgorithmParameterException
Create a new PKIXParameters object, populating the trusted certificates set with the elements of the given set, each of which must be aTrustAnchor
.
- Parameters:
trustAnchors
- The set of trust anchors.
- Throws:
InvalidAlgorithmParameterException
- If there are no certificates in the set.NullPointerException
- If trustAnchors is null.ClassCastException
- If every element in trustAnchors is not aTrustAnchor
.
public PKIXParameters(KeyStore keystore) throws KeyStoreException, InvalidAlgorithmParameterException
Create a new PKIXParameters object, populating the trusted certificates set with all certificates found in the given key store. All certificates found in the key store are assumed to be trusted by this constructor.
- Parameters:
keystore
- The key store.
- Throws:
KeyStoreException
- If the certificates cannot be retrieved from the key store.InvalidAlgorithmParameterException
- If there are no certificates in the key store.NullPointerException
- If keystore is null.
public void addCertPathChecker(PKIXCertPathChecker checker)
Add a certificate path checker.
- Parameters:
checker
- The certificate path checker to add.
public void addCertStore(CertStore store)
Add aCertStore
to the list of cert stores.
- Parameters:
store
- The CertStore to add.
public Object clone()
Returns a copy of these parameters.
- Specified by:
- clone in interface CertPathParameters
- Returns:
- The copy.
public ListgetCertPathCheckers()
Returns an immutable list of all certificate path checkers.
- Returns:
- An immutable list of all certificate path checkers.
public ListgetCertStores()
Returns an immutable list of cert stores. This method never returns null.
- Returns:
- The list of cert stores.
public Date getDate()
Returns the date for which the certificate path should be validated, or null if the current time should be used. The date object is copied to prevent subsequent modification.
- Returns:
- The date, or null if not set.
public SetgetInitialPolicies()
Returns the set of initial policy identifiers (as OID strings). If any policy is accepted, this method returns the empty set.
- Returns:
- An immutable set of initial policy OID strings, or the empty set if any policy is acceptable.
public boolean getPolicyQualifiersRejected()
Returns the value of the policy qualifiers enabled flag. The default value of this flag istrue
.
- Returns:
- The policy qualifiers enabled flag.
public String getSigProvider()
Returns the signature algorithm provider, or null if not set.
- Returns:
- The signature algorithm provider, or null if not set.
public CertSelector getTargetCertConstraints()
Returns the constraints placed on the target certificate, or null if there are none. The target constraints are copied to prevent subsequent modification.
- Returns:
- The target constraints, or null.
public SetgetTrustAnchors()
Returns an immutable set of trust anchors. The set returned will never be null and will never be empty.
- Returns:
- A (never null, never empty) immutable set of trust anchors.
public boolean isAnyPolicyInhibited()
Returns the value of the any policy inhibited flag. The default value of this flag isfalse
.
- Returns:
- The any policy inhibited flag.
public boolean isExplicitPolicyRequired()
Returns the value of the explicit policy required flag. The default value of this flag isfalse
.
- Returns:
- The explicit policy required flag.
public boolean isPolicyMappingInhibited()
Returns the value of the policy mapping inhibited flag. The default value of this flag isfalse
.
- Returns:
- The policy mapping inhibited flag.
public boolean isRevocationEnabled()
Returns the value of the revocation enabled flag. The default value for this flag istrue
.
- Returns:
- The revocation enabled flag.
public void setAnyPolicyInhibited(boolean value)
Sets the value of the any policy inhibited flag.
- Parameters:
value
- The new value.
public void setCertPathCheckers(ListpathCheckers)
Sets the certificate path checkers. If the argument is null, the list of checkers will merely be cleared.
- Parameters:
pathCheckers
- The new list of certificate path checkers.
- Throws:
ClassCastException
- If any element of pathCheckers is not aPKIXCertPathChecker
.
public void setCertStores(ListcertStores)
Set the cert stores. If the argument is null the list of cert stores will be empty.
- Parameters:
certStores
- The cert stores.
public void setDate(Date date)
Sets the date for which the certificate path should be validated, or null if the current time should be used.
- Parameters:
date
- The new date, or null.
public void setExplicitPolicyRequired(boolean value)
Sets the value of the explicit policy required flag.
- Parameters:
value
- The new value.
public void setInitialPolicies(SetinitPolicies)
Sets the initial policy identifiers (as OID strings). If the argument is null or the empty set, then any policy identifier will be accepted.
- Parameters:
initPolicies
- The new set of policy strings, or null.
- Throws:
ClassCastException
- If any element in initPolicies is not a string.
public void setPolicyMappingInhibited(boolean value)
Sets the value of the policy mapping inhibited flag.
- Parameters:
value
- The new value.
public void setPolicyQualifiersRejected(boolean value)
Sets the value of the policy qualifiers enabled flag.
- Parameters:
value
- The new value.
public void setRevocationEnabled(boolean value)
Sets the value of the revocation enabled flag.
- Parameters:
value
- The new value.
public void setSigProvider(String sigProvider)
Sets the signature algorithm provider, or null if there is no preferred provider.
- Parameters:
sigProvider
- The signature provider name.
public void setTargetCertConstraints(CertSelector targetConstraints)
Sets the constraints placed on the target certificate.
- Parameters:
targetConstraints
- The target constraints.
public void setTrustAnchors(SettrustAnchors) throws InvalidAlgorithmParameterException
Sets the trust anchors of this class, replacing the current trust anchors with those in the given set. The supplied set is copied to prevent modification.
- Parameters:
trustAnchors
- The new set of trust anchors.
- Throws:
InvalidAlgorithmParameterException
- If there are no certificates in the set.NullPointerException
- If trustAnchors is null.ClassCastException
- If every element in trustAnchors is not aTrustAnchor
.