|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.security.cert.Certificate
org.openpermis.cert.AttributeCertificate
public class AttributeCertificate
This class represents an attribute certificate.
Since there is no equivalent in the Java JCE, this implementation uses some code if the
Bouncycastle cryptographic library but also implements Certificate
.
The used Bouncycastle library uses itself the JCE for cryptographic operations such as
digital signature verification.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.security.cert.Certificate |
---|
Certificate.CertificateRep |
Constructor Summary | |
---|---|
AttributeCertificate(byte[] derEncoded)
Decodes an X.509 attribute certificate from the given byte array representing a DER encoded (ASN.1 representation) certificate. |
|
AttributeCertificate(InputStream derStream)
Decodes an X.509 attribute certificate from the given DER stream (ASN.1 representation) of the certificate. |
Method Summary | |
---|---|
org.bouncycastle.x509.X509Attribute[] |
getAttributes()
Return the attributes contained in the attribute block in the certificate. |
org.bouncycastle.x509.X509Attribute[] |
getAttributes(String oid)
Return the attributes with the same type as the passed in oid. |
Set<String> |
getCriticalExtensionOIDs()
|
byte[] |
getEncoded()
|
byte[] |
getExtensionValue(String arg0)
|
org.bouncycastle.x509.AttributeCertificateHolder |
getHolder()
Return the holder of the certificate. |
org.bouncycastle.x509.AttributeCertificateIssuer |
getIssuer()
Return the issuer details for the certificate. |
Set<String> |
getNonCriticalExtensionOIDs()
|
Date |
getNotAfter()
Return the date after which the certificate is not valid. |
Date |
getNotBefore()
Return the date before which the certificate is not valid. |
PublicKey |
getPublicKey()
|
boolean |
hasUnsupportedCriticalExtension()
|
String |
toString()
|
void |
verify(PublicKey publicKey)
|
void |
verify(PublicKey publicKey,
String provider)
|
Methods inherited from class java.security.cert.Certificate |
---|
equals, getType, hashCode, writeReplace |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AttributeCertificate(InputStream derStream) throws IOException
derStream
- The input stream containing the DER encoded certificate.
IOException
- Thrown if the stream cannot be read or the certificate cannot be
decoded.public AttributeCertificate(byte[] derEncoded) throws IOException
derEncoded
- A byte array containing the DER encoded certificate.
IOException
- Thrown if the certificate cannot be decoded.Method Detail |
---|
public Date getNotBefore()
public Date getNotAfter()
public org.bouncycastle.x509.X509Attribute[] getAttributes()
public org.bouncycastle.x509.X509Attribute[] getAttributes(String oid)
oid
- the object identifier we wish to match.
public org.bouncycastle.x509.AttributeCertificateIssuer getIssuer()
public org.bouncycastle.x509.AttributeCertificateHolder getHolder()
public byte[] getEncoded() throws CertificateEncodingException
getEncoded
in class Certificate
CertificateEncodingException
public PublicKey getPublicKey()
getPublicKey
in class Certificate
public String toString()
toString
in class Certificate
public void verify(PublicKey publicKey) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException
verify
in class Certificate
CertificateException
NoSuchAlgorithmException
InvalidKeyException
NoSuchProviderException
SignatureException
public void verify(PublicKey publicKey, String provider) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException
verify
in class Certificate
CertificateException
NoSuchAlgorithmException
InvalidKeyException
NoSuchProviderException
SignatureException
public Set<String> getCriticalExtensionOIDs()
getCriticalExtensionOIDs
in interface X509Extension
public byte[] getExtensionValue(String arg0)
getExtensionValue
in interface X509Extension
public Set<String> getNonCriticalExtensionOIDs()
getNonCriticalExtensionOIDs
in interface X509Extension
public boolean hasUnsupportedCriticalExtension()
hasUnsupportedCriticalExtension
in interface X509Extension
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:10
Copyright (c) 2002-2007 Ergon Informatik AG