blob: bad4722537257bec777953c74f2dc9b4f5b2c438 (
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
package org.spongycastle.x509;
import java.io.IOException;
import java.math.BigInteger;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PublicKey;
import java.security.SignatureException;
import java.security.cert.CertificateException;
import java.security.cert.CertificateExpiredException;
import java.security.cert.CertificateNotYetValidException;
import java.security.cert.X509Extension;
import java.util.Date;
/**
* Interface for an X.509 Attribute Certificate.
* @deprecated use X509CertificateHolder class in the PKIX package.
*/
public interface X509AttributeCertificate
extends X509Extension
{
/**
* Return the version number for the certificate.
*
* @return the version number.
*/
public int getVersion();
/**
* Return the serial number for the certificate.
*
* @return the serial number.
*/
public BigInteger getSerialNumber();
/**
* Return the date before which the certificate is not valid.
*
* @return the "not valid before" date.
*/
public Date getNotBefore();
/**
* Return the date after which the certificate is not valid.
*
* @return the "not valid afer" date.
*/
public Date getNotAfter();
/**
* Return the holder of the certificate.
*
* @return the holder.
*/
public AttributeCertificateHolder getHolder();
/**
* Return the issuer details for the certificate.
*
* @return the issuer details.
*/
public AttributeCertificateIssuer getIssuer();
/**
* Return the attributes contained in the attribute block in the certificate.
*
* @return an array of attributes.
*/
public X509Attribute[] getAttributes();
/**
* Return the attributes with the same type as the passed in oid.
*
* @param oid the object identifier we wish to match.
* @return an array of matched attributes, null if there is no match.
*/
public X509Attribute[] getAttributes(String oid);
public boolean[] getIssuerUniqueID();
public void checkValidity()
throws CertificateExpiredException, CertificateNotYetValidException;
public void checkValidity(Date date)
throws CertificateExpiredException, CertificateNotYetValidException;
public byte[] getSignature();
public void verify(PublicKey key, String provider)
throws CertificateException, NoSuchAlgorithmException,
InvalidKeyException, NoSuchProviderException, SignatureException;
/**
* Return an ASN.1 encoded byte array representing the attribute certificate.
*
* @return an ASN.1 encoded byte array.
* @throws IOException if the certificate cannot be encoded.
*/
public byte[] getEncoded()
throws IOException;
}
|