public class

PolicyMappingsExtension

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

Class Overview

Represent the Policy Mappings Extension. This extension, if present, identifies the certificate policies considered identical between the issuing and the subject CA.

Extensions are addiitonal attributes which can be inserted in a X509 v3 certificate. For example a "Driving License Certificate" could have the driving license number as a extension.

Extensions are represented as a sequence of the extension identifier (Object Identifier), a boolean flag stating whether the extension is to be treated as being critical and the extension value itself (this is again a DER encoding of the extension value).

Summary

Constants
String IDENT Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type.
String MAP
String NAME Attribute names.
[Expand]
Inherited Fields
From class sun.security.x509.Extension
Public Constructors
PolicyMappingsExtension(List<CertificatePolicyMap> map)
Create a PolicyMappings with the List of CertificatePolicyMap.
PolicyMappingsExtension()
Create a default PolicyMappingsExtension.
PolicyMappingsExtension(Boolean critical, Object value)
Create the extension from the passed DER encoded value.
Public Methods
void delete(String name)
Delete the attribute value.
void encode(OutputStream out)
Write the extension to the OutputStream.
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()
Returns a printable representation of the policy map.
[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.PolicyMappings"

public static final String MAP

Constant Value: "map"

public static final String NAME

Attribute names.

Constant Value: "PolicyMappings"

Public Constructors

public PolicyMappingsExtension (List<CertificatePolicyMap> map)

Create a PolicyMappings with the List of CertificatePolicyMap.

Throws
IOException

public PolicyMappingsExtension ()

Create a default PolicyMappingsExtension.

public PolicyMappingsExtension (Boolean critical, Object value)

Create the extension from the passed DER encoded 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 the name of the attribute to delete.
Throws
IOException

public void encode (OutputStream out)

Write the extension to the OutputStream.

Parameters
out the OutputStream to write the extension to.
Throws
IOException on encoding errors.

public Object get (String name)

Get the attribute value.

Parameters
name the name of the attribute to return.
Throws
IOException

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 the name of the attribute (e.g. "x509.info.key")
obj the attribute object.
Throws
IOException

public String toString ()

Returns a printable representation of the policy map.

Returns
  • a string representation of the object.