Package org.apache.geronimo.util.asn1

Examples of org.apache.geronimo.util.asn1.ASN1TaggedObject


    }

    protected void parse(byte[] token) throws IOException {
        ByteArrayInputStream tokenStream = new ByteArrayInputStream(token);
        DERInputStream der = new DERInputStream(tokenStream);
        ASN1TaggedObject tagged = (ASN1TaggedObject) der.readObject();
        ASN1Sequence sequence = ASN1Sequence.getInstance(tagged, true);
        Enumeration fields = sequence.getObjects();
        while (fields.hasMoreElements()) {
            tagged = (ASN1TaggedObject) fields.nextElement();
            switch (tagged.getTagNo()) {
            case 0:
                DEREnumerated enumerated =
                        DEREnumerated.getInstance(tagged, true);
                setResult(enumerated.getValue().intValue());
                break;
View Full Code Here


            throw new IOException("Malformed NegTokenInit.");
        }
        tokenStream = new ByteArrayInputStream(constructed.getData());
        der = new DERInputStream(tokenStream);
        DERObjectIdentifier spnego = (DERObjectIdentifier) der.readObject();
        ASN1TaggedObject tagged = (ASN1TaggedObject) der.readObject();
        ASN1Sequence sequence = ASN1Sequence.getInstance(tagged, true);
        Enumeration fields = sequence.getObjects();
        while (fields.hasMoreElements()) {
            tagged = (ASN1TaggedObject) fields.nextElement();
            switch (tagged.getTagNo()) {
            case 0:
                sequence = ASN1Sequence.getInstance(tagged, true);
                String[] mechanisms = new String[sequence.size()];
                for (int i = mechanisms.length - 1; i >= 0; i--) {
                    DERObjectIdentifier mechanism = (DERObjectIdentifier)
View Full Code Here

    {
        this.seq = seq;

        for (int i = 0; i != seq.size(); i++)
        {
            ASN1TaggedObject  o = (ASN1TaggedObject)seq.getObjectAt(i);

            switch (o.getTagNo())
            {
            case 0:
                break;
            case 1:
                onlyContainsUserCerts = DERBoolean.getInstance(o, false).isTrue();
View Full Code Here

        ASN1Sequence    seq)
    {
        Enumeration e = seq.getObjects();
        while (e.hasMoreElements())
        {
            ASN1TaggedObject    o = (ASN1TaggedObject)e.nextElement();
            switch (o.getTagNo())
            {
            case 0:
                permitted = ASN1Sequence.getInstance(o, false);
                break;
            case 1:
View Full Code Here

    public DistributionPoint(
        ASN1Sequence seq)
    {
        for (int i = 0; i != seq.size(); i++)
        {
            ASN1TaggedObject    t = (ASN1TaggedObject)seq.getObjectAt(i);
            switch (t.getTagNo())
            {
            case 0:
                distributionPoint = DistributionPointName.getInstance(t, true);
                break;
            case 1:
View Full Code Here

    public Holder(
        ASN1Sequence    seq)
    {
        for (int i = 0; i != seq.size(); i++)
        {
            ASN1TaggedObject    tObj = (ASN1TaggedObject)seq.getObjectAt(i);

            switch (tObj.getTagNo())
            {
            case 0:
                baseCertificateID = IssuerSerial.getInstance(tObj, false);
                break;
            case 1:
View Full Code Here

        switch (seq.size())
        {
        case 1:
            break;
        case 2:
            ASN1TaggedObject o = (ASN1TaggedObject)seq.getObjectAt(1);
            switch (o.getTagNo())
            {
            case 0 :
                minimum = DERInteger.getInstance(o, false);
                break;
            case 1 :
                maximum = DERInteger.getInstance(o, false);
                break;
            default:
                throw new IllegalArgumentException("Bad tag number: " + o.getTagNo());
            }
            break;
        case 3 :
            minimum = DERInteger.getInstance((ASN1TaggedObject)seq.getObjectAt(1), false);
            maximum = DERInteger.getInstance((ASN1TaggedObject)seq.getObjectAt(2), false);
View Full Code Here

            return (GeneralName)obj;
        }

        if (obj instanceof ASN1TaggedObject)
        {
            ASN1TaggedObject    tagObj = (ASN1TaggedObject)obj;
            int                 tag = tagObj.getTagNo();

            switch (tag)
            {
            case otherName:
                return new GeneralName(ASN1Sequence.getInstance(tagObj, false), tag);
View Full Code Here

            this.issuerName = GeneralNames.getInstance(seq.getObjectAt(0));
        }

        for (int i = index; i != seq.size(); i++)
        {
            ASN1TaggedObject o = (ASN1TaggedObject)seq.getObjectAt(i);
            if (o.getTagNo() == 0)
            {
                baseCertificateID = IssuerSerial.getInstance(o, false);
            }
            else if (o.getTagNo() == 1)
            {
                objectDigestInfo = ObjectDigestInfo.getInstance(o, false);
            }
        }
    }
View Full Code Here

    public DistributionPoint(
        ASN1Sequence seq)
    {
        for (int i = 0; i != seq.size(); i++)
        {
            ASN1TaggedObject    t = (ASN1TaggedObject)seq.getObjectAt(i);
            switch (t.getTagNo())
            {
            case 0:
                distributionPoint = DistributionPointName.getInstance(t, true);
                break;
            case 1:
View Full Code Here

TOP

Related Classes of org.apache.geronimo.util.asn1.ASN1TaggedObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.