Shane A. Stillwell
Nginx SSL certificate error message "key values mismatch"

Nginx SSL certificate error message "key values mismatch"

Hold on Cowboy

This blog post is pretty old. Be careful with the information you find in here. The Times They Are A-Changin'

When setting up a SSL certificate and chain file for Nginx, you need to combine them into one file. If you combine them in the wrong order you’ll get a message similar to the following.

SSL_CTX_use_PrivateKey_file(" ... /www.nginx.com.key") failed (SSL: error:0B080074:x509 certificate routines: X509_check_private_key:key values mismatch)

This means you either didn’t combine them or you combined them in the wrong order. To combine the two together just do something like this.

cat www.example.com.crt www.certificatechain.com.ca > www.example.com.combined.crt

Now you’ll be happy as a lark.