Solved SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch

Charlie Root

Member


Messages: 23

Hi,
I have renew certificate for my site. They crt and key file applied to nginx is running on Centos 7 host. It is working well.
However, this pair of key-cert file has issue when applied to nginx in a freeBSD 11.1-RELEASE server

Bash:
# nginx -t
nginx: [emerg] SSL_CTX_use_PrivateKey_file("/usr/local/etc/nginx/ssl/mysite.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)
nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed
I checked that the key-cert files are match by openssl
Code:
[root@web /usr/local/etc/nginx/ssl]#  openssl rsa -noout -modulus -in mysite.key | openssl md5
(stdin)= ce714d371fc9c2a882cd85d3b5e96992
[root@web /usr/local/etc/nginx/ssl]#  openssl x509 -noout -modulus -in 2018/mysite.crt | openssl md5
(stdin)= ce714d371fc9c2a882cd85d3b5e96992
 
OP
OP
Charlie Root

Charlie Root

Member


Messages: 23

how did i generate the csr file
Code:
openssl req -new -newkey rsa:2048 -nodes -keyout mysite.key  -out mysite.csr
Then i send this csr to geotrust. They signed and sent back the crt file
 
Top