Top Description Fields Constructors Methods
org.bouncycastle.asn1.x509

public Class Target

extends ASN1Object
implements ASN1Choice
Class Inheritance
All Implemented Interfaces
org.bouncycastle.asn1.ASN1Choice
Imports
org.bouncycastle.asn1.ASN1Choice, .ASN1Object, .ASN1Primitive, .ASN1TaggedObject, .DERTaggedObject

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.

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
private GeneralName
private GeneralName

Constructor Summary

AccessConstructor and Description
private
Target(ASN1TaggedObject
The tagged object.
tagObj
)

Constructor from ASN1TaggedObject.

public
Target(int
the choice type to apply to the name.
type
,
GeneralName
the general name.
name
)

Constructor from given details.

Method Summary

Modifier and TypeMethod and Description
public static Target

Returns:

A Target instance.
getInstance
(Object
The object.
obj
)

Creates an instance of a Target from the given object.

public GeneralName

Returns:

Returns the targetGroup.
getTargetGroup
()

public GeneralName

Returns:

Returns the targetName.
getTargetName
()

public ASN1Primitive

Returns:

a ASN1Primitive
toASN1Primitive
()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Produce an object suitable for an ASN1OutputStream.

Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

targetGroupback to summary
public static final int targetGroup
targetNameback to summary
public static final int targetName
targGroupback to summary
private GeneralName targGroup
targNameback to summary
private GeneralName targName

Constructor Detail

Targetback to summary
private Target(ASN1TaggedObject tagObj)

Constructor from ASN1TaggedObject.

Parameters
tagObj:ASN1TaggedObject

The tagged object.

Exceptions
IllegalArgumentException:
if the encoding is wrong.
Targetback to summary
public Target(int type, GeneralName name)

Constructor from given details.

Exactly one of the parameters must be not null.

Parameters
type:int

the choice type to apply to the name.

name:GeneralName

the general name.

Exceptions
IllegalArgumentException:
if type is invalid.

Method Detail

getInstanceback to summary
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:Object

The object.

Returns:Target

A Target instance.

Exceptions
IllegalArgumentException:
if the given object cannot be interpreted as Target.
getTargetGroupback to summary
public GeneralName getTargetGroup()
Returns:GeneralName

Returns the targetGroup.

getTargetNameback to summary
public GeneralName getTargetName()
Returns:GeneralName

Returns the targetName.

toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Produce an object suitable for an ASN1OutputStream. Returns:

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

a ASN1Primitive