iaik.pkcs.pkcs12
Class CertificateBag
java.lang.Object
|
+--iaik.pkcs.pkcs12.Attributes
|
+--iaik.pkcs.pkcs12.SafeBag
|
+--iaik.pkcs.pkcs12.CertificateBag
- public class CertificateBag
- extends SafeBag
This class contains a certificate and any associated attributes.
- See Also:
SafeBag,
Attributes
|
Constructor Summary |
protected |
CertificateBag()
Default constructor. |
|
CertificateBag(X509Certificate certificate)
Creates a new CertificateBag from an alreay existing
certificate. |
|
CertificateBag(X509Certificate certificate,
java.lang.String friendlyName,
byte[] localKeyID)
Creates a new CertificateBag from an alreay existing
certificate, a friendlyName and a locakKeyID. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
CertificateBag
protected CertificateBag()
- Default constructor.
CertificateBag
public CertificateBag(X509Certificate certificate)
- Creates a new CertificateBag from an alreay existing
certificate.
CertificateBag
public CertificateBag(X509Certificate certificate,
java.lang.String friendlyName,
byte[] localKeyID)
- Creates a new CertificateBag from an alreay existing
certificate, a friendlyName and a locakKeyID.
getCertificates
public static X509Certificate[] getCertificates(CertificateBag[] certificates)
- This method can be used to convert a CertificateBag array to
a Certificate array.
- Parameters:
certificates - the certificates as PKCS12 certs- Returns:
- the certificates as Certificate array
getCertificate
public X509Certificate getCertificate()
- Returns the certificate of this CertificateBag.
decode
public void decode(ASN1Object obj)
throws CodingException
- Decodes the CertificateBag given as ASN1Object.
- Parameters:
obj - the CertificateBag as ASN1Object- Throws:
- CodingException - if the CertificateBag cannot be decoded
toASN1Object
public ASN1Object toASN1Object()
throws CodingException
- Returns this CertificateBag as ASN1Object.
- Returns:
- this CertificateBag as ASN1Object
toString
public java.lang.String toString()
- Returns a String representation of this CertificateBag.
- Overrides:
- toString in class SafeBag