SSL:错误:0B080074:x509 证书例程:X509_check_private_key:键值不匹配 [英] SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch

查看:51
本文介绍了SSL:错误:0B080074:x509 证书例程:X509_check_private_key:键值不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法设置 SSL.我用谷歌搜索了一些解决方案,但没有一个对我有用.我需要一些帮助...

I'm not able to setup SSL. I've Googled and I found a few solutions but none of them worked for me. I need some help please...

这是我尝试重新启动 nginx 时遇到的错误:

Here's the error I get when I attempt to restart nginx:

root@s17925268:~# service nginx restart
Restarting nginx: nginx: [emerg] SSL_CTX_use_PrivateKey_file("/etc/nginx/conf.d/ssl/ssl.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch)
nginx: configuration file /etc/nginx/nginx.conf test failed

我的证书来自 StartSSL,有效期为 1 年.

My certificate is from StartSSL and is valid for 1 year.

这是我测试的:

  • 证书和私钥没有尾随空格.
  • 我没有使用默认的 server.key 文件.
  • 我检查了 nginx.conf 和指令指向正确的私钥和证书.

我还检查了模数,我得到了密钥和证书的不同模数.

I also checked the modulus, and I get a different modulus for both key and certificate.

感谢您的帮助.:)

推荐答案

我得到了一个 MD5 哈希,其中密钥和证书的结果都不同.

I got a MD5 hash with different results for both key and certificate.

这说明了一切.您的密钥和证书不匹配.

This says it all. You have a mismatch between your key and certificate.

模数应该匹配.确保您拥有正确的密钥.

The modulus should match. Make sure you have correct key.

这篇关于SSL:错误:0B080074:x509 证书例程:X509_check_private_key:键值不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆