Class TargetInformation
java.lang.Object
org.gudy.bouncycastle.asn1.ASN1Encodable
org.gudy.bouncycastle.asn1.x509.TargetInformation
- All Implemented Interfaces:
DEREncodable
Target information extension for attributes certificates according to RFC
3281.
SEQUENCE OF Targets
-
Field Summary
FieldsFields inherited from class ASN1Encodable
BER, DER -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConstructor from a ASN1Sequence.TargetInformation(Target[] targets) According to RFC 3281 only one targets element must be produced.TargetInformation(Targets targets) Constructs a target information from a single targets element. -
Method Summary
Modifier and TypeMethodDescriptionstatic TargetInformationgetInstance(Object obj) Creates an instance of a TargetInformation from the given object.Targets[]Returns the targets in this target information extension.Produce an object suitable for an ASN1OutputStream.Methods inherited from class ASN1Encodable
equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode
-
Field Details
-
targets
-
-
Constructor Details
-
TargetInformation
Constructor from a ASN1Sequence.- Parameters:
seq- The ASN1Sequence.- Throws:
IllegalArgumentException- if the sequence does not contain correctly encoded Targets elements.
-
TargetInformation
Constructs a target information from a single targets element. According to RFC 3281 only one targets element must be produced.- Parameters:
targets- A Targets instance.
-
TargetInformation
-
-
Method Details
-
getInstance
Creates an instance of a TargetInformation from the given object.objcan be a TargetInformation or aASN1Sequence- Parameters:
obj- The object.- Returns:
- A TargetInformation instance.
- Throws:
IllegalArgumentException- if the given object cannot be interpreted as TargetInformation.
-
getTargetsObjects
Returns the targets in this target information extension.- Returns:
- Returns the targets.
-
toASN1Object
Produce an object suitable for an ASN1OutputStream. Returns:SEQUENCE OF TargetsAccording to RFC 3281 only one targets element must be produced. If multiple targets are given in the constructor they are merged into one targets element. If this was produced from a
ASN1Sequencethe encoding is kept.- Specified by:
toASN1Objectin classASN1Encodable- Returns:
- a DERObject
-