Methods Summary |
---|
public abstract void | checkValidity()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 }
|
public abstract void | checkValidity(java.util.Date date)Checks whether the certificate is valid at the specified date.
|
public abstract int | getBasicConstraints()Returns the path length of the certificate constraints from the {@code
BasicContraints} extension.
|
public java.util.List | getExtendedKeyUsage()Returns a read-only list of OID strings representing the {@code
ExtKeyUsageSyntax} field of the extended key usage extension.
return null;
|
public java.util.Collection | getIssuerAlternativeNames()Returns a read-only list of the issuer alternative names from the {@code
IssuerAltName} extension.
The ASN.1 definition of {@code IssuerAltName}:
IssuerAltName ::= GeneralNames
GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
GeneralName ::= CHOICE {
otherName [0] AnotherName,
rfc822Name [1] IA5String,
dNSName [2] IA5String,
x400Address [3] ORAddress,
directoryName [4] Name,
ediPartyName [5] EDIPartyName,
uniformResourceIdentifier [6] IA5String,
iPAddress [7] OCTET STRING,
registeredID [8] OBJECT IDENTIFIER }
return null;
|
public abstract java.security.Principal | getIssuerDN()Returns the {@code issuer} (issuer distinguished name) as an
implementation specific {@code Principal} object.
The ASN.1 definition of {@code 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
replaced by: {@link #getIssuerX500Principal()}.
|
public abstract boolean[] | getIssuerUniqueID()Returns the {@code issuerUniqueID} from the certificate.
|
public javax.security.auth.x500.X500Principal | getIssuerX500Principal()Returns the {@code issuer} (issuer distinguished name) as an {@code
X500Principal}.
try {
// TODO if there is no X.509 certificate provider installed
// should we try to access Harmony X509CertImpl via classForName?
CertificateFactory factory = CertificateFactory
.getInstance("X.509"); //$NON-NLS-1$
X509Certificate cert = (X509Certificate) factory
.generateCertificate(new ByteArrayInputStream(getEncoded()));
return cert.getIssuerX500Principal();
} catch (Exception e) {
throw new RuntimeException(Messages.getString("security.59"), e); //$NON-NLS-1$
}
|
public abstract boolean[] | getKeyUsage()Returns the {@code KeyUsage} extension as a {@code boolean} array.
The ASN.1 definition of {@code KeyUsage}:
KeyUsage ::= BIT STRING {
digitalSignature (0),
nonRepudiation (1),
keyEncipherment (2),
dataEncipherment (3),
keyAgreement (4),
keyCertSign (5),
cRLSign (6),
encipherOnly (7),
decipherOnly (8) }
|
public abstract java.util.Date | getNotAfter()Returns the {@code notAfter} date of the validity period of the
certificate.
|
public abstract java.util.Date | getNotBefore()Returns the {@code notBefore} date from the validity period of the
certificate.
|
public abstract java.math.BigInteger | getSerialNumber()Returns the {@code serialNumber} of the certificate.
The ASN.1 definition of {@code serialNumber}:
CertificateSerialNumber ::= INTEGER
|
public abstract java.lang.String | getSigAlgName()Returns the name of the algorithm for the certificate signature.
|
public abstract java.lang.String | getSigAlgOID()Returns the OID of the signature algorithm from the certificate.
|
public abstract byte[] | getSigAlgParams()Returns the parameters of the signature algorithm in DER-encoded format.
|
public abstract byte[] | getSignature()Returns the raw signature bits from the certificate.
|
public java.util.Collection | getSubjectAlternativeNames()Returns a read-only list of the subject alternative names from the
{@code SubjectAltName} extension.
The ASN.1 definition of {@code SubjectAltName}:
SubjectAltName ::= GeneralNames
GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
GeneralName ::= CHOICE {
otherName [0] AnotherName,
rfc822Name [1] IA5String,
dNSName [2] IA5String,
x400Address [3] ORAddress,
directoryName [4] Name,
ediPartyName [5] EDIPartyName,
uniformResourceIdentifier [6] IA5String,
iPAddress [7] OCTET STRING,
registeredID [8] OBJECT IDENTIFIER }
return null;
|
public abstract java.security.Principal | getSubjectDN()Returns the {@code subject} (subject distinguished name) as an
implementation specific {@code Principal} object.
The ASN.1 definition of {@code 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
replaced by: {@link #getSubjectX500Principal()}.
|
public abstract boolean[] | getSubjectUniqueID()Returns the {@code subjectUniqueID} from the certificate.
|
public javax.security.auth.x500.X500Principal | getSubjectX500Principal()Returns the {@code subject} (subject distinguished name) as an {@code
X500Principal}.
try {
// TODO if there is no X.509 certificate provider installed
// should we try to access Harmony X509CertImpl via classForName?
CertificateFactory factory = CertificateFactory
.getInstance("X.509"); //$NON-NLS-1$
X509Certificate cert = (X509Certificate) factory
.generateCertificate(new ByteArrayInputStream(getEncoded()));
return cert.getSubjectX500Principal();
} catch (Exception e) {
throw new RuntimeException(Messages.getString("security.5A"), e); //$NON-NLS-1$
}
|
public abstract byte[] | getTBSCertificate()Returns the {@code tbsCertificate} information from this certificate in
DER-encoded format.
|
public abstract int | getVersion()Returns the certificates {@code version} (version number).
The version defined is ASN.1:
Version ::= INTEGER { v1(0), v2(1), v3(2) }
|