我根据
stunnel: SSL-to-SSL? (for smtp/imap)的答案生成了SSL证书
并具有以下配置文件:
并具有以下配置文件:
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,唯一的变化是错误状态为Line 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的语法不兼容.