I am doing this certificate setup for the first time and overall objective is that when a user hits https://mybox.com:8080 user should get a valid trusted certificate in return.
I have been provided by 2 files:
.crt
.key
Those are currently copied to my home directory.
What until now I was able to do was to setup Apache with below config and bring it up successfully:
<VirtualHost mybox.com:8080>
DocumentRoot /var/www/html
DirectoryIndex index.html
ServerName mybox.com
SSLEngine on
SSLVerifyClient require
SSLVerifyDepth 1
SSLCertificateFile /x/home/me/mybox.crt
SSLCertificateKeyFile /x/home/me/mybox.key
</VirtualHost>
But when I issue openssl command I get the below error output:
# openssl s_client -connect mybox:8080
CONNECTED(00000003)
depth=0 .....
Support/CN=mybox.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 .....
Support/CN=mybox.com
verify error:num=27:certificate not trusted
verify return:1
depth=0 .....
Support/CN=mybox.com
verify error:num=21:unable to verify the first certificate
verify return:1
3154:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1092:SSL alert number 40
3154:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188:
#
I am not sure if it is at all picking up certs from my configured path - but the resource who gave me the .crt and .key files states that it is a valid certificate.
Please help me to setup this cert on my box.