Class TargetInformation

  • All Implemented Interfaces:
    ASN1Encodable, Encodable

    public class TargetInformation
    extends ASN1Object
    Target information extension for attributes certificates according to RFC 3281.
               SEQUENCE OF Targets
     
    • Constructor Detail

      • TargetInformation

        public TargetInformation​(Targets targets)
        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

        public TargetInformation​(Target[] targets)
        According to RFC 3281 only one targets element must be produced. If multiple targets are given they must be merged in into one targets element.
        Parameters:
        targets - An array with Targets.
    • Method Detail

      • getInstance

        public static TargetInformation getInstance​(java.lang.Object obj)
        Creates an instance of a TargetInformation from the given object.

        obj can be a TargetInformation or a ASN1Sequence

        Parameters:
        obj - The object.
        Returns:
        A TargetInformation instance.
        Throws:
        java.lang.IllegalArgumentException - if the given object cannot be interpreted as TargetInformation.
      • getTargetsObjects

        public Targets[] getTargetsObjects()
        Returns the targets in this target information extension.
        Returns:
        Returns the targets.
      • toASN1Primitive

        public ASN1Primitive toASN1Primitive()
        Produce an object suitable for an ASN1OutputStream. Returns:
                  SEQUENCE OF Targets
         

        According 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 ASN1Sequence the encoding is kept.

        Specified by:
        toASN1Primitive in interface ASN1Encodable
        Specified by:
        toASN1Primitive in class ASN1Object
        Returns:
        a ASN1Primitive