• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 508
  • Last Modified:

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
0
DJ_AM_Juicebox
Asked:
DJ_AM_Juicebox
1 Solution
 
DJ_AM_JuiceboxAuthor Commented:
Oh, if I drop the https from the address, it generates:

echo | openssl s_client -connect localhost:8443 2>&1 | \
>  sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > mycert.pem
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now