public class NetscapeCertTypeExtension extends Extension
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| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
static com.tencent.kona.sun.security.util.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 |
encode(com.tencent.kona.sun.security.util.DerOutputStream out)
Write the extension to the DerOutputStream.
|
boolean |
get(java.lang.String name)
Get the attribute value.
|
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 extension.
|
void |
set(java.lang.String name,
java.lang.Boolean val)
Set the attribute value.
|
java.lang.String |
toString()
Returns a printable representation of the NetscapeCertType.
|
encode, equals, getExtensionId, getExtensionValue, getId, getValue, hashCode, isCritical, newExtensionpublic 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 com.tencent.kona.sun.security.util.ObjectIdentifier NetscapeCertType_Id
public NetscapeCertTypeExtension(byte[] bitString)
bitString - the bits to be set for the extension.public NetscapeCertTypeExtension(boolean[] bitString)
bitString - the bits to be set for the extension.public 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.Boolean val)
throws java.io.IOException
java.io.IOExceptionpublic boolean get(java.lang.String name)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
public void encode(com.tencent.kona.sun.security.util.DerOutputStream out)
public java.lang.String getName()
public boolean[] getKeyUsageMappedBits()