Examples of DERTaggedObject


Examples of org.bouncycastle.asn1.DERTaggedObject

        this.onlySomeReasons = onlySomeReasons;

        ASN1EncodableVector vec = new ASN1EncodableVector();
        if (distributionPoint != null)
        {                                    // CHOICE item so explicitly tagged
            vec.add(new DERTaggedObject(true, 0, distributionPoint));
        }
        if (!onlyContainsUserCerts)
        {
            vec.add(new DERTaggedObject(false, 1, new DERBoolean(true)));
        }
        if (!onlyContainsCACerts)
        {
            vec.add(new DERTaggedObject(false, 2, new DERBoolean(true)));
        }
        if (onlySomeReasons != null)
        {
            vec.add(new DERTaggedObject(false, 3, onlySomeReasons));
        }
        if (!indirectCRL)
        {
            vec.add(new DERTaggedObject(false, 4, new DERBoolean(true)));
        }
        if (!onlyContainsAttributeCerts)
        {
            vec.add(new DERTaggedObject(false, 5, new DERBoolean(true)));
        }

        seq = new DERSequence(vec);
    }
View Full Code Here

Examples of org.bouncycastle.asn1.DERTaggedObject

        }
    }
   
    public DERObject toASN1Object()
    {
        return new DERTaggedObject(false, type, name);
    }
View Full Code Here

Examples of org.bouncycastle.asn1.DERTaggedObject

    public DERObject toASN1Object()
    {
        if (tag == directoryName)       // directoryName is explicitly tagged as it is a CHOICE
        {
            return new DERTaggedObject(true, tag, obj);
        }
        else
        {
            return new DERTaggedObject(false, tag, obj);
        }
    }
View Full Code Here

Examples of org.bouncycastle.asn1.DERTaggedObject

            // an interesting feature of SignedData is that there appear to be varying implementations...
            // for the moment we ignore anything which doesn't fit.
            //
            if (o instanceof DERTaggedObject)
            {
                DERTaggedObject tagged = (DERTaggedObject)o;

                switch (tagged.getTagNo())
                {
                case 0:
                    certificates = ASN1Set.getInstance(tagged, false);
                    break;
                case 1:
                    crls = ASN1Set.getInstance(tagged, false);
                    break;
                default:
                    throw new IllegalArgumentException("unknown tag value " + tagged.getTagNo());
                }
            }
            else
            {
                signerInfos = (ASN1Set)o;
View Full Code Here

Examples of org.bouncycastle.asn1.DERTaggedObject

        v.add(digestAlgorithms);
        v.add(contentInfo);

        if (certificates != null)
        {
            v.add(new DERTaggedObject(false, 0, certificates));
        }

        if (crls != null)
        {
            v.add(new DERTaggedObject(false, 1, crls));
        }

        v.add(signerInfos);

        return new BERSequence(v);
View Full Code Here

Examples of org.bouncycastle.asn1.DERTaggedObject

            {
                v.add(new BERTaggedObject(false, 0, certificates));
            }
            else
            {
                v.add(new DERTaggedObject(false, 0, certificates));
            }
        }

        if (crls != null)
        {
            if (crlsBer)
            {
                v.add(new BERTaggedObject(false, 1, crls));
            }
            else
            {
                v.add(new DERTaggedObject(false, 1, crls));
            }
        }

        v.add(signerInfos);
View Full Code Here

Examples of org.bouncycastle.asn1.DERTaggedObject

    {
        ASN1EncodableVector v = new ASN1EncodableVector();
       
        if (!hashAlgorithm.equals(DEFAULT_HASH_ALGORITHM))
        {
            v.add(new DERTaggedObject(true, 0, hashAlgorithm));
        }
       
        if (!maskGenAlgorithm.equals(DEFAULT_MASK_GEN_FUNCTION))
        {
            v.add(new DERTaggedObject(true, 1, maskGenAlgorithm));
        }
       
        if (!pSourceAlgorithm.equals(DEFAULT_P_SOURCE_ALGORITHM))
        {
            v.add(new DERTaggedObject(true, 2, pSourceAlgorithm));
        }
       
        return new DERSequence(v);
    }
View Full Code Here

Examples of org.bouncycastle.asn1.DERTaggedObject

    {
        ASN1EncodableVector v = new ASN1EncodableVector();

        if (policyAuthority != null)
        {
            v.add(new DERTaggedObject(0, policyAuthority));
        }

        ASN1EncodableVector v2 = new ASN1EncodableVector();

        for (Enumeration i = values.elements(); i.hasMoreElements();)
View Full Code Here

Examples of org.bouncycastle.asn1.DERTaggedObject

        v.add(base);

        if (minimum != null && !minimum.getValue().equals(ZERO))
        {
            v.add(new DERTaggedObject(false, 0, minimum));
        }

        if (maximum != null)
        {
            v.add(new DERTaggedObject(false, 1, maximum));
        }

        return new DERSequence(v);
    }
View Full Code Here

Examples of org.bouncycastle.asn1.DERTaggedObject

   
    public AttCertIssuer(
        V2Form  v2Form)
    {
        obj = v2Form;
        choiceObj = new DERTaggedObject(false, 0, obj);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.