Search in sources :

Example 11 with ASN1SequenceParser

use of com.github.zhenwei.core.asn1.ASN1SequenceParser in project LinLong-Java by zhenwei1108.

the class AuthenticatedDataParser method getEncapsulatedContentInfo.

public ContentInfoParser getEncapsulatedContentInfo() throws IOException {
    if (nextObject == null) {
        nextObject = seq.readObject();
    }
    if (nextObject != null) {
        ASN1SequenceParser o = (ASN1SequenceParser) nextObject;
        nextObject = null;
        return new ContentInfoParser(o);
    }
    return null;
}
Also used : ASN1SequenceParser(com.github.zhenwei.core.asn1.ASN1SequenceParser)

Example 12 with ASN1SequenceParser

use of com.github.zhenwei.core.asn1.ASN1SequenceParser in project LinLong-Java by zhenwei1108.

the class EnvelopedDataParser method getOriginatorInfo.

public OriginatorInfo getOriginatorInfo() throws IOException {
    _originatorInfoCalled = true;
    if (_nextObject == null) {
        _nextObject = _seq.readObject();
    }
    if (_nextObject instanceof ASN1TaggedObjectParser) {
        ASN1TaggedObjectParser o = (ASN1TaggedObjectParser) _nextObject;
        if (o.hasContextTag(0)) {
            ASN1SequenceParser originatorInfo = (ASN1SequenceParser) o.parseBaseUniversal(false, BERTags.SEQUENCE);
            _nextObject = null;
            return OriginatorInfo.getInstance(originatorInfo.getLoadedObject());
        }
    }
    return null;
}
Also used : ASN1SequenceParser(com.github.zhenwei.core.asn1.ASN1SequenceParser) ASN1TaggedObjectParser(com.github.zhenwei.core.asn1.ASN1TaggedObjectParser)

Aggregations

ASN1SequenceParser (com.github.zhenwei.core.asn1.ASN1SequenceParser)9 ASN1EncodableVector (com.github.zhenwei.core.asn1.ASN1EncodableVector)3 ASN1TaggedObjectParser (com.github.zhenwei.core.asn1.ASN1TaggedObjectParser)3 DERSet (com.github.zhenwei.core.asn1.DERSet)3 ContentInfoParser (com.github.zhenwei.pkix.util.asn1.cms.ContentInfoParser)3 ASN1Encodable (com.github.zhenwei.core.asn1.ASN1Encodable)2 ASN1SetParser (com.github.zhenwei.core.asn1.ASN1SetParser)2 ASN1StreamParser (com.github.zhenwei.core.asn1.ASN1StreamParser)2 BERSequenceGenerator (com.github.zhenwei.core.asn1.BERSequenceGenerator)2 AttributeTable (com.github.zhenwei.pkix.util.asn1.cms.AttributeTable)2 SignedDataParser (com.github.zhenwei.pkix.util.asn1.cms.SignedDataParser)2 ASN1OctetStringParser (com.github.zhenwei.core.asn1.ASN1OctetStringParser)1 ASN1Set (com.github.zhenwei.core.asn1.ASN1Set)1 DERTaggedObject (com.github.zhenwei.core.asn1.DERTaggedObject)1 InputExpander (com.github.zhenwei.pkix.operator.InputExpander)1 CompressedDataParser (com.github.zhenwei.pkix.util.asn1.cms.CompressedDataParser)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 Iterator (java.util.Iterator)1 List (java.util.List)1