I'm working on a CSR-generating API using OpenSSL 1.0.2m. My question is: does OpenSSL do any sort of reordering of the entries in an ASN1 sequence? Specifically, when encoding a postal address X509_ATTRIBUTE.
To create a postal address X509_ATTRIBUTE, I'm calling X509_ATTRIBUTE_create_by_NID(NULL, nid, atrtype, data, len). nid is 861 (0x35d) (postal address), atrtype is 16 (ASN1 sequence).
My data is the concatenated results of three i2d_ASN1_GENERALSTRING() calls for three strings, resulting in this data: