public class CertificateVersion
extends java.lang.Object
implements com.tencent.kona.sun.security.util.DerEncoder
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
static int |
V1
X509Certificate Version 1
|
static int |
V2
X509Certificate Version 2
|
static int |
V3
X509Certificate Version 3
|
| Constructor and Description |
|---|
CertificateVersion()
The default constructor for this class,
sets the version to 0 (i.e.
|
CertificateVersion(com.tencent.kona.sun.security.util.DerInputStream in)
Create the object, decoding the values from the passed DER stream.
|
CertificateVersion(com.tencent.kona.sun.security.util.DerValue val)
Create the object, decoding the values from the passed DerValue.
|
CertificateVersion(java.io.InputStream in)
Create the object, decoding the values from the passed stream.
|
CertificateVersion(int version)
The constructor for this class for the required version.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(int vers)
Compare versions.
|
void |
encode(com.tencent.kona.sun.security.util.DerOutputStream out)
Encode the CertificateVersion period in DER form to the stream.
|
int |
getVersion() |
java.lang.String |
toString()
Return the version number of the certificate.
|
public static final int V1
public static final int V2
public static final int V3
public static final java.lang.String NAME
public CertificateVersion()
public CertificateVersion(int version)
throws java.io.IOException
version - the version for the certificate.java.io.IOException - if the version is not valid.public CertificateVersion(com.tencent.kona.sun.security.util.DerInputStream in)
throws java.io.IOException
in - the DerInputStream to read the CertificateVersion from.java.io.IOException - on decoding errors.public CertificateVersion(java.io.InputStream in)
throws java.io.IOException
in - the InputStream to read the CertificateVersion from.java.io.IOException - on decoding errors.public CertificateVersion(com.tencent.kona.sun.security.util.DerValue val)
throws java.io.IOException
val - the Der encoded value.java.io.IOException - on decoding errors.public int getVersion()
public java.lang.String toString()
toString in class java.lang.Objectpublic void encode(com.tencent.kona.sun.security.util.DerOutputStream out)
encode in interface com.tencent.kona.sun.security.util.DerEncoderout - the DerOutputStream to marshal the contents to.public int compare(int vers)