Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Can't get bash command to run for ssl cert signing?

Posted on 2011-03-09
1
Medium Priority
?
503 Views
Last Modified: 2012-05-11
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
Comment
Question by:DJ_AM_Juicebox
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
DJ_AM_Juicebox earned 0 total points
ID: 35091787
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days software publishers make it possible to move all the possible applications on smartphones, tablets, smartwatches, and more. Although behind every logic and decision is a gross doubt: how do they make it possible? In this blog post, we sha…
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.
Simple Linear Regression

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question