FileDocCategorySizeDatePackage
SignedDataParser.javaAPI DocBouncy Castle Crypto API 1.41 (Java 1.5)3057Wed Oct 01 10:55:30 BST 2008org.bouncycastle.sasn1.cms

SignedDataParser

public class SignedDataParser extends Object
SignedData ::= SEQUENCE {
version CMSVersion,
digestAlgorithms DigestAlgorithmIdentifiers,
encapContentInfo EncapsulatedContentInfo,
certificates [0] IMPLICIT CertificateSet OPTIONAL,
crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
signerInfos SignerInfos
}
deprecated
use corresponding class in org.bouncycastle.asn1.cms

Fields Summary
private org.bouncycastle.sasn1.Asn1Sequence
_seq
private org.bouncycastle.sasn1.Asn1Integer
_version
private org.bouncycastle.sasn1.Asn1Object
_nextObject
private boolean
_certsCalled
private boolean
_crlsCalled
Constructors Summary
public SignedDataParser(org.bouncycastle.sasn1.Asn1Sequence seq)

        this._seq = seq;
        this._version = (Asn1Integer)seq.readObject();
    
Methods Summary
public org.bouncycastle.sasn1.Asn1SetgetCertificates()

        _certsCalled = true;
        _nextObject = _seq.readObject();

        if (_nextObject instanceof Asn1TaggedObject && ((Asn1TaggedObject)_nextObject).getTagNumber() == 0)
        {
            Asn1Set certs = (Asn1Set)((Asn1TaggedObject)_nextObject).getObject(BerTag.SET, false);
            _nextObject = null;
            
            return certs;
        }
        
        return null;
    
public org.bouncycastle.sasn1.Asn1SetgetCrls()

        if (!_certsCalled)
        {
            throw new IOException("getCerts() has not been called.");
        }
        
        _crlsCalled = true;
        
        if (_nextObject == null)
        {
            _nextObject = _seq.readObject();
        }
        
        if (_nextObject instanceof Asn1TaggedObject && ((Asn1TaggedObject)_nextObject).getTagNumber() == 1)
        {
            Asn1Set crls = (Asn1Set)((Asn1TaggedObject)_nextObject).getObject(BerTag.SET, false);
            _nextObject = null;
            
            return crls;
        }
        
        return null;
    
public org.bouncycastle.sasn1.Asn1SetgetDigestAlgorithms()

        return (Asn1Set)_seq.readObject();
    
public ContentInfoParsergetEncapContentInfo()

        return new ContentInfoParser((Asn1Sequence)_seq.readObject());
    
public org.bouncycastle.sasn1.Asn1SetgetSignerInfos()

        if (!_certsCalled || !_crlsCalled)
        {
            throw new IOException("getCerts() and/or getCrls() has not been called.");
        }
        
        if (_nextObject == null)
        {
            _nextObject = _seq.readObject();
        }
        
        return (Asn1Set)_nextObject;
    
public org.bouncycastle.sasn1.Asn1IntegergetVersion()

        return _version;