CRLDistPoint.java
上传用户:lior1029
上传日期:2013-05-07
资源大小:209k
文件大小:1k
源码类别:

CA认证

开发平台:

Java

  1. package org.bouncycastle.asn1.x509;
  2. import org.bouncycastle.asn1.*;
  3. public class CRLDistPoint
  4.     implements DEREncodable
  5. {
  6.     ASN1Sequence  seq = null;
  7.     public static CRLDistPoint getInstance(
  8.         ASN1TaggedObject obj,
  9.         boolean          explicit)
  10.     {
  11.         return getInstance(ASN1Sequence.getInstance(obj, explicit));
  12.     }
  13.     public static CRLDistPoint getInstance(
  14.         Object  obj)
  15.     {
  16.         if (obj instanceof CRLDistPoint)
  17.         {
  18.             return (CRLDistPoint)obj;
  19.         }
  20.         else if (obj instanceof ASN1Sequence)
  21.         {
  22.             return new CRLDistPoint((ASN1Sequence)obj);
  23.         }
  24.         throw new IllegalArgumentException("unknown object in factory");
  25.     }
  26.     public CRLDistPoint(
  27.         ASN1Sequence seq)
  28.     {
  29.         this.seq = seq;
  30.     }
  31.     
  32.     public CRLDistPoint(
  33.         DistributionPoint[] points)
  34.     {
  35.         ASN1EncodableVector  v = new ASN1EncodableVector();
  36.         for (int i = 0; i != points.length; i++)
  37.         {
  38.             v.add(points[i]);
  39.         }
  40.         seq = new DERSequence(v);
  41.     }
  42.     /**
  43.      * <pre>
  44.      * CRLDistPoint ::= SEQUENCE SIZE {1..MAX} OF DistributionPoint
  45.      * </pre>
  46.      */
  47.     public DERObject getDERObject()
  48.     {
  49.         return seq;
  50.     }
  51. }