0

I'm trying to use OpenSSL to create a private key which matches (the public key of?) a certain CA (PEM file), but I don't know what command to use to achieve this.

If I just create a random private key and try to use it with the CA I get a "No certificate matches private key" error.

Eventually I would like to use my private key here: http://gazelle.ihe.net/pki/details/assemble.seam

Davio
  • 4,609
  • 2
  • 31
  • 58

1 Answers1

0

It's not possible to generate a private key from a public key. That's the whole point of encryption. See wikipedia for more information about encryption.

For the thing you want to do, you have to generate a public and private key using OpenSSL en have your public key signed by a CA. For more information about how to generate your public/private keypair using openssl see http://www.openssl.org/docs/HOWTO/keys.txt. Make sure you don't enter a password when prompted for it, otherwise, every time your server/service restarts, you'll be prompted to enter it and it can cause downtime of your application.

Jonathan Kortleven
  • 613
  • 1
  • 5
  • 16