0
votes

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
I think I figure out.. but I still need help. Both key aren't build from request, so, I can't merge them. First I need explain what I want to do. I'll also explain step by step everything... so someone will be able to help me. I have 2 different computer: one Windows with javatool and one other Linux with openssl. The Windows is the server-side and the linux have a third party application using pem certificate to connect. - Openssl3343
First, on my server I generate a key for my client-side: keytool -genkey -alias client machine name -keyalg RSA -keystore server.keystore -keysize 2048 keytool -certreq -alias client machine name -keystore server.keystore -file req.csr This build a request "-----BEGIN NEW CERTIFICATE REQUEST-----". At this point I don't know what to do with the certificate request... - Openssl3343

1 Answers

1
votes

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