java.lang.Object | ||
↳ | sun.security.x509.Extension | |
↳ | sun.security.x509.CertificatePoliciesExtension |
This class defines the certificate policies extension which specifies the policies under which the certificate has been issued and the purposes for which the certificate may be used.
Applications with specific policy requirements are expected to have a list of those policies which they will accept and to compare the policy OIDs in the certificate to that list. If this extension is critical, the path validation software MUST be able to interpret this extension (including the optional qualifier), or MUST reject the certificate.
Optional qualifiers are not supported in this implementation, as they are not recommended by RFC2459. The ASN.1 syntax for this is (IMPLICIT tagging is defined in the module definition):
id-ce-certificatePolicies OBJECT IDENTIFIER ::= { id-ce 32 } certificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation PolicyInformation ::= SEQUENCE { policyIdentifier CertPolicyId, policyQualifiers SEQUENCE SIZE (1..MAX) OF PolicyQualifierInfo OPTIONAL } CertPolicyId ::= OBJECT IDENTIFIER
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | IDENT | Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type. | |||||||||
String | NAME | Attribute names. | |||||||||
String | POLICIES |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a CertificatePoliciesExtension object from
a List of PolicyInformation; the criticality is set to false.
| |||||||||||
Create a CertificatePoliciesExtension object from
a List of PolicyInformation with specified criticality.
| |||||||||||
Create the extension from its DER encoded value and criticality.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Delete the attribute value.
| |||||||||||
Write the extension to the DerOutputStream.
| |||||||||||
Get the attribute value.
| |||||||||||
Return an enumeration of names of attributes existing within this
attribute.
| |||||||||||
Return the name of this attribute.
| |||||||||||
Set the attribute value.
| |||||||||||
Return the extension as user readable string.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type.
Create a CertificatePoliciesExtension object from a List of PolicyInformation; the criticality is set to false.
certPolicies | the List of PolicyInformation. |
---|
IOException |
---|
Create a CertificatePoliciesExtension object from a List of PolicyInformation with specified criticality.
critical | true if the extension is to be treated as critical. |
---|---|
certPolicies | the List of PolicyInformation. |
IOException |
---|
Create the extension from its DER encoded value and criticality.
critical | true if the extension is to be treated as critical. |
---|---|
value | an array of DER encoded bytes of the actual value. |
ClassCastException | if value is not an array of bytes |
---|---|
IOException | on error. |
Write the extension to the DerOutputStream.
out | the DerOutputStream to write the extension to. |
---|
IOException | on encoding errors. |
---|
Return an enumeration of names of attributes existing within this attribute.
Set the attribute value.
name | the name of the attribute (e.g. "x509.info.key") |
---|---|
obj | the attribute object. |
IOException |
---|
Return the extension as user readable string.