Socket errors running "openssl s_client -showcerts"

I have a .PEM file that I want to install on a Tomcat server. The file looks something like this:

friendlyName:
subject=CN=myserver.ca.example.com, OU=servers, O=Example, C=US
issuer=CN=Example Basic Assurance Software Issuing CA G3, OU=certservers, O=Example, C=US
-----BEGIN CERTIFICATE-----
xxxxxxxx
-----END CERTIFICATE-----
subject=CN=Example Basic Assurance Software Issuing CA G3, OU=certservers, O=Example, C=US
issuer=CN=Example Basic Assurance Software Root CA G2, OU=certservers, O=Example, C=US
-----BEGIN CERTIFICATE-----
xxxxxxxx
-----END CERTIFICATE-----
subject=CN=Example Basic Assurance Software Root CA G2, OU=certservers, O=Example, C=US
issuer=CN=Example Basic Assurance Software Root CA G2, OU=certservers, O=Example, C=US
-----BEGIN CERTIFICATE-----
xxxxxxxx
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,E2EC8A310F02CA01
xxxxxxxx
-----END RSA PRIVATE KEY-----

When I run the command "openssl s_client -showcerts -cert myserver.pem", I get this:

Enter pass phrase for myserver.pem:
socket: Bad file descriptor
connect:errno=9

I'm not sure why I'm getting this when I just want to show the certificates in the file. I've tried various options, such as -prexit, and I'm not seeing anything useful. Do I need to extract the root certificate and install it somewhere? If so, where? Or is my problem something completely different?

1 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like