DJ_AM_Juicebox
asked on
Can't get bash command to run for ssl cert signing?
Hi,
I'm trying to use a self-signed cert with android. There's an article here:
http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html#comment-form
that explains how to do it, but I'm not sure how to run the first step:
"1. Grab the public certificate from the server you want to trust. Replace ${MY_SERVER} with your server's address."
echo | openssl s_client -connect ${MY_SERVER}:443 2>&1 | \
sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > mycert.pem
I've got my server running at https:localhost:8443, so I try using that as the address like:
echo | openssl s_client -connect https://localhost:8443 2>&1 | \
sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > mycert.pem
but this just prints out an empty mycert.pem file. I'm not sure if the sytax I used above is incorrect, or there is something else wrong in my environment. My server is jetty, and I know it's serving up https on 8443. I'm running on mac.
Thanks
I'm trying to use a self-signed cert with android. There's an article here:
http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html#comment-form
that explains how to do it, but I'm not sure how to run the first step:
"1. Grab the public certificate from the server you want to trust. Replace ${MY_SERVER} with your server's address."
echo | openssl s_client -connect ${MY_SERVER}:443 2>&1 | \
sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > mycert.pem
I've got my server running at https:localhost:8443, so I try using that as the address like:
echo | openssl s_client -connect https://localhost:8443 2>&1 | \
sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > mycert.pem
but this just prints out an empty mycert.pem file. I'm not sure if the sytax I used above is incorrect, or there is something else wrong in my environment. My server is jetty, and I know it's serving up https on 8443. I'm running on mac.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.