问题
Basicly, I have a private PEM key and a public certificate PEM key. They work when I use them both (but don't work if I only use one of them).
I use and this works: wget --no-check-certificate --private-key=dev-private.pem --certificate=dev.pem https://???.???.???.??? (This is self-signed certificate signed by java keytool. I have acces to this keystore.) I also produce a jks and it's work great in browser.
The problem is one of my application I neeed to use a certificate and he only support 1 PEM key (only support certicate with "-----BEGIN CERTIFICATE-----" header). I don't have figure out how to make 1 PEM key containing private and public key.
Did there is some way to join both for make 1 big PEM key ?
They're so many command line for openssl.
Thank you
回答1:
Not fully sure what you are asking, but you can just join both the public and private key into a single file and that may be all you need for your application. Just cut and past the PEM key from each of the current files into a new file. Then point your application to the new file. I have used that technique myself for one of my applications.
Hope this helps.
Al
来源:https://stackoverflow.com/questions/5994797/openssl-join-a-public-and-a-private-key