org.bouncycastle.asn1.x509

Class SubjectDirectoryAttributes

Implemented Interfaces:
DEREncodable

public class SubjectDirectoryAttributes
extends ASN1Encodable

This extension may contain further X.500 attributes of the subject. See also RFC 3039.
     SubjectDirectoryAttributes ::= Attributes
     Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
     Attribute ::= SEQUENCE 
     {
       type AttributeType 
       values SET OF AttributeValue 
     }
     
     AttributeType ::= OBJECT IDENTIFIER
     AttributeValue ::= ANY DEFINED BY AttributeType
 
See Also:
for AttributeType ObjectIdentifiers.

Field Summary

Fields inherited from class org.bouncycastle.asn1.ASN1Encodable

BER, DER

Constructor Summary

SubjectDirectoryAttributes(Vector attributes)
Constructor from a vector of attributes.
SubjectDirectoryAttributes(ASN1Sequence seq)
Constructor from ASN1Sequence.

Method Summary

Vector
getAttributes()
static SubjectDirectoryAttributes
getInstance(Object obj)
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

SubjectDirectoryAttributes

public SubjectDirectoryAttributes(Vector attributes)
Parameters:
attributes - The attributes.

SubjectDirectoryAttributes

public SubjectDirectoryAttributes(ASN1Sequence seq)
Constructor from ASN1Sequence. The sequence is of type SubjectDirectoryAttributes:
      SubjectDirectoryAttributes ::= Attributes
      Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
      Attribute ::= SEQUENCE 
      {
        type AttributeType 
        values SET OF AttributeValue 
      }
      
      AttributeType ::= OBJECT IDENTIFIER
      AttributeValue ::= ANY DEFINED BY AttributeType
 
Parameters:
seq - The ASN.1 sequence.

Method Details

getAttributes

public Vector getAttributes()
Returns:
Returns the attributes.

getInstance

public static SubjectDirectoryAttributes getInstance(Object obj)

toASN1Object

public DERObject toASN1Object()
Produce an object suitable for an ASN1OutputStream. Returns:
      SubjectDirectoryAttributes ::= Attributes
      Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
      Attribute ::= SEQUENCE 
      {
        type AttributeType 
        values SET OF AttributeValue 
      }
      
      AttributeType ::= OBJECT IDENTIFIER
      AttributeValue ::= ANY DEFINED BY AttributeType
 
Overrides:
toASN1Object in interface ASN1Encodable
Returns:
a DERObject