/** * Produce an object suitable for an Asn1OutputStream. * * Returns: * * <pre> * 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 * </pre> * * @return a DERObject */ public override Asn1Object ToAsn1Object() { AttributeX509[] v = new AttributeX509[attributes.Count]; for (int i = 0; i < attributes.Count; ++i) { v[i] = (AttributeX509)attributes[i]; } return new DerSequence(v); }