Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.bouncycastle.asn1.ocsp;
  
 
 public class TBSRequest
     extends ASN1Object
 {
     private static final ASN1Integer V1 = new ASN1Integer(0);
     
     ASN1Integer      version;
     GeneralName     requestorName;
     ASN1Sequence    requestList;
 
     boolean         versionSet;

    

Deprecated:
use method taking Extensions
Parameters:
requestorName
requestList
requestExtensions
 
     public TBSRequest(
         GeneralName     requestorName,
         ASN1Sequence    requestList,
         X509Extensions requestExtensions)
     {
         this. = ;
         this. = requestorName;
         this. = requestList;
         this. = Extensions.getInstance(requestExtensions);
     }
 
     public TBSRequest(
         GeneralName     requestorName,
         ASN1Sequence    requestList,
         Extensions  requestExtensions)
     {
         this. = ;
         this. = requestorName;
         this. = requestList;
         this. = requestExtensions;
     }
 
     private TBSRequest(
         ASN1Sequence    seq)
     {
         int    index = 0;
 
         if (seq.getObjectAt(0) instanceof ASN1TaggedObject)
         {
             ASN1TaggedObject    o = (ASN1TaggedObject)seq.getObjectAt(0);
 
             if (o.getTagNo() == 0)
             {
                  = true;
                  = ASN1Integer.getInstance((ASN1TaggedObject)seq.getObjectAt(0), true);
                 index++;
             }
             else
             {
                  = ;
             }
         }
         else
         {
              = ;
         }
 
         if (seq.getObjectAt(indexinstanceof ASN1TaggedObject)
         {
              = GeneralName.getInstance((ASN1TaggedObject)seq.getObjectAt(index++), true);
         }
         
          = (ASN1Sequence)seq.getObjectAt(index++);
 
         if (seq.size() == (index + 1))
         {
              = Extensions.getInstance((ASN1TaggedObject)seq.getObjectAt(index), true);
         }
     }
 
     public static TBSRequest getInstance(
         ASN1TaggedObject obj,
         boolean          explicit)
     {
         return getInstance(ASN1Sequence.getInstance(objexplicit));
     }
 
    public static TBSRequest getInstance(
        Object  obj)
    {
        if (obj instanceof TBSRequest)
        {
            return (TBSRequest)obj;
        }
        else if (obj != null)
        {
            return new TBSRequest(ASN1Sequence.getInstance(obj));
        }
        return null;
    }
    public ASN1Integer getVersion()
    {
        return ;
    }
    public GeneralName getRequestorName()
    {
        return ;
    }
    public ASN1Sequence getRequestList()
    {
        return ;
    }
    {
        return ;
    }

    
Produce an object suitable for an ASN1OutputStream.
 TBSRequest      ::=     SEQUENCE {
     version             [0]     EXPLICIT Version DEFAULT v1,
     requestorName       [1]     EXPLICIT GeneralName OPTIONAL,
     requestList                 SEQUENCE OF Request,
     requestExtensions   [2]     EXPLICIT Extensions OPTIONAL }
 
    {
        ASN1EncodableVector    v = new ASN1EncodableVector();
        //
        // if default don't include - unless explicitly provided. Not strictly correct
        // but required for some requests
        //
        if (!.equals() || )
        {
            v.add(new DERTaggedObject(true, 0, ));
        }
        
        if ( != null)
        {
            v.add(new DERTaggedObject(true, 1, ));
        }
        v.add();
        if ( != null)
        {
            v.add(new DERTaggedObject(true, 2, ));
        }
        return new DERSequence(v);
    }
New to GrepCode? Check out our FAQ X