How can I convert the openssh × .509 certificate?

527    Asked by StacyReed in Cyber Security , Asked on Oct 17, 2022

 I have a RSA SSH public key which I have converted from a x509 certificate and I want to be able to convert the SSH key back into a x509 certificate to compare the values with the original certificate.

How would I get about doing this? And is this even possible to do with only the public key?

Answered by Sherly Montejano

It is not possible to create a Openssh × .509 certificate out of the public key on the way you chose.


A certificate is a public key signed by an authority (normally a CA). So to create the certificate back from your public key you have to sign the public key from the same authority as before. Then you will get the certificate back.

To sign you need the private key of the authority. Also be aware that your new certificate will get another serial number than before.



Your Answer

Interviews

Parent Categories