Is server.pem actually a certificate? Run
grep '^-----.*CERTIFICATE' server.pem
You should see the beginning and ending of the certificate:
server.pem:-----BEGIN CERTIFICATE-----
server.pem:-----END CERTIFICATE-----
If you don't see this output, you are not using a valid certificate.
Also, I note that you are running the following unusual command:
openssl s_server -cert server.pem -www
This command does:
s_server
- starts a very basic openssl server
-cert server.pem
- uses the certificate server.pem
-www
- "sends a status message back to the client when it connects. This includes lots of information about the ciphers used and various session parameters. The output is in HTML format so this option will normally be used with a web browser."
openssl s_server
is generally only used for for debugging. Why are you using openssl s_server
? What are you trying to accomplish?