大网数据广告活动
服务器运维问答

Unable to verify the first certificate (Comodo EssentialSSL Wildcard)

· 52CE 我爱测

I am new to setting up SSL-certificates and working with servers in general, so please bear with me as I try to explain the situation I have put myself in. I recently acquired an Comodo EssentialSSL Wildcard license that is going…

问题原文

原帖链接 · wille0221 · CC BY-SA 3.0

I am new to setting up SSL-certificates and working with servers in general, so please bear with me as I try to explain the situation I have put myself in.

I recently acquired an Comodo EssentialSSL Wildcard license that is going to be used for securing my server. The server I am configuring is for use with Kolab. Kolab is working but does not have SSL configured, so I figured I might set that up. I followed the instructions provided on the corresponding Kolab howto-page (https://docs.kolab.org/howtos/secure-kolab-server.html), but got stuck on the section where you set up the cyrus-IMAP server.

When running:

openssl s_client -showcerts -connect example.org:993

I get the following output (truncated):

CONNECTED(00000003)
depth=0 OU = Domain Control Validated, OU = EssentialSSL Wildcard, CN = *.example.org
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 OU = Domain Control Validated, OU = EssentialSSL Wildcard, CN = *.example.org
verify error:num=27:certificate not trusted
verify return:1
depth=0 OU = Domain Control Validated, OU = EssentialSSL Wildcard, CN = *.example.org
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
 0 s:/OU=Domain Control Validated/OU=EssentialSSL Wildcard/CN=*.example.org
   i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Domain Validation Secure Server CA
-----BEGIN CERTIFICATE-----

...

-----END CERTIFICATE-----
---
Server certificate
subject=/OU=Domain Control Validated/OU=EssentialSSL Wildcard/CN=*.example.org
issuer=/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Domain Validation Secure Server CA
---
No client certificate CA names sent
---
SSL handshake has read 2019 bytes and written 421 bytes
---
...

    Start Time: 1502097786
    Timeout   : 300 (sec)
    Verify return code: 21 (unable to verify the first certificate)
---
* OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE AUTH=PLAIN AUTH=LOGIN SASL-IR] example.org Cyrus IMAP git2.5+0-Debian-2.5~dev2015021301-0~kolab2 server ready

If I specify the -CApath to the certificates it does however work and I get the verify return code: 0 (ok), but only if I run the command while logged into the server through ssh. While setting up my mail on thunderbird I can access my mailbox, but have to first add an security exception because the certificate has an "Unknown Identity". The certificate does however work flawlessly on port 443 for https without specifying the -CApath.

Any help would be greatly appreciated.

已采纳解答

原帖链接 · wille0221 · CC BY-SA 3.0

I solved the problem by checking that the order of my intermediate bundle file was correctly formatted and changed it from a .ca-bundle to a .pem and added the following line to my imapd.conf:

tls_ca_path: /etc/ssl/certs

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-08-09)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。