DistributionPointName.java
Upload User: lior1029
Upload Date: 2013-05-07
Package Size: 209k
Code Size: 1k
Category:

CA program

Development Platform:

Java

  1. package org.bouncycastle.asn1.x509;
  2. import org.bouncycastle.asn1.*;
  3. public class DistributionPointName
  4.     implements DEREncodable
  5. {
  6.     DEREncodable        name;
  7.     int                 type;
  8.     public static final int FULL_NAME = 0;
  9.     public static final int NAME_RELATIVE_TO_CRL_ISSUER = 1;
  10.     public DistributionPointName(
  11.         int             type,
  12.         DEREncodable    name)
  13.     {
  14.         this.type = type;
  15.         this.name = name;
  16.     }
  17.     /**
  18.      * <pre>
  19.      * DistributionPointName ::= CHOICE {
  20.      *     fullName                 [0] GeneralNames,
  21.      *     nameRelativeToCRLIssuer  [1] RelativeDistinguishedName
  22.      * }
  23.      * </pre>
  24.      */
  25.     public DERObject getDERObject()
  26.     {
  27.         if (name instanceof ASN1Sequence)
  28.         {
  29.             return new DERTaggedObject(true, type, name);
  30.         }
  31.         else
  32.         {
  33.             return new DERTaggedObject(false, type, name);
  34.         }
  35.     }
  36. }