I'm trying to setup certificates for a web server (Splunk, in particular), and don't think I have them in the right format. I need to provide the path to a private key file, and a CA certificate. Right now, I have both of those in PEM format (the contents of both files start with "----BEGIN CERTIFICATE-----"). But that doesn't seem to be working, and my best guess is that the private key file needs to be in a different format. Basically, I'd like to have it in a format such that the command
openssl rsa -in MYFILE -check
succeeds (right now, that fails with "unable to load Private Key"). I can, however, currently verify it with
openssl x509 -in MYFILE -text -noout
So how can I convert the file so that the first command succeeds on it?