org.bouncycastle.asn1.x509

Class Targets

Implemented Interfaces:
DEREncodable

public class Targets
extends ASN1Encodable

Targets structure used in target information extension for attribute certificates from RFC 3281.
            Targets ::= SEQUENCE OF Target
           
            Target  ::= CHOICE {
              targetName          [0] GeneralName,
              targetGroup         [1] GeneralName,
              targetCert          [2] TargetCert
            }
           
            TargetCert  ::= SEQUENCE {
              targetCertificate    IssuerSerial,
              targetName           GeneralName OPTIONAL,
              certDigestInfo       ObjectDigestInfo OPTIONAL
            }
 
See Also:
Target, TargetInformation

Field Summary

Fields inherited from class org.bouncycastle.asn1.ASN1Encodable

BER, DER

Constructor Summary

Targets(Target[] targets)
Constructor from given targets.

Method Summary

static Targets
getInstance(Object obj)
Creates an instance of a Targets from the given object.
Target[]
getTargets()
Returns the targets in a Vector.
DERObject
toASN1Object()
Produce an object suitable for an ASN1OutputStream.

Methods inherited from class org.bouncycastle.asn1.ASN1Encodable

equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode, toASN1Object

Constructor Details

Targets

public Targets(Target[] targets)
Constructor from given targets.

The vector is copied.

Parameters:
targets - A Vector of Targets.
See Also:
Target

Method Details

getInstance

public static Targets getInstance(Object obj)
Creates an instance of a Targets from the given object.

obj can be a Targets or a ASN1Sequence

Parameters:
obj - The object.
Returns:
A Targets instance.

getTargets

public Target[] getTargets()
Returns the targets in a Vector.

The vector is cloned before it is returned.

Returns:
Returns the targets.

toASN1Object

public DERObject toASN1Object()
Produce an object suitable for an ASN1OutputStream. Returns:
            Targets ::= SEQUENCE OF Target
 
Overrides:
toASN1Object in interface ASN1Encodable
Returns:
a DERObject