blob: cf65ed0b6c8f8f55bedc725ca9aefbff052e7275 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
package java.security.cert;
import java.math.BigInteger;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.Principal;
import java.security.PublicKey;
import java.security.SignatureException;
import java.util.Date;
import java.util.Set;
public abstract class X509CRL extends CRL implements X509Extension
{
protected X509CRL()
{
super("X.509");
}
public boolean equals(Object other)
{
if ( this == other )
return true;
if ( !(other instanceof X509CRL) )
return false;
try
{
byte[] enc1 = getEncoded();
byte[] enc2 = ((X509CRL)other).getEncoded();
return MessageDigest.isEqual(enc1, enc2);
}
catch (CRLException e)
{
return false;
}
}
public int hashCode()
{
int hashcode = 0;
try
{
byte[] encoded = getEncoded();
for (int i = 1; i < encoded.length; i++)
{
hashcode += encoded[i] * i;
}
}
catch (CRLException ce)
{
return(hashcode);
}
return(hashcode);
}
public abstract byte[] getEncoded() throws CRLException;
public abstract Principal getIssuerDN();
public abstract Date getNextUpdate();
public abstract X509CRLEntry getRevokedCertificate(BigInteger serialNumber);
public abstract Set getRevokedCertificates();
public abstract String getSigAlgName();
public abstract String getSigAlgOID();
public abstract byte[] getSigAlgParams();
public abstract byte[] getSignature();
public abstract byte[] getTBSCertList() throws CRLException;
public abstract Date getThisUpdate();
public abstract int getVersion();
public abstract void verify(PublicKey key) throws CRLException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException;
public abstract void verify(PublicKey key, String sigProvider) throws CRLException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException;
}
|