我正在尝试让Ejabberd在centos7上使用letsencrypt证书。我一直收到关于证书不是由已知CA签名的错误。
我已经通过certbot创建了证书,并将privkey和fullchain文件连接到单个文件中。
所有的c2s连接都能正常工作,但s2s连接却不行。
启动Ejabberd时,我看到以下相关日志条目:
[warning] <0.606.0>@ejabberd_pkix:check_ca_dir:386 CA directory /etc/ssl/certs doesn't contain hashed certificate files; configuring 'ca_path' option might help
[warning] <0.606.0>@ejabberd_pkix:mk_cert_state:240 certificate from /opt/ejabberd/conf/xxxx.pem is invalid: certificate is signed by unknown CA例如,与draugr.de的连接会生成以下条目:
[info] <0.793.0>@ejabberd_s2s_in:handle_auth_failure:206 (tls|<0.792.0>) Failed inbound s2s EXTERNAL authentication draugr.de -> XXXXX.net (::FFFF:89.163.212.45): unable to get local issuer certificate我希望有人能帮助我,谢谢!
发布于 2017-10-22 07:34:50
我终于能够自己解决它了,但是我在接下来的几天里不在办公室,不能给你确切的配置来解决它。
但是如果我没记错的话,我在这里下载了CA包,https://curl.haxx.se/docs/caextract.html中有一些配置参数让ejabberd使用这个CA包来代替默认的CA包。
希望能对你有所帮助。
发布于 2017-11-02 15:46:30
如果它适用于c2s,而不适用于s2s,那么看起来配置文件中的s2s块没有使用certfile进行更新。我相信你为c2s准备了类似这样的东西:
port: 5222
ip: "::"
module: ejabberd_c2s
starttls: true
certfile: 'CERTFILE'
protocol_options: 'TLSOPTS'类似地,您的s2s块应该具有:
port: 5269
ip: "::"
module: ejabberd_s2s_in
starttls: true
certfile: 'CERTFILE'
protocol_options: 'TLSOPTS'
max_stanza_size: 131072
shaper: s2s_shaperhttps://stackoverflow.com/questions/46588539
复制相似问题