STunnel不读取configuration文件

我生成了一个SSL证书,如stunnel的答案中所指定的那样:SSL-to-SSL? (用于smtp / imap)并具有以下configuration文件:

cert = /home/marshall/stunnels/certs/umistunnel.keys ; protocol version (all, SSLv2, SSLv3, TLSv1) sslVersion = SSLv3 pid = ./stunnel4.pid [https] accept = 4433 connect = 3000 

当我跑步

 > stunnel config.conf 

我得到的错误是:

 Reading configuration from descriptor 3 Snagged 64 random bytes from /home/marshall/.rnd Wrote 1024 new random bytes to /home/marshall/.rnd PRNG seeded successfully Line 1: End of section stunnel: SSL server needs a certificate 

如果我运行:

 > stunnel filethatdoesnotexist.asdf 

我得到相同的结果。 而且,如果我运行stunnel没有任何参数,唯一的变化是错误状态行0.我在这里做错了什么?

您的系统上可能安装了stunnel3和stunnel4。

“stunnel”的默认值是将其链接到stunnel3:

 root@sibelius:/usr/bin# ls -l stunnel* lrwxrwxrwx 1 root root 8 Oct 18 2011 stunnel -> stunnel3 -rwxr-xr-x 1 root root 2797 Oct 18 2011 stunnel3 -rwxr-xr-x 1 root root 109904 Oct 18 2011 stunnel4 

stunnel3的stunnel.conf的语法与stunnel4的语法不兼容。

因此,错误。 尝试删除stunnel3。

发现我的问题…这是没有真正的文件(至less在我的Ubuntu系统)。 如果我运行该命令

 > stunnel4 config.conf 

然后一切正常,所有输出显示在debugging日志文件中(如果在configuration文件中configuration)。

也把[https]的证书行。