public class NetscapeCertTypeExtension extends Extension implements CertAttrSet<java.lang.String>
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.
Extension,
CertAttrSet| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
IDENT
Identifier for this attribute, to be used with the
get, set, delete methods of Certificate, x509 type.
|
static java.lang.String |
NAME
Attribute names.
|
static ObjectIdentifier |
NetscapeCertType_Id
Object identifier for the Netscape-Cert-Type extension.
|
static java.lang.String |
OBJECT_SIGNING |
static java.lang.String |
OBJECT_SIGNING_CA |
static java.lang.String |
S_MIME |
static java.lang.String |
S_MIME_CA |
static java.lang.String |
SSL_CA |
static java.lang.String |
SSL_CLIENT |
static java.lang.String |
SSL_SERVER |
critical, extensionId, extensionValue| Constructor and Description |
|---|
NetscapeCertTypeExtension()
Create a default key usage.
|
NetscapeCertTypeExtension(boolean[] bitString)
Create a NetscapeCertTypeExtension with the passed bit settings.
|
NetscapeCertTypeExtension(java.lang.Boolean critical,
java.lang.Object value)
Create the extension from the passed DER encoded value of the same.
|
NetscapeCertTypeExtension(byte[] bitString)
Create a NetscapeCertTypeExtension with the passed bit settings.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete(java.lang.String name)
Delete the attribute value.
|
void |
encode(java.io.OutputStream out)
Write the extension to the DerOutputStream.
|
java.lang.Object |
get(java.lang.String name)
Get the attribute value.
|
java.util.Enumeration<java.lang.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.
|
java.lang.String |
getName()
Return the name of this attribute.
|
void |
set(java.lang.String name,
java.lang.Object obj)
Set the attribute value.
|
java.lang.String |
toString()
Returns a printable representation of the NetscapeCertType.
|
encode, equals, getExtensionId, getExtensionValue, hashCode, isCriticalpublic static final java.lang.String IDENT
public static final java.lang.String NAME
public static final java.lang.String SSL_CLIENT
public static final java.lang.String SSL_SERVER
public static final java.lang.String S_MIME
public static final java.lang.String OBJECT_SIGNING
public static final java.lang.String SSL_CA
public static final java.lang.String S_MIME_CA
public static final java.lang.String OBJECT_SIGNING_CA
public static ObjectIdentifier NetscapeCertType_Id
public NetscapeCertTypeExtension(byte[] bitString)
throws java.io.IOException
bitString - the bits to be set for the extension.java.io.IOExceptionpublic NetscapeCertTypeExtension(boolean[] bitString)
throws java.io.IOException
bitString - the bits to be set for the extension.java.io.IOExceptionpublic NetscapeCertTypeExtension(java.lang.Boolean critical,
java.lang.Object value)
throws java.io.IOException
critical - true if the extension is to be treated as critical.value - an array of DER encoded bytes of the actual value.java.lang.ClassCastException - if value is not an array of bytesjava.io.IOException - on error.public NetscapeCertTypeExtension()
public void set(java.lang.String name,
java.lang.Object obj)
throws java.io.IOException
set in interface CertAttrSet<java.lang.String>name - the name of the attribute (e.g. "x509.info.key")obj - the attribute object.java.io.IOException - on other errors.public java.lang.Object get(java.lang.String name)
throws java.io.IOException
get in interface CertAttrSet<java.lang.String>name - the name of the attribute to return.java.io.IOException - on other errors.public void delete(java.lang.String name)
throws java.io.IOException
delete in interface CertAttrSet<java.lang.String>name - the name of the attribute to delete.java.io.IOException - on other errors.public java.lang.String toString()
toString in interface CertAttrSet<java.lang.String>toString in class Extensionpublic void encode(java.io.OutputStream out)
throws java.io.IOException
encode in interface CertAttrSet<java.lang.String>out - the DerOutputStream to write the extension to.java.io.IOException - on encoding errors.public java.util.Enumeration<java.lang.String> getElements()
getElements in interface CertAttrSet<java.lang.String>public java.lang.String getName()
getName in interface CertAttrSet<java.lang.String>public boolean[] getKeyUsageMappedBits()
Copyright © 2020. All Rights Reserved.