Package org.gudy.bouncycastle.asn1.x509
Class Targets
- java.lang.Object
-
- org.gudy.bouncycastle.asn1.ASN1Encodable
-
- org.gudy.bouncycastle.asn1.x509.Targets
-
- All 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 Modifier and Type Field Description private ASN1Sequence
targets
-
Fields inherited from class org.gudy.bouncycastle.asn1.ASN1Encodable
BER, DER
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Targets(ASN1Sequence targets)
Constructor from ASN1Sequence.Targets(Target[] targets)
Constructor from given targets.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Targets
getInstance(java.lang.Object obj)
Creates an instance of a Targets from the given object.Target[]
getTargets()
Returns the targets in aVector
.DERObject
toASN1Object()
Produce an object suitable for an ASN1OutputStream.-
Methods inherited from class org.gudy.bouncycastle.asn1.ASN1Encodable
equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode
-
-
-
-
Field Detail
-
targets
private ASN1Sequence targets
-
-
Constructor Detail
-
Targets
private Targets(ASN1Sequence targets)
Constructor from ASN1Sequence.- Parameters:
targets
- The ASN.1 SEQUENCE.- Throws:
java.lang.IllegalArgumentException
- if the contents of the sequence are invalid.
-
-
Method Detail
-
getInstance
public static Targets getInstance(java.lang.Object obj)
Creates an instance of a Targets from the given object.obj
can be a Targets or aASN1Sequence
- Parameters:
obj
- The object.- Returns:
- A Targets instance.
- Throws:
java.lang.IllegalArgumentException
- if the given object cannot be interpreted as Target.
-
getTargets
public Target[] getTargets()
Returns the targets in aVector
.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
- Specified by:
toASN1Object
in classASN1Encodable
- Returns:
- a DERObject
-
-