java.lang.Object | ||
↳ | javax.security.cert.Certificate | |
↳ | javax.security.cert.X509Certificate |
Abstract base class for X.509 certificates.
This represents a standard way for accessing the attributes of X.509 v1 certificates.
Note: This package is provided only for compatibility reasons. It contains a simplified version of the java.security.cert package that was previously used by JSSE (Java SSL package). All applications that do not have to be compatible with older versions of JSSE (that is before Java SDK 1.5) should only use java.security.cert.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new
X509Certificate . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Checks whether the certificate is currently valid.
| |||||||||||
Checks whether the certificate is valid at the specified date.
| |||||||||||
Creates a new
X509Certificate and initializes it from the
specified byte array. | |||||||||||
Creates a new
X509Certificate and initializes it from the
specified input stream. | |||||||||||
Returns the
issuer (issuer distinguished name) as an
implementation specific Principal object. | |||||||||||
Returns the
notAfter date of the validity period of the
certificate. | |||||||||||
Returns the
notBefore date from the validity period of the
certificate. | |||||||||||
Returns the
serialNumber of the certificate. | |||||||||||
Returns the name of the algorithm for the certificate signature.
| |||||||||||
Returns the OID of the signature algorithm from the certificate.
| |||||||||||
Returns the parameters of the signature algorithm in DER-encoded format.
| |||||||||||
Returns the
subject (subject distinguished name) as an
implementation specific Principal object. | |||||||||||
Returns the certificates
version (version number). |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class javax.security.cert.Certificate
| |||||||||||
From class java.lang.Object
|
Checks whether the certificate is currently valid.
The validity defined in ASN.1:
validity Validity Validity ::= SEQUENCE { notBefore CertificateValidityDate, notAfter CertificateValidityDate } CertificateValidityDate ::= CHOICE { utcTime UTCTime, generalTime GeneralizedTime }
CertificateExpiredException | if the certificate has expired. |
---|---|
CertificateNotYetValidException | if the certificate is not yet valid. |
Checks whether the certificate is valid at the specified date.
date | the date to check the validity against. |
---|
CertificateExpiredException | if the certificate has expired. |
---|---|
CertificateNotYetValidException | if the certificate is not yet valid. |
Creates a new X509Certificate
and initializes it from the
specified byte array.
certData | byte array containing data to initialize the certificate. |
---|
CertificateException | if the certificate cannot be created or initialized. |
---|
Creates a new X509Certificate
and initializes it from the
specified input stream.
inStream | input stream containing data to initialize the certificate. |
---|
CertificateException | if the certificate cannot be created or initialized. |
---|
Returns the issuer
(issuer distinguished name) as an
implementation specific Principal
object.
The ASN.1 definition of issuer
:
issuer Name Name ::= CHOICE { RDNSequence } RDNSequence ::= SEQUENCE OF RelativeDistinguishedName RelativeDistinguishedName ::= SET OF AttributeTypeAndValue AttributeTypeAndValue ::= SEQUENCE { type AttributeType, value AttributeValue } AttributeType ::= OBJECT IDENTIFIER AttributeValue ::= ANY DEFINED BY AttributeType
issuer
as an implementation specific Principal
.Returns the notAfter
date of the validity period of the
certificate.
Returns the notBefore
date from the validity period of the
certificate.
Returns the serialNumber
of the certificate.
The ASN.1 definition of serialNumber
:
CertificateSerialNumber ::= INTEGER
Returns the name of the algorithm for the certificate signature.
Returns the OID of the signature algorithm from the certificate.
Returns the parameters of the signature algorithm in DER-encoded format.
Returns the subject
(subject distinguished name) as an
implementation specific Principal
object.
The ASN.1 definition of subject
:
subject Name Name ::= CHOICE { RDNSequence } RDNSequence ::= SEQUENCE OF RelativeDistinguishedName RelativeDistinguishedName ::= SET OF AttributeTypeAndValue AttributeTypeAndValue ::= SEQUENCE { type AttributeType, value AttributeValue } AttributeType ::= OBJECT IDENTIFIER AttributeValue ::= ANY DEFINED BY AttributeType
subject
(subject distinguished name).Returns the certificates version
(version number).
The version defined is ASN.1:
Version ::= INTEGER { v1(0), v2(1), v3(2) }