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