-6

i has download cacert.pem from internet, but how to get cacert.key ?

How to get public/private key from cacert.pem ?

4
  • 1
    Where did you download this file from? Why do you think you should be able to get the key? What do you want this cert/key for?
    – Zoredache
    Jan 26, 2014 at 2:20
  • "curl.haxx.se/ca/cacert.pem", i try to set my nginx configuration, i set key for "ssl_certificate cacert.pem", but what key set for "ssl_certificate_key" Jan 26, 2014 at 2:24
  • 4
    Uhm, I think you must be very confused. That isn't a set of keys you can use for your own site. This is a set of CA certs like what comes pre-installed in your browser, to authenticate that sites have a certificate signed by a valid CA. There is no way you could get the private keys associated with those certificates.
    – Zoredache
    Jan 26, 2014 at 2:37
  • 1
    I don't think you really know what you're trying to do... You can't get the private keys of those certificates and you shouldn't even be able to (that'd be a very, véry bad thing) - why nor consider buying an ssl certificate online?
    – Robbietjuh
    Jan 26, 2014 at 2:54

2 Answers 2

2

Based on the initial description, you don't. The key file is what "secures" the certificate; without it, it can only be referenced. With it, you can sign other certificates. Which in turn means you can impersonate, and that would be A Bad Thing(tm).

1

Use the openssl command to work with certificate files.

However there is no private key there. A certificate is a collection of a public key together with some other info. Nothing more.

3
  • how to make/get file like file.key from cacert.pem, can i make/get it with openssl Jan 26, 2014 at 2:02
  • 1
    I'm not sure this answers the question, and am tempted to throw a delete vote on it. Maybe you could edit your answer. I mean, we both know he's not gonna get the private key - maybe you could say that, and explain why a little bit to make your answer better. Jan 26, 2014 at 2:41
  • 1
    Yeah, we could as well delete the whole question which wouldn't make much of a difference.
    – Marki
    Jan 26, 2014 at 2:45

Not the answer you're looking for? Browse other questions tagged .