public class AcceptableCertPolicies extends V3Extension
acceptableCertPolicies EXTENSION ::= { SYNTAX AcceptableCertPoliciesSyntax IDENTIFIED BY id-ce-acceptableCertPolicies } AcceptableCertPoliciesSyntax ::= SEQUENCE SIZE (1..MAX) OF CertPolicyId CertPolicyId ::= OBJECT IDENTIFIER
This extension may only be present in attribute certificates issued by AAs, including SOAs, to other AAs. This extension
shall not be included in end-entity attribute certificates or in any public-key certificates. In the case of delegation using
public-key certificates, this same functionality is provided by the certificatePolicies and other related extensions.
If present, this extension shall be flagged critical. If this extension is present and the privilege verifier understands it,
the verifier shall ensure that all subsequent privilege asserters in the delegation path are authenticated with a public-key
certificate under one or more of the enumerated certificate policies. If this extension is present, but not understood by the
privilege verifier, the certificate shall be rejected.
For more information see:
http://www.itu.int/rec/recommendation.asp?lang=en&parent=T-REC-X.509-200508-P
Section: 15.5.2.3 Acceptable certificate policies extension
Modifier and Type | Field and Description |
---|---|
static ObjectID |
oid |
critical
Constructor and Description |
---|
AcceptableCertPolicies()
Default constructor that creates an empty policy extension.
|
Modifier and Type | Method and Description |
---|---|
void |
addAcceptableCertPolicy(ObjectID id)
Adds a new PolicyID to the extension.
|
void |
addAcceptableCertPolicy(java.lang.String id)
Adds a new PolicyID to the extension.
|
ObjectID |
getObjectID()
Returns the object ID of this
AcceptalbeCertPolicies extension. |
ObjectID[] |
getPolicies()
Returns the encoded PolicyIDs.
|
java.lang.String[] |
getPolicyOIDs()
Returns the encoded PolicyIDs.
|
int |
hashCode()
Returns the hash code of the extension.
|
void |
init(ASN1Object obj)
Parses a given
|
void |
removeAcceptablePolicy(ObjectID oid)
Removes the specified policy from the list of acceptable policies.
|
void |
removeAcceptablePolicy(java.lang.String oid)
Removes the specified policy from the list of acceptable policies.
|
ASN1Object |
toASN1Object()
Returns the ASN.1 representation of the extension.
|
java.lang.String |
toString()
Returns a string that represents the contents of this
AcceptableCertPolicies extension. |
getName, isCritical, setCritical
public static final ObjectID oid
public AcceptableCertPolicies()
public ASN1Object toASN1Object() throws X509ExtensionException
toASN1Object
in class V3Extension
X509ExtensionException
- if the extension could not be createdpublic void init(ASN1Object obj) throws X509ExtensionException
getPolicyOIDs()
.init
in class V3Extension
obj
- the AcceptableCertPolicies as ASN1ObjectX509ExtensionException
- if the AcceptableCertPolicies cannot be parsedpublic java.lang.String[] getPolicyOIDs()
public ObjectID[] getPolicies()
public void addAcceptableCertPolicy(java.lang.String id)
id
- ID of the policy in its String representationpublic void addAcceptableCertPolicy(ObjectID id)
id
- PolicyID objectpublic void removeAcceptablePolicy(ObjectID oid)
oid
- the object identifier of the policypublic void removeAcceptablePolicy(java.lang.String oid)
oid
- the object identifier of the policypublic int hashCode()
hashCode
in class V3Extension
public ObjectID getObjectID()
AcceptalbeCertPolicies
extension.getObjectID
in class V3Extension
public java.lang.String toString()
AcceptableCertPolicies
extension.toString
in class java.lang.Object