FileDocCategorySizeDatePackage
X509CRLEntry.javaAPI DocJava SE 5 API4628Fri Aug 26 14:57:18 BST 2005java.security.cert

X509CRLEntry

public abstract class X509CRLEntry extends Object implements X509Extension

Abstract class for a revoked certificate in a CRL (Certificate Revocation List). The ASN.1 definition for revokedCertificates is:

revokedCertificates SEQUENCE OF SEQUENCE {
userCertificate CertificateSerialNumber,
revocationDate ChoiceOfTime,
crlEntryExtensions Extensions OPTIONAL
-- if present, must be v2
} OPTIONAL

CertificateSerialNumber ::= INTEGER

Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension

Extension ::= SEQUENCE { extnId OBJECT IDENTIFIER, critical BOOLEAN DEFAULT FALSE, extnValue OCTET STRING -- contains a DER encoding of a value -- of the type registered for use with -- the extnId object identifier value }

see
X509CRL
see
X509Extension
author
Hemma Prafullchandra
version
1.16 03/12/19

Fields Summary
Constructors Summary
Methods Summary
public booleanequals(java.lang.Object other)
Compares this CRL entry for equality with the given object. If the other object is an instanceof X509CRLEntry, then its encoded form (the inner SEQUENCE) is retrieved and compared with the encoded form of this CRL entry.

param
other the object to test for equality with this CRL entry.
return
true iff the encoded forms of the two CRL entries match, false otherwise.

        if (this == other)
            return true;
        if (!(other instanceof X509CRLEntry))
            return false;
        try {
            byte[] thisCRLEntry = this.getEncoded();
            byte[] otherCRLEntry = ((X509CRLEntry)other).getEncoded();

            if (thisCRLEntry.length != otherCRLEntry.length)
                return false;
            for (int i = 0; i < thisCRLEntry.length; i++)
                 if (thisCRLEntry[i] != otherCRLEntry[i])
                     return false;
        } catch (CRLException ce) {
            return false;
        }
        return true;
    
public javax.security.auth.x500.X500PrincipalgetCertificateIssuer()
Get the issuer of the X509Certificate described by this entry. If the certificate issuer is also the CRL issuer, this method returns null.

This method is used with indirect CRLs. The default implementation always returns null. Subclasses that wish to support indirect CRLs should override it.

return
the issuer of the X509Certificate described by this entry or null if it is issued by the CRL issuer.
since
1.5

	return null;
    
public abstract byte[]getEncoded()
Returns the ASN.1 DER-encoded form of this CRL Entry, that is the inner SEQUENCE.

return
the encoded form of this certificate
exception
CRLException if an encoding error occurs.

public abstract java.util.DategetRevocationDate()
Gets the revocation date from this X509CRLEntry, the revocationDate.

return
the revocation date.

public abstract java.math.BigIntegergetSerialNumber()
Gets the serial number from this X509CRLEntry, the userCertificate.

return
the serial number.

public abstract booleanhasExtensions()
Returns true if this CRL entry has extensions.

return
true if this entry has extensions, false otherwise.

public inthashCode()
Returns a hashcode value for this CRL entry from its encoded form.

return
the hashcode value.

        int     retval = 0;
        try {
            byte[] entryData = this.getEncoded();
            for (int i = 1; i < entryData.length; i++)
                 retval += entryData[i] * i;

        } catch (CRLException ce) {
            return(retval);
        }
        return(retval);
    
public abstract java.lang.StringtoString()
Returns a string representation of this CRL entry.

return
a string representation of this CRL entry.