public class

InhibitAnyPolicyExtension

extends Extension
implements CertAttrSet<T>
java.lang.Object
   ↳ sun.security.x509.Extension
     ↳ sun.security.x509.InhibitAnyPolicyExtension

Class Overview

This class represents the Inhibit Any-Policy Extension.

The inhibit any-policy extension can be used in certificates issued to CAs. The inhibit any-policy indicates that the special any-policy OID, with the value {2 5 29 32 0}, is not considered an explicit match for other certificate policies. The value indicates the number of additional certificates that may appear in the path before any- policy is no longer permitted. For example, a value of one indicates that any-policy may be processed in certificates issued by the sub- ject of this certificate, but not in additional certificates in the path.

This extension MUST be critical.

The ASN.1 syntax for this extension is:

 id-ce-inhibitAnyPolicy OBJECT IDENTIFIER ::=  { id-ce 54 }

 InhibitAnyPolicy ::= SkipCerts

 SkipCerts ::= INTEGER (0..MAX)
 

Summary

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 SKIP_CERTS
Fields
public static ObjectIdentifier AnyPolicy_Id Object identifier for "any-policy"
[Expand]
Inherited Fields
From class sun.security.x509.Extension
Public Constructors
InhibitAnyPolicyExtension(int skipCerts)
Default constructor for this object.
InhibitAnyPolicyExtension(Boolean critical, Object value)
Create the extension from the passed DER encoded value of the same.
Public Methods
void delete(String name)
Delete the attribute value.
void encode(OutputStream out)
Encode this extension value to the output stream.
Object get(String name)
Get the attribute value.
Enumeration<String> getElements()
Return an enumeration of names of attributes existing within this attribute.
String getName()
Return the name of this attribute.
void set(String name, Object obj)
Set the attribute value.
String toString()
Return user readable form of extension.
[Expand]
Inherited Methods
From class sun.security.x509.Extension
From class java.lang.Object
From interface sun.security.x509.CertAttrSet

Constants

public static final String IDENT

Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type.

Constant Value: "x509.info.extensions.InhibitAnyPolicy"

public static final String NAME

Attribute names.

Constant Value: "InhibitAnyPolicy"

public static final String SKIP_CERTS

Constant Value: "skip_certs"

Fields

public static ObjectIdentifier AnyPolicy_Id

Object identifier for "any-policy"

Public Constructors

public InhibitAnyPolicyExtension (int skipCerts)

Default constructor for this object.

Parameters
skipCerts specifies the depth of the certification path. Use value of -1 to request unlimited depth.
Throws
IOException

public InhibitAnyPolicyExtension (Boolean critical, Object value)

Create the extension from the passed DER encoded value of the same.

Parameters
critical criticality flag to use. Must be true for this extension.
value a byte array holding the DER-encoded extension value.
Throws
ClassCastException if value is not an array of bytes
IOException on error.

Public Methods

public void delete (String name)

Delete the attribute value.

Parameters
name name of attribute to delete. Must be SKIP_CERTS.
Throws
IOException on error. In this case, IOException will always be thrown, because the only attribute, SKIP_CERTS, is required.

public void encode (OutputStream out)

Encode this extension value to the output stream.

Parameters
out the DerOutputStream to encode the extension to.
Throws
IOException

public Object get (String name)

Get the attribute value.

Parameters
name name of attribute to get. Must be SKIP_CERTS.
Throws
IOException on error

public Enumeration<String> getElements ()

Return an enumeration of names of attributes existing within this attribute.

Returns
  • an enumeration of the attribute names.

public String getName ()

Return the name of this attribute.

Returns
  • the name of this CertAttrSet.

public void set (String name, Object obj)

Set the attribute value.

Parameters
name name of attribute to set. Must be SKIP_CERTS.
obj value to which attribute is to be set. Must be Integer type.
Throws
IOException on error

public String toString ()

Return user readable form of extension.

Returns
  • a string representation of the object.