如何在Stunnel服务器上修复“服务[XXX]:SSL服务器需要证书”?

时间:2017-01-10 00:41:33

标签: ssl server certificate stunnel

我上周运行的Stunnel服务器配置正常。似乎在sudo apt-get update && sudo apt-get upgrade后不再是这种情况了。

版本:

$ ls -la /usr/bin/stunnel
?????????? 1 root root 8 Xxx XX  2016 /usr/bin/stunnel -> stunnel4
$ stunnel -version
stunnel 5.30 on x86_64-pc-linux-gnu platform
Compiled with OpenSSL 1.0.2e 3 Dec 2015
Running  with OpenSSL 1.0.2g  1 Mar 2016
Update OpenSSL shared libraries or rebuild stunnel

这是我的服务器stunnel.conf

verify = 2
debug = 7
output = stunnel.log
options = NO_SSLv3

[XXX]
client = no
verify = 0
accept = 9888
connect = localhost:9879
key = path/to/file.key
CAfile = path/to/ca.pem

之前的工作原理,现在给出了以下错误:

$ sudo stunnel stunnel.conf
[ ] Initializing service [XXX]
[!] Service [XXX]: SSL server needs a certificate

为什么我现在需要证书?这不是服务器吗?我已经提供了私钥和CA证书,并认为这已经足够了。

如果我错了,请纠正我,但我认为Stunnel服务器不需要客户端的配置证书就可以启动会话来监听。

无论问题是什么。我感谢任何帮助。

1 个答案:

答案 0 :(得分:1)

我通过将CAfile更改为cert来解决问题:

[XXX]
...
cert = path/to/ca.pem