public class EntrustCertTypeSettings
extends java.lang.Object
EntrustCertTypeInfo ::= SEQUENCE {
certtype EntrustCertInfoId,
certdefns SEQUENCE SIZE (1..MAX) OF EntrustCertDefnInfo,
policycertdn DistinguishedName OPTIONAL,
policycert [1] ANY OPTIONAL -- the policy cert in some encoding
}
Since no known certificate-type policy settings have yet been defined (as of Entrust Security Manager 7.0), access is only provided to the components from the structure above. For future releases, access will also be provided to each known certificate-type policy setting contained within the policy certificate.
This implementation of Entrust certificate-type policy information requires that the 'policycert' component be an ASN.1 encoded Entrust Attribute Certificate. It also requires that both the 'name' and 'id' of every EntrustCertInfoId structure exist.
| Constructor and Description |
|---|
EntrustCertTypeSettings(EntrustCertTypeInfo entrustCertTypeInfo)
Creates an
EntrustCertTypeSettings object from an
EntrustCertTypeInfo structure. |
EntrustCertTypeSettings(User user,
java.math.BigInteger certTypeId,
boolean requireFresh)
Creates an
EntrustCertTypeSettings object by retrieving the
necessary information from the user's main policy certificate, and the
user's policy certificate sources (Cache or Directory). |
EntrustCertTypeSettings(User user,
java.lang.String certTypeName,
boolean requireFresh)
Creates an
EntrustCertTypeSettings object by retrieving the
necessary information from the user's main policy certificate, and the
user's policy certificate sources (Cache or Directory). |
| Modifier and Type | Method and Description |
|---|---|
int |
countCertdefns()
Returns the number of certificate-definition policies.
|
Attribute |
getAttribute(ObjectID oid)
Returns the requested policy setting from the policy certificate.
|
EntrustCertDefnSettings |
getCertdefn(java.math.BigInteger id)
Returns the certificate-definition policy that corresponds to the provided
certificate-definition id.
|
EntrustCertDefnSettings |
getCertdefn(EntrustCertInfoId certdefn)
Returns the certificate-definition policy that corresponds to the provided
certificate-definition identifier.
|
EntrustCertDefnSettings |
getCertdefn(java.lang.String name)
Returns the certificate-definition policy that corresponds to the provided
certificate-definition name.
|
java.util.Iterator |
getCertdefns()
Returns an
Iterator over all the the certificate-definition
policy information. |
EntrustCertInfoId |
getCerttype()
Returns the certificate-type identifier, which is the 'certdefn' component
that was extracted from the EntrustCertTypeInfo structure.
|
Name |
getPolicycertdn()
Returns the certificate-type policy certificate DN, which is the
'policycertdn' component that was extracted from the EntrustCertTypeInfo
structure.
|
boolean |
isFresh()
Returns an indicator of whether or not all the policy certificates this
object contains are fresh (were retrieved from the directory or extracted
from an EntrustCertTypeSettings structure received via PKIX-CMP).
|
java.lang.String |
toString()
Creates a text representation of the certificate-type information,
including the values of each of the known policy settings (any policy
setting that has an accessor API).
|
void |
updateUserPolicyCertCache(User user)
Adds the certificate definition policy certificates to the user's policy
certificate cache.
|
public EntrustCertTypeSettings(User user, java.math.BigInteger certTypeId, boolean requireFresh) throws java.security.cert.CertificateException
EntrustCertTypeSettings object by retrieving the
necessary information from the user's main policy certificate, and the
user's policy certificate sources (Cache or Directory).
First the 'entrustCertTypePolicy' attribute is retrieved from the user's
main policy certificate. This attribute contains a list of all
certificate type information supported by the Entrust Security Manager as
EntrustCertTypeInfo structures. However, these structures do
not contain any policy certificates.
From this list, the user's certificate type information is extracted using the certificate type identifier provided. Finally, each of the user's certificate definition policy certificate is retrieved from the user's policy certificate source, and loaded into the structure.
user - the user whose certificate type settings are being createdcertTypeId - the user's certificate type identifierrequireFresh - indicates that fresh policy certificate are required; all
policy certificate will be retrieved from the Directoryjava.security.cert.CertificateException - thrown if an error occurs while retrieving the user's
certificate type informationpublic EntrustCertTypeSettings(User user, java.lang.String certTypeName, boolean requireFresh) throws java.security.cert.CertificateException
EntrustCertTypeSettings object by retrieving the
necessary information from the user's main policy certificate, and the
user's policy certificate sources (Cache or Directory).
First the 'entrustCertTypePolicy' attribute is retrieved from the user's
main policy certificate. This attribute contains a list of all
certificate type information supported by the Entrust Security Manager as
EntrustCertTypeInfo structures. However, these structures do
not contain any policy certificates.
From this list, the user's certificate type information is extracted using the certificate type identifier provided. Finally, each of the user's certificate definition policy certificate is retrieved from the user's policy certificate source, and loaded into the structure.
user - the user whose certificate type settings are being createdcertTypeName - the user's certificate type namerequireFresh - indicates that fresh policy certificate are required; all
policy certificate will be retrieved from the Directoryjava.security.cert.CertificateException - thrown if an error occurs while retrieving the user's
certificate type informationpublic EntrustCertTypeSettings(EntrustCertTypeInfo entrustCertTypeInfo) throws CodingException
EntrustCertTypeSettings object from an
EntrustCertTypeInfo structure.
The 'certdefn' and 'policycertdn' components are simply extracted and
stored internally. The 'certdefns' component is extracted and each
EntrustCertDefnInfo sturcture is converted to and represented as an
EntrustCertDefnSettings object and stored internally. The
'policycert' component is extracted, ASN1 decoded into an Entrust Attribute
Certificate object, and stored internally. This implementation of Entrust
certificate-type policy information requires that the 'policycert' component
be an ASN1 encoded Entrust Attribute Certificate. It also requires that
both the 'name' and 'id' of ever EntrustCertInfoId structure exist.
entrustCertTypeInfo - the EntrustCertTypeInfo structure that contains the certificate-type
policy informationCodingException - thrown if an error occurs while decoding the policy certificates or
any of the policy settings they containspublic EntrustCertInfoId getCerttype()
The certificate-type identifier provides a unique identifier for the certificate-type information.
public EntrustCertDefnSettings getCertdefn(EntrustCertInfoId certdefn)
If the certificate-type information does not contain a
certificate-definition policy that corresponds to the certificate-definition
identifier provided, null is returned.
public EntrustCertDefnSettings getCertdefn(java.lang.String name)
If the certificate-type information does not contain a
certificate-definition policy that corresponds to the certificate-definition
id provided, null is returned.
name - the certificate-definition namepublic EntrustCertDefnSettings getCertdefn(java.math.BigInteger id)
If the certificate-type information does not contain a
certificate-definition policy that corresponds to the certificate-definition
id provided, null is returned.
id - the certificate-definition idpublic java.util.Iterator getCertdefns()
Iterator over all the the certificate-definition
policy information.
The iterator does not allow modifications and will return
only EntrustCertDefnSettings objects.
public int countCertdefns()
public Name getPolicycertdn()
null is returned.
The certificate-type policy certificate DN provides the Distinguished Name (DN) of the associated certificate-type policy certificate.
public Attribute getAttribute(ObjectID oid)
null is returned.
public boolean isFresh()
true if the policy settings are fresh; false
otherwisepublic void updateUserPolicyCertCache(User user)
If the user does not yet have a policy certificate cache, a new one is automatically created.
user - the user whose policy certificate cache is to be updatedpublic java.lang.String toString()
toString in class java.lang.Object