diff options
author | Roberto Tyley <roberto.tyley@gmail.com> | 2014-07-15 01:38:01 +0400 |
---|---|---|
committer | Roberto Tyley <roberto.tyley@gmail.com> | 2014-07-26 11:23:17 +0400 |
commit | 7cb752aaf746dc0b473afeb9e892b7fbc12666c5 (patch) | |
tree | cc4f91ddc18332b5adbe82e3fcb040d976c90105 /prov/src/main/java/org/spongycastle/x509/X509AttributeCertificate.java | |
parent | 551830f8ea5177042af2c7dd1fc90888bc67387d (diff) |
Execute become-spongy.sh
https://github.com/rtyley/spongycastle/blob/3040af/become-spongy.sh
Diffstat (limited to 'prov/src/main/java/org/spongycastle/x509/X509AttributeCertificate.java')
-rw-r--r-- | prov/src/main/java/org/spongycastle/x509/X509AttributeCertificate.java | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/prov/src/main/java/org/spongycastle/x509/X509AttributeCertificate.java b/prov/src/main/java/org/spongycastle/x509/X509AttributeCertificate.java new file mode 100644 index 00000000..bad47225 --- /dev/null +++ b/prov/src/main/java/org/spongycastle/x509/X509AttributeCertificate.java @@ -0,0 +1,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; +} |