Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.bouncycastle.asn1.x509;
  
 IssuingDistributionPoint ::= SEQUENCE { 
   distributionPoint          [0] DistributionPointName OPTIONAL, 
   onlyContainsUserCerts      [1] BOOLEAN DEFAULT FALSE, 
   onlyContainsCACerts        [2] BOOLEAN DEFAULT FALSE, 
   onlySomeReasons            [3] ReasonFlags OPTIONAL, 
   indirectCRL                [4] BOOLEAN DEFAULT FALSE,
   onlyContainsAttributeCerts [5] BOOLEAN DEFAULT FALSE }
 
 
     extends ASN1Object
 {
 
     private boolean onlyContainsUserCerts;
 
     private boolean onlyContainsCACerts;
 
     private ReasonFlags onlySomeReasons;
 
     private boolean indirectCRL;
 
     private boolean onlyContainsAttributeCerts;
 
     private ASN1Sequence seq;
 
     public static IssuingDistributionPoint getInstance(
         ASN1TaggedObject obj,
         boolean explicit)
     {
         return getInstance(ASN1Sequence.getInstance(objexplicit));
     }
 
     public static IssuingDistributionPoint getInstance(
         Object obj)
     {
         if (obj instanceof IssuingDistributionPoint)
         {
             return (IssuingDistributionPoint)obj;
         }
         else if (obj != null)
         {
             return new IssuingDistributionPoint(ASN1Sequence.getInstance(obj));
         }
 
         return null;
     }

    
Constructor from given details.

Parameters:
distributionPoint May contain an URI as pointer to most current CRL.
onlyContainsUserCerts Covers revocation information for end certificates.
onlyContainsCACerts Covers revocation information for CA certificates.
onlySomeReasons Which revocation reasons does this point cover.
indirectCRL If true then the CRL contains revocation information about certificates ssued by other CAs.
onlyContainsAttributeCerts Covers revocation information for attribute certificates.
 
     public IssuingDistributionPoint(
         DistributionPointName distributionPoint,
         boolean onlyContainsUserCerts,
         boolean onlyContainsCACerts,
         ReasonFlags onlySomeReasons,
         boolean indirectCRL,
         boolean onlyContainsAttributeCerts)
     {
         this. = distributionPoint;
         this. = indirectCRL;
         this. = onlyContainsAttributeCerts;
         this. = onlyContainsCACerts;
         this. = onlyContainsUserCerts;
         this. = 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, ASN1Boolean.getInstance(true)));
        }
        if (onlyContainsCACerts)
        {
            vec.add(new DERTaggedObject(false, 2, ASN1Boolean.getInstance(true)));
        }
        if (onlySomeReasons != null)
        {
            vec.add(new DERTaggedObject(false, 3, onlySomeReasons));
        }
        if (indirectCRL)
        {
            vec.add(new DERTaggedObject(false, 4, ASN1Boolean.getInstance(true)));
        }
        if (onlyContainsAttributeCerts)
        {
            vec.add(new DERTaggedObject(false, 5, ASN1Boolean.getInstance(true)));
        }
         = new DERSequence(vec);
    }

    
Shorthand Constructor from given details.

Parameters:
distributionPoint May contain an URI as pointer to most current CRL.
indirectCRL If true then the CRL contains revocation information about certificates ssued by other CAs.
onlyContainsAttributeCerts Covers revocation information for attribute certificates.
        DistributionPointName distributionPoint,
        boolean indirectCRL,
        boolean onlyContainsAttributeCerts)
    {
        this(distributionPointfalsefalsenullindirectCRLonlyContainsAttributeCerts);
    }

    
Constructor from ASN1Sequence
    private IssuingDistributionPoint(
        ASN1Sequence seq)
    {
        this. = seq;
        for (int i = 0; i != seq.size(); i++)
        {
            ASN1TaggedObject o = ASN1TaggedObject.getInstance(seq.getObjectAt(i));
            switch (o.getTagNo())
            {
            case 0:
                                                    // CHOICE so explicit
                 = DistributionPointName.getInstance(otrue);
                break;
            case 1:
                 = ASN1Boolean.getInstance(ofalse).isTrue();
                break;
            case 2:
                 = ASN1Boolean.getInstance(ofalse).isTrue();
                break;
            case 3:
                 = new ReasonFlags(ReasonFlags.getInstance(ofalse));
                break;
            case 4:
                 = ASN1Boolean.getInstance(ofalse).isTrue();
                break;
            case 5:
                 = ASN1Boolean.getInstance(ofalse).isTrue();
                break;
            default:
                throw new IllegalArgumentException(
                        "unknown tag in IssuingDistributionPoint");
            }
        }
    }
    public boolean onlyContainsUserCerts()
    {
        return ;
    }
    public boolean onlyContainsCACerts()
    {
        return ;
    }
    public boolean isIndirectCRL()
    {
        return ;
    }
    public boolean onlyContainsAttributeCerts()
    {
        return ;
    }

    

Returns:
Returns the distributionPoint.
    {
        return ;
    }

    

Returns:
Returns the onlySomeReasons.
    {
        return ;
    }
    {
        return ;
    }
    public String toString()
    {
        String       sep = System.getProperty("line.separator");
        StringBuffer buf = new StringBuffer();
        buf.append("IssuingDistributionPoint: [");
        buf.append(sep);
        if ( != null)
        {
            appendObject(bufsep"distributionPoint".toString());
        }
        if ()
        {
            appendObject(bufsep"onlyContainsUserCerts"booleanToString());
        }
        if ()
        {
            appendObject(bufsep"onlyContainsCACerts"booleanToString());
        }
        if ( != null)
        {
            appendObject(bufsep"onlySomeReasons".toString());
        }
        if ()
        {
            appendObject(bufsep"onlyContainsAttributeCerts"booleanToString());
        }
        if ()
        {
            appendObject(bufsep"indirectCRL"booleanToString());
        }
        buf.append("]");
        buf.append(sep);
        return buf.toString();
    }
    private void appendObject(StringBuffer bufString sepString nameString value)
    {
        String       indent = "    ";
        buf.append(indent);
        buf.append(name);
        buf.append(":");
        buf.append(sep);
        buf.append(indent);
        buf.append(indent);
        buf.append(value);
        buf.append(sep);
    }
    private String booleanToString(boolean value)
    {
        return value ? "true" : "false";
    }
New to GrepCode? Check out our FAQ X