codec.pkcs12
Class CertBag
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.ArrayList
|
+--codec.asn1.ASN1AbstractCollection
|
+--codec.asn1.ASN1Sequence
|
+--codec.pkcs12.CertBag
- All Implemented Interfaces:
- ASN1Collection, ASN1RegisteredType, ASN1Type, Cloneable, Collection, Externalizable, List, Serializable
- public class CertBag
- extends ASN1Sequence
- implements ASN1RegisteredType, Serializable
This class represents a certBag as defined in PKCS#12.
The ASN.1 definition of this structure is
certBag ::= SEQUENCE {
certId BAG-TYPE.&id ({CertTypes}),
certValue [0] EXPLICIT BAG-TYPE.&Type ({CertTypes}{@certId})
}
x509Certificate BAG-TYPE::=
{OCTET STRING IDENTIFIED BY {certTypes 1}} -- DER encoded X.509 certificate stored in OCTET STRING
sdsiCertificate BAG-TYPE::=
{IA5String IDENTIFIED BY {certTypes 2}} -- Base64 encoded SDSI certificate stored in IA5String
CertTypes BAG-TYPE::={
x509Certificate|
sdsiCertificate|
... -- For future extensions
- Version:
- "$Id: CertBag.java,v 1.4 2005/03/22 14:01:56 flautens Exp $"
- Author:
- Michele Boivin
- See Also:
- Serialized Form
| Methods inherited from class codec.asn1.ASN1AbstractCollection |
checkConstraints, encode, getCollection, getConstraint, getTagClass, getValue, isExplicit, isOptional, isType, readExternal, setConstraint, setExplicit, setOptional, toString, writeExternal |
| Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from interface codec.asn1.ASN1Type |
checkConstraints, encode, getConstraint, getTag, getTagClass, getValue, isExplicit, isOptional, isType, setConstraint, setExplicit, setOptional |
| Methods inherited from interface java.util.Collection |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
reg_
protected PKCS12OIDRegistry reg_
- DOCUMENT ME!
CertBag
public CertBag()
- The default constructor.
CertBag
public CertBag(X509Certificate cert)
throws CertificateEncodingException
- Constructor for a x.509 certBag. The octet string holds the DER encoded
x.509 certificate.
- Parameters:
cert - the certicifate
decode
public void decode(Decoder decoder)
throws ASN1Exception,
IOException
- Decodes this instance. This method extracts the actual content type from
the
ASN1OpenType.
- Specified by:
decode in interface ASN1Type- Overrides:
decode in class ASN1AbstractCollection
- Parameters:
decoder - The Decoder to use.
getCertId
public ASN1ObjectIdentifier getCertId()
- Returns:
- The OID describing the
certValue of this
structure.
getCertificate
public X509Certificate getCertificate()
throws CertificateException
- Returns:
- The value of the certficate bag. In case of a x509 certificate
the ASN1OctetString holding the DER encoded x509certificate.
getCertValue
public ASN1Type getCertValue()
- Returns:
- The value of the certficate bag. In case of a x509 certificate
the ASN1OctetString holding the DER encoded x509certificate.
getOID
public ASN1ObjectIdentifier getOID()
- Description copied from interface:
ASN1RegisteredType
- This method returns the official OID that identifies this ASN.1 type.
- Specified by:
getOID in interface ASN1RegisteredType
- Returns:
- the OID for this bag type.
Copyright © Fraunhofer Gesellschaft. All Rights Reserved.