0

Decoded data using openssl asn1parse with the command "openssl asn1parse -in a.pem -out b.pem".
How to implement the same using Openssl C language API.

  • "openssl asn1parse -in a.pem " parses and gives output in correct format. How to perform the same job using openssl C API ? – user3820915 Oct 19 '20 at 05:59
  • That `asn1parse` command that you gave prints stuff to `stdout` and converts the original input file to its DER-formatted version (so calling it `b.pem` is not right). Also, the `asn1parse` tool can handle ASN.1 files generically, which is probably not what you need to (re-)implement. Can you be more specific about what it exactly is that you have to implement using the c API? Maybe start by defining a c function prototype that shows/documents what your input is and your expected output, as a starting point. Your current question is too vague to be reasonably answerable. – Reinier Torenbeek Oct 19 '20 at 17:08
  • I have decoded "openssl asn1parse -in a.pem" to get data. My requirement is to do the same functionality using C API . Can you please suggest which API do I need to use ? I see "ASN1_get_object" and "ASN1_parse_dump" being used. Which API should I use for decoding "openssl asn1parse -in a.pem". Thanks. – user3820915 Oct 20 '20 at 18:06

0 Answers0