0

A few months ago a colleague who left generated a CA certificate from GoDaddy. I am not sure the exact steps he took but currently we would like to install the CA certificate on a server to fully comply with EFRIS regulations which mandate that clients should transition from self-signed certificates to CA certificates within 3 months of go-live.

Somehow he was able to generate the .p12 private certificate. I suspect he used a desktop application called Keystore Explorer but he set a password on the certificate so I can't use it because I don't know it.

I was able to access the godaddy website and downloaded the original certificate files provided by GoDaddy CA. They are a PEM file, a CRT file and two other files called bundle files.

My wish is to generate the relevant .p12 or .pfx or .jks private certificate out of these PEM and CRT files but I don't know how. I think the public certificate will still be the .crt file.

When I tried to use Keystore Explorer to generate the private key PKCS file, I was able to generate it but it did not have the private key in it and the server gave an error telling me that the private key is missing from the .pfx file. I am not sure what this private key is supposed to be. Is it something I should already have?

I have tried to google for ways to convert a PEM file to a PKCS file but the guides have been so far unclear. For now I am reading this SSL stackexchange post to find out how SSL works. Any help will be greatly appreciated.

Gilboot
  • 121
  • 1
  • 3
  • 1
    Do you have the private key that corresponds with the public key in the PEM and/or CRT file? You'll need it, in order to do anything useful with the certificate. If you don't have it, you may want to just start over with a new keypair and a new CSR. Notwithstanding, you can use openssl pkcs12 to create PKCS#12 or PFX files from PEM or CRT files. See https://www.openssl.org/docs/man1.1.1/man1/pkcs12.html for more info. – mti2935 May 22 '21 at 21:33
  • 1
  • "generated a CA certificate from GoDaddy." I doubt so. You get certificates from CA such as GoDaddy. You don't generate a "CA certificate". 2) "I was able to generate it but it did not have the private key" Because normally the private key never leaves your side, the CA generates your certificate based on content submitted that does not include the private key. In all cases your certificate provider should be able to help you install the certificate. At worst, you just start from scratch with a new request for certificate, and a new private key.
  • – Patrick Mevzek May 22 '21 at 21:34
  • @mti2935 Will the PKCS#12 file that I will generate be valid to the CA? – Gilboot May 22 '21 at 21:44
  • @PatrickMevzek If I make a new request for a certificate from GoDaddy they will charge me double. I need a way to make use of the one they gave me already – Gilboot May 22 '21 at 21:45
  • 2
    It's not a matter of whether or not the PKCS#12 file will be valid to the CA, it's a matter of whether or not the PKCS#12 file will be valid to the client. For that, you need the private key that the public key in the PKCS#12 was derived from. After the CA issues and signs the certificate, the CA is out of the loop. See my answer below for more info. – mti2935 May 22 '21 at 22:25