On 2007.04.17 at 16:17:03 +0200, M.Zdila/EpiSoftware Ltd. wrote:

> hi
> 
> i would like to use it in bash script so the certificate would be saved to a 
> cert.pem and then imported to java keystore using keytool. possible?
 
Use openssl s_client command, and then something like sed or awk to
extract certificate from output. 

If you are not familiar with sed or awk, you can also filter output of
s_client via openssl x509 command - it would strip away anything but
certificate.

Following command line:

echo|openssl s_client -connect site.com:443 |openssl x509 -out cert.pem

works for me. 


But why do you want web-site certificat in your keystore? Typically only
CA certificates are stored there. Does site in question use 

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to