Article ID: 114565, created on May 4, 2014, last review on May 9, 2014

  • Applies to:
  • Plesk 11.0 for Linux
  • Plesk for Windows

问题

我尝试上传一个证书到控制面板收到以下错误信息:

    ERROR message:Unable to set the certificate:Incompatible private key/certificate pair.

当使用 .txt 格式时也遇到相同问题。

原因

私钥和证书可能不匹配。

解决方案

要检查是否匹配,请对比私钥的 modulus 部分和证书的该部分:

复制 domain.tld 的私钥内容到文件(例如,domain.tld)并检查其 modulus 部分:

    # openssl rsa -text -noout -in domain.tld -modulus | grep Modulus=
    Modulus=A6ACD1BCD71FBAD9499D95B9F341F65980BFE13D5189CE9629642F7211E7F8C5CD42394A6F0047A51E4451647E367E36B69D8A42F62B995532F6331189C120AAB7D5A92D016870622D85E675A5C3D7160F820F87D5717C157D4324SDF2D39DB5E2SFSCF848D72C5C6805D604C830995FEBAAE01C058EE88F57E108034B4AC7F2BB97DB20A8D6480B422171C6E2E7550740A9A436B2FBD8EF660E80CE1808CEEBC0B7CC55E6625EA44D94600AC4EC31AF89F81A8E9870E4F760B7238A91DBFDC0805BE05B32D8CF59C0BBEA82850B0FF635DFE8CF63683C3CDAAF7F4484A97D06450760677AD5B7EEA5EEEED922D0F367FE9C43F5636A635DACB977FE250C42A1F348D85BCEEDDSFEFA343

然后检查证书的 modulus 部分:

    openssl x509 -text -noout -in domain.tld.crt -modulus | grep Modulus=
    Modulus=C55B529210F59C810097B854BA3816627DE68D903B85336F92E1E278B0DF31F01944FEFB7A0E7EA39D830559CBF1C40923F826FFE77C97896067F22331C5A12392C39EDE43B68BF1A68075EB238DFAD3423431123AFBF33f3DF9D1123008B52EA7C08D10D2318F32258BDD12B207F3CDB1D062765E8732DF82547245574A041ED7E49AFE828E73C3D42C614AC44475D880E4103181A4FAA3F3EA584CAD8A68707C311B93D0F5DFEF6D40106BEBEA4B14FB1B9C4ED8E91B1A12BBBD879B50689DCDFD294AC12526E2276EF63E79C114CCD7825262F2DE9BFD3642AA579725B23AAAD48F1A9E16C389BBB7E08C0F193CAEA244D107742831E3C16B6E84F4447D70F2300DCE67352B4B7B323SDFS

如果 modulus 部分不匹配,问题则由证书本身引起的,必须要重新签发。您需要联系签发带有相同 CSR 的证书的 CA 申请一个新的证书。

56797cefb1efc9130f7c48a7d1db0f0c a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 0a53c5a9ca65a74d37ef5c5eaeb55d7f 85a92ca67f2200d36506862eaa6ed6b8 aea4cd7bfd353ad7a1341a257ad4724a

Email subscription for changes to this article