public class

CertificateExtensions

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

Class Overview

This class defines the Extensions attribute for the Certificate.

See Also

Summary

Constants
String IDENT Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type.
String NAME name
Public Constructors
CertificateExtensions()
Default constructor.
CertificateExtensions(DerInputStream in)
Create the object, decoding the values from the passed DER stream.
Public Methods
void delete(String name)
Delete the attribute value.
void encode(OutputStream out)
Encode the extensions in DER form to the stream, setting the context specific tag as needed in the X.509 v3 certificate.
void encode(OutputStream out, boolean isCertReq)
Encode the extensions in DER form to the stream.
boolean equals(Object other)
Compares this CertificateExtensions for equality with the specified object.
Object get(String name)
Get the attribute value.
Collection<Extension> getAllExtensions()
Return a collection view of the extensions.
Enumeration<Extension> getElements()
Return an enumeration of names of attributes existing within this attribute.
String getName()
Return the name of this attribute.
Map<StringExtension> getUnparseableExtensions()
boolean hasUnsupportedCriticalExtension()
Return true if a critical extension is found that is not supported, otherwise return false.
int hashCode()
Returns a hashcode value for this CertificateExtensions.
void set(String name, Object obj)
Set the attribute value.
String toString()
Returns a string representation of this CertificateExtensions object in the form of a set of entries, enclosed in braces and separated by the ASCII characters "" (comma and space).
[Expand]
Inherited Methods
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"

public static final String NAME

name

Constant Value: "extensions"

Public Constructors

public CertificateExtensions ()

Default constructor.

public CertificateExtensions (DerInputStream in)

Create the object, decoding the values from the passed DER stream.

Parameters
in the DerInputStream to read the Extension from.
Throws
IOException on decoding errors.

Public Methods

public void delete (String name)

Delete the attribute value.

Parameters
name the extension name used in the lookup.
Throws
IOException if named extension is not found.

public void encode (OutputStream out)

Encode the extensions in DER form to the stream, setting the context specific tag as needed in the X.509 v3 certificate.

Parameters
out the DerOutputStream to marshal the contents to.
Throws
CertificateException on encoding errors.
IOException on errors.

public void encode (OutputStream out, boolean isCertReq)

Encode the extensions in DER form to the stream.

Parameters
out the DerOutputStream to marshal the contents to.
isCertReq if true then no context specific tag is added.
Throws
CertificateException on encoding errors.
IOException on errors.

public boolean equals (Object other)

Compares this CertificateExtensions for equality with the specified object. If the other object is an instanceof CertificateExtensions, then all the entries are compared with the entries from this.

Parameters
other the object to test for equality with this CertificateExtensions.
Returns
  • true iff all the entries match that of the Other, false otherwise.

public Object get (String name)

Get the attribute value.

Parameters
name the extension name used in the lookup.
Throws
IOException if named extension is not found.

public Collection<Extension> getAllExtensions ()

Return a collection view of the extensions.

Returns
  • a collection view of the extensions in this Certificate.

public Enumeration<Extension> 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 Map<StringExtension> getUnparseableExtensions ()

public boolean hasUnsupportedCriticalExtension ()

Return true if a critical extension is found that is not supported, otherwise return false.

public int hashCode ()

Returns a hashcode value for this CertificateExtensions.

Returns
  • the hashcode value.

public void set (String name, Object obj)

Set the attribute value.

Parameters
name the extension name used in the cache.
obj the object to set.
Throws
IOException if the object could not be cached.

public String toString ()

Returns a string representation of this CertificateExtensions object in the form of a set of entries, enclosed in braces and separated by the ASCII characters "" (comma and space).

Overrides to toString method of Object.

Returns
  • a string representation of this CertificateExtensions.