1 7 8 package java.security.cert; 9 10 import java.math.BigInteger ; 11 import java.util.Date ; 12 import java.util.Set ; 13 14 import javax.security.auth.x500.X500Principal ; 15 16 49 50 public abstract class X509CRLEntry implements X509Extension { 51 52 63 public boolean equals(Object other) { 64 if (this == other) 65 return true; 66 if (!(other instanceof X509CRLEntry )) 67 return false; 68 try { 69 byte[] thisCRLEntry = this.getEncoded(); 70 byte[] otherCRLEntry = ((X509CRLEntry )other).getEncoded(); 71 72 if (thisCRLEntry.length != otherCRLEntry.length) 73 return false; 74 for (int i = 0; i < thisCRLEntry.length; i++) 75 if (thisCRLEntry[i] != otherCRLEntry[i]) 76 return false; 77 } catch (CRLException ce) { 78 return false; 79 } 80 return true; 81 } 82 83 89 public int hashCode() { 90 int retval = 0; 91 try { 92 byte[] entryData = this.getEncoded(); 93 for (int i = 1; i < entryData.length; i++) 94 retval += entryData[i] * i; 95 96 } catch (CRLException ce) { 97 return(retval); 98 } 99 return(retval); 100 } 101 102 109 public abstract byte[] getEncoded() throws CRLException ; 110 111 117 public abstract BigInteger getSerialNumber(); 118 119 133 public X500Principal getCertificateIssuer() { 134 return null; 135 } 136 137 143 public abstract Date getRevocationDate(); 144 145 150 public abstract boolean hasExtensions(); 151 152 157 public abstract String toString(); 158 } 159 | Popular Tags |