public class CertificateExtensions
extends java.lang.Object
implements com.tencent.kona.sun.security.util.DerEncoder
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
| Constructor and Description |
|---|
CertificateExtensions()
Default constructor.
|
CertificateExtensions(com.tencent.kona.sun.security.util.DerInputStream in)
Create the object, decoding the values from the passed DER stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete(java.lang.String name)
Delete the extension value.
|
void |
encode(com.tencent.kona.sun.security.util.DerOutputStream 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(com.tencent.kona.sun.security.util.DerOutputStream out,
boolean isCertReq)
Encode the extensions in DER form to the stream.
|
boolean |
equals(java.lang.Object other)
Compares this CertificateExtensions for equality with the specified
object.
|
java.util.Collection<Extension> |
getAllExtensions()
Return a collection view of the extensions.
|
Extension |
getExtension(java.lang.String alias)
Get the extension with this alias.
|
java.lang.String |
getNameByOid(com.tencent.kona.sun.security.util.ObjectIdentifier oid) |
java.util.Map<java.lang.String,Extension> |
getUnparseableExtensions() |
int |
hashCode()
Returns a hashcode value for this CertificateExtensions.
|
boolean |
hasUnsupportedCriticalExtension()
Return true if a critical extension is found that is
not supported, otherwise return false.
|
void |
setExtension(java.lang.String name,
Extension ext)
Set the extension value.
|
java.lang.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). |
public static final java.lang.String NAME
public CertificateExtensions()
public CertificateExtensions(com.tencent.kona.sun.security.util.DerInputStream in)
throws java.io.IOException
in - the DerInputStream to read the Extension from.java.io.IOException - on decoding errors.public void encode(com.tencent.kona.sun.security.util.DerOutputStream out)
encode in interface com.tencent.kona.sun.security.util.DerEncoderpublic void encode(com.tencent.kona.sun.security.util.DerOutputStream out,
boolean isCertReq)
out - the DerOutputStream to marshal the contents to.isCertReq - if true then no context specific tag is added.public void setExtension(java.lang.String name,
Extension ext)
name - the extension name used in the cache.ext - the extension to set.public Extension getExtension(java.lang.String alias)
alias - the identifier string for the extension to retrieve.
Could be one of "x509.info.extensions.ExtensionName",
"ExtensionName", "2.3.4.5".public void delete(java.lang.String name)
throws java.io.IOException
name - the extension name used in the lookup.java.io.IOException - if named extension is not found.public java.lang.String getNameByOid(com.tencent.kona.sun.security.util.ObjectIdentifier oid)
public java.util.Collection<Extension> getAllExtensions()
public java.util.Map<java.lang.String,Extension> getUnparseableExtensions()
public boolean hasUnsupportedCriticalExtension()
public boolean equals(java.lang.Object other)
other object is an
instanceof CertificateExtensions, then
all the entries are compared with the entries from this.equals in class java.lang.Objectother - the object to test for equality with this
CertificateExtensions.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
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.
toString in class java.lang.Object