Class Targets
java.lang.Object
org.gudy.bouncycastle.asn1.ASN1Encodable
org.gudy.bouncycastle.asn1.x509.Targets
- All Implemented Interfaces:
DEREncodable
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:
-
Field Summary
FieldsFields inherited from class ASN1Encodable
BER, DER -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTargets(ASN1Sequence targets) Constructor from ASN1Sequence.Constructor from given targets. -
Method Summary
Modifier and TypeMethodDescriptionstatic TargetsgetInstance(Object obj) Creates an instance of a Targets from the given object.Target[]Returns the targets in aVector.Produce an object suitable for an ASN1OutputStream.Methods inherited from class ASN1Encodable
equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode
-
Field Details
-
targets
-
-
Constructor Details
-
Targets
Constructor from ASN1Sequence.- Parameters:
targets- The ASN.1 SEQUENCE.- Throws:
IllegalArgumentException- if the contents of the sequence are invalid.
-
Targets
Constructor from given targets.The vector is copied.
- Parameters:
targets- AVectorofTargets.- Throws:
IllegalArgumentException- if the vector contains not only Targets.- See Also:
-
-
Method Details
-
getInstance
Creates an instance of a Targets from the given object.objcan be a Targets or aASN1Sequence- Parameters:
obj- The object.- Returns:
- A Targets instance.
- Throws:
IllegalArgumentException- if the given object cannot be interpreted as Target.
-
getTargets
Returns the targets in aVector.The vector is cloned before it is returned.
- Returns:
- Returns the targets.
-
toASN1Object
Produce an object suitable for an ASN1OutputStream. Returns:Targets ::= SEQUENCE OF Target- Specified by:
toASN1Objectin classASN1Encodable- Returns:
- a DERObject
-