public class

Target

extends ASN1Encodable
implements ASN1Choice
java.lang.Object
   ↳ org.bouncycastle.asn1.ASN1Encodable
     ↳ org.bouncycastle.asn1.x509.Target

Class Overview

Target structure used in target information extension for attribute certificates from RFC 3281.

     Target  ::= CHOICE {
       targetName          [0] GeneralName,
       targetGroup         [1] GeneralName,
       targetCert          [2] TargetCert
     }
 

The targetCert field is currently not supported and must not be used according to RFC 3281.

Summary

Constants
int targetGroup
int targetName
[Expand]
Inherited Constants
From class org.bouncycastle.asn1.ASN1Encodable
Public Constructors
Target(int type, GeneralName name)
Constructor from given details.
Public Methods
static Target getInstance(Object obj)
Creates an instance of a Target from the given object.
GeneralName getTargetGroup()
GeneralName getTargetName()
DERObject toASN1Object()
Produce an object suitable for an ASN1OutputStream.
[Expand]
Inherited Methods
From class org.bouncycastle.asn1.ASN1Encodable
From class java.lang.Object
From interface org.bouncycastle.asn1.DEREncodable

Constants

public static final int targetGroup

Constant Value: 1 (0x00000001)

public static final int targetName

Constant Value: 0 (0x00000000)

Public Constructors

public Target (int type, GeneralName name)

Constructor from given details.

Exactly one of the parameters must be not null.

Parameters
type the choice type to apply to the name.
name the general name.
Throws
IllegalArgumentException if type is invalid.

Public Methods

public static Target getInstance (Object obj)

Creates an instance of a Target from the given object.

obj can be a Target or a ASN1TaggedObject

Parameters
obj The object.
Returns
  • A Target instance.
Throws
IllegalArgumentException if the given object cannot be interpreted as Target.

public GeneralName getTargetGroup ()

Returns
  • Returns the targetGroup.

public GeneralName getTargetName ()

Returns
  • Returns the targetName.

public DERObject toASN1Object ()

Produce an object suitable for an ASN1OutputStream. Returns:

     Target  ::= CHOICE {
       targetName          [0] GeneralName,
       targetGroup         [1] GeneralName,
       targetCert          [2] TargetCert
     }
 

Returns
  • a DERObject