|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.entrust.toolkit.CertificateSelector
CertificateSelector implements Selector to optimize
the content of a set of X.509 certificates.
| Field Summary | |
static int |
CRL_SIGN
|
static int |
DATA_ENCIPHERMENT
|
static int |
DECIPHER_ONLY
|
static int |
DIGITAL_SIGNATURE
|
static int |
ENCIPHER_ONLY
|
static int |
KEY_AGREEMENT
|
static int |
KEY_CERT_SIGN
|
static int |
KEY_ENCIPHERMENT
|
static int |
NON_REPUDIATION
|
| Constructor Summary | |
CertificateSelector()
Creates a CertificateSelector object. |
|
| Method Summary | |
Set |
applyTo(Set set)
Removes all objects from the set that do not conform to the selector's selection criteria. |
AlgorithmID |
getAlgorithm()
Returns the certified key's algorithm. |
int |
getKeyUsage()
Returns the key usage flags. |
ObjectID[] |
getPolicyOids()
Returns the policy oids. |
java.util.Date |
getValidityTime()
Returns the time at which the selected certificates must be valid. |
void |
setAlgorithm(AlgorithmID alg)
Specifies the algorithm of the certified key. |
void |
setKeyUsage(int keyUsage)
Sets the key usage. |
void |
setPolicyOids(ObjectID[] oids)
Specifies the policy oids. |
void |
setValidityTime(java.util.Date time)
Specifies a time at which the selected certificates must be valid. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final int DIGITAL_SIGNATURE
public static final int NON_REPUDIATION
public static final int KEY_ENCIPHERMENT
public static final int DATA_ENCIPHERMENT
public static final int KEY_AGREEMENT
public static final int KEY_CERT_SIGN
public static final int CRL_SIGN
public static final int ENCIPHER_ONLY
public static final int DECIPHER_ONLY
| Constructor Detail |
public CertificateSelector()
CertificateSelector object.| Method Detail |
public void setKeyUsage(int keyUsage)
throws java.lang.IllegalArgumentException
Certificates not containing all of the specified key usage flags are removed from the set. Certificates that have all of the specified key usage flags (and more) remain in the set.
The key usage flags defined in this class can be combined using bitwise
OR. The default, keyUsage = 0, selects all
certificates.
keyUsage - the key usage flags that certificates must havekeyUsage is not composed of the key usage
constants defined in this classpublic int getKeyUsage()
encipher = (sel.getKeyUsage() & DATA_ENCIPHERMENT) != 0;.this.setKeyUsagepublic void setPolicyOids(ObjectID[] oids)
oids may be null. In that case, all
certificates are selected.
The default for the policy ids is null.oids - the policy oidspublic ObjectID[] getPolicyOids()
this.setPolicyOidspublic void setAlgorithm(AlgorithmID alg)
null. In this case, all certificates are
selected.alg - the algorithm of the certified key; may be nullpublic AlgorithmID getAlgorithm()
nullthis.setAlgorithmpublic void setValidityTime(java.util.Date time)
notBefore and notAfter are used to determine
if the certificate is valid.
If time is null, all certificates remain in
the set. This is the default.time - the time at which the certificates must be valid; may be
nullpublic java.util.Date getValidityTime()
this.setValidityTime
public Set applyTo(Set set)
throws java.lang.ClassCastException,
java.lang.NullPointerException
set - the set from which to remove objectssetset is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||