first of all: Sorry for my bad english. I hope you can understand me.
I using OpenSSL 1.0.2 and I have some problems with it. I have a STACK_OF(X509) object with three certificates and I want to convert this stack to an ASN1 object (like OCTET STRING or ANY). Is this possible? I use an external asn.1 library and not OpenSSL-ASN1. So I need the data as unsigned char (raw binary or DER encoded).
I can convert a single certificate via i2d_X509() into DER format. This is good, but I want the complete stack. This is my goal:
myAsn1Data ::= sequence {
... -- (some ASN.1 data)
... -- (some ASN.1 data)
ANY -- contain the DER encoded STACK_OF(X509)....somehow
}
But possibly is this the right way (ASN.1 syntax):
stackOfX509 ::= SEQUENCE_Of {
TBSCertificate
}
or like this:
stackOfX509 ::= SET_OF {
ANY -- contain a DER encoded X509 certificate
}
I hope someone can help me.