LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ASN.1 BER file decoding (https://www.linuxquestions.org/questions/linux-newbie-8/asn-1-ber-file-decoding-505829/)

maheshdf 11-29-2006 04:03 AM

ASN.1 BER file decoding
 
Hi,

Can somebody tell how to open ASN.1 coded hex file using any utiliy in Linux and how to decode it.

unSpawn 11-29-2006 05:49 AM

how to open ASN.1 coded hex file
Open as in "show structure" see "man asn1parse" from the OpenSSL toolkit.


how to decode it.
BER is a subformat of DER which is encoding for ASN.1.
Since OpenSSL generates PEM, to convert PEM to DER your route would be:
"openssl x509 -inform PEM -outform DER -in cert.pem -out cert.der"
so reversing the route should then be:
"openssl x509 -inform DER -outform PEM -in cert.der -out cert.pem".
"man x509" for more information.


All times are GMT -5. The time now is 06:38 AM.