Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conversion X.509 Certificate represented as a HEX string into PEM encoded X.509 certificate

Is it possible to convert X.509 Certificate represented as a HEX string to the PEM encoded X.509 certificate? (.CER format)


1 Answers

You can try this (I suppose it is DER encoded) cat cert.txt | xxd -r -p | openssl x509 -inform DER -out mycert.pem -outform PEM

it converts it to binary and then pipes it to openssl to convert it to pem

like image 52
Boklucius Avatar answered Oct 19 '25 13:10

Boklucius



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!