Why am I seeing “SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch”?

2014/08/28 16:46:16 [emerg] 2995#0: SSL_CTX_use_PrivateKey_file("/etc/ssl/private/mycompany.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)

This is nginx’s way of saying that the public and private SSL keys don’t match. The most common cause of this is that the component keys that make up the public key were not concatenated together in the right order.

# unzip STAR_mycompany_com.zip
# cat AddTrustExternalCARoot.crt COMODOSSLCA.crt STAR_mycompany_com.crt > /etc/ssl/certs/mycompany.chained.crt

Also, make sure you’re specifying the keys right in you nginx config:

ssl_certificate           /etc/ssl/certs/mycompany.chained.crt;
ssl_certificate_key       /etc/ssl/private/mycompany.key;

…and restart:

# service nginx start
Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Twitter
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • StumbleUpon

Leave a Reply

Your email address will not be published. Required fields are marked *