Search in sources :

Example 11 with ASN1SetParser

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

the class EnvelopedDataParser method getRecipientInfos.

public ASN1SetParser getRecipientInfos() throws IOException {
    if (!_originatorInfoCalled) {
        getOriginatorInfo();
    }
    if (_nextObject == null) {
        _nextObject = _seq.readObject();
    }
    ASN1SetParser recipientInfos = (ASN1SetParser) _nextObject;
    _nextObject = null;
    return recipientInfos;
}
Also used : ASN1SetParser(com.github.zhenwei.core.asn1.ASN1SetParser)

Example 12 with ASN1SetParser

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

the class EnvelopedDataParser method getUnprotectedAttrs.

public ASN1SetParser getUnprotectedAttrs() throws IOException {
    if (_nextObject == null) {
        _nextObject = _seq.readObject();
    }
    if (_nextObject != null) {
        ASN1TaggedObjectParser o = (ASN1TaggedObjectParser) _nextObject;
        _nextObject = null;
        return (ASN1SetParser) ASN1Util.parseContextBaseUniversal(o, 1, false, BERTags.SET_OF);
    }
    return null;
}
Also used : ASN1TaggedObjectParser(com.github.zhenwei.core.asn1.ASN1TaggedObjectParser) ASN1SetParser(com.github.zhenwei.core.asn1.ASN1SetParser)

Example 13 with ASN1SetParser

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

the class SignedDataParser method getCrls.

public ASN1SetParser getCrls() throws IOException {
    if (!_certsCalled) {
        throw new IOException("getCerts() has not been called.");
    }
    _crlsCalled = true;
    if (_nextObject == null) {
        _nextObject = _seq.readObject();
    }
    if (_nextObject instanceof ASN1TaggedObjectParser) {
        ASN1TaggedObjectParser o = (ASN1TaggedObjectParser) _nextObject;
        if (o.hasContextTag(1)) {
            ASN1SetParser crls = (ASN1SetParser) o.parseBaseUniversal(false, BERTags.SET_OF);
            _nextObject = null;
            return crls;
        }
    }
    return null;
}
Also used : ASN1TaggedObjectParser(com.github.zhenwei.core.asn1.ASN1TaggedObjectParser) ASN1SetParser(com.github.zhenwei.core.asn1.ASN1SetParser) IOException(java.io.IOException)

Example 14 with ASN1SetParser

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

the class SignedDataParser method getCertificates.

public ASN1SetParser getCertificates() throws IOException {
    _certsCalled = true;
    _nextObject = _seq.readObject();
    if (_nextObject instanceof ASN1TaggedObjectParser) {
        ASN1TaggedObjectParser o = (ASN1TaggedObjectParser) _nextObject;
        if (o.hasContextTag(0)) {
            ASN1SetParser certs = (ASN1SetParser) o.parseBaseUniversal(false, BERTags.SET_OF);
            _nextObject = null;
            return certs;
        }
    }
    return null;
}
Also used : ASN1TaggedObjectParser(com.github.zhenwei.core.asn1.ASN1TaggedObjectParser) ASN1SetParser(com.github.zhenwei.core.asn1.ASN1SetParser)

Aggregations

ASN1SetParser (com.github.zhenwei.core.asn1.ASN1SetParser)14 ASN1TaggedObjectParser (com.github.zhenwei.core.asn1.ASN1TaggedObjectParser)6 ASN1Encodable (com.github.zhenwei.core.asn1.ASN1Encodable)3 ASN1EncodableVector (com.github.zhenwei.core.asn1.ASN1EncodableVector)2 ASN1SequenceParser (com.github.zhenwei.core.asn1.ASN1SequenceParser)2 DERSet (com.github.zhenwei.core.asn1.DERSet)2 AttributeTable (com.github.zhenwei.pkix.util.asn1.cms.AttributeTable)2 IOException (java.io.IOException)2 ASN1ParsingException (com.github.zhenwei.core.asn1.ASN1ParsingException)1 ASN1TaggedObject (com.github.zhenwei.core.asn1.ASN1TaggedObject)1 BERTaggedObject (com.github.zhenwei.core.asn1.BERTaggedObject)1 DERTaggedObject (com.github.zhenwei.core.asn1.DERTaggedObject)1 SignerInfo (com.github.zhenwei.pkix.util.asn1.cms.SignerInfo)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Map (java.util.Map)1