public class

NetscapeCertTypeExtension

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

Class Overview

Represents Netscape Certificate Type Extension. The details are defined here .

This extension, if present, defines both the purpose (e.g., encipherment, signature, certificate signing) and the application (e.g., SSL, S/Mime or Object Signing of the key contained in the certificate. This extension has been superseded by IETF PKIX extensions but is provided here for compatibility reasons.

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 OBJECT_SIGNING
String OBJECT_SIGNING_CA
String SSL_CA
String SSL_CLIENT
String SSL_SERVER
String S_MIME
String S_MIME_CA
Fields
public static ObjectIdentifier NetscapeCertType_Id Object identifier for the Netscape-Cert-Type extension.
[Expand]
Inherited Fields
From class sun.security.x509.Extension
Public Constructors
NetscapeCertTypeExtension(byte[] bitString)
Create a NetscapeCertTypeExtension with the passed bit settings.
NetscapeCertTypeExtension(boolean[] bitString)
Create a NetscapeCertTypeExtension with the passed bit settings.
NetscapeCertTypeExtension(Boolean critical, Object value)
Create the extension from the passed DER encoded value of the same.
NetscapeCertTypeExtension()
Create a default key usage.
Public Methods
void delete(String name)
Delete the attribute value.
void encode(OutputStream out)
Write the extension to the DerOutputStream.
Object get(String name)
Get the attribute value.
Enumeration<String> getElements()
Return an enumeration of names of attributes existing within this attribute.
boolean[] getKeyUsageMappedBits()
Get a boolean array representing the bits of this extension, as it maps to the KeyUsage extension.
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 NetscapeCertType.
[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.NetscapeCertType"

public static final String NAME

Attribute names.

Constant Value: "NetscapeCertType"

public static final String OBJECT_SIGNING

Constant Value: "object_signing"

public static final String OBJECT_SIGNING_CA

Constant Value: "object_signing_ca"

public static final String SSL_CA

Constant Value: "ssl_ca"

public static final String SSL_CLIENT

Constant Value: "ssl_client"

public static final String SSL_SERVER

Constant Value: "ssl_server"

public static final String S_MIME

Constant Value: "s_mime"

public static final String S_MIME_CA

Constant Value: "s_mime_ca"

Fields

public static ObjectIdentifier NetscapeCertType_Id

Object identifier for the Netscape-Cert-Type extension.

Public Constructors

public NetscapeCertTypeExtension (byte[] bitString)

Create a NetscapeCertTypeExtension with the passed bit settings. The criticality is set to true.

Parameters
bitString the bits to be set for the extension.
Throws
IOException

public NetscapeCertTypeExtension (boolean[] bitString)

Create a NetscapeCertTypeExtension with the passed bit settings. The criticality is set to true.

Parameters
bitString the bits to be set for the extension.
Throws
IOException

public NetscapeCertTypeExtension (Boolean critical, Object value)

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

Parameters
critical true if the extension is to be treated as critical.
value an array of DER encoded bytes of the actual value.
Throws
ClassCastException if value is not an array of bytes
IOException on error.

public NetscapeCertTypeExtension ()

Create a default key usage.

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 DerOutputStream.

Parameters
out the DerOutputStream 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 boolean[] getKeyUsageMappedBits ()

Get a boolean array representing the bits of this extension, as it maps to the KeyUsage extension.

Returns
  • the bit values of this extension mapped to the bit values of the KeyUsage extension as an array of booleans.

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 NetscapeCertType.

Returns
  • a string representation of the object.