加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – STunnel不读取配置文件

发布时间:2020-12-14 02:56:41 所属栏目:Linux 来源:网络整理
导读:我根据 stunnel: SSL-to-SSL? (for smtp/imap)的答案生成了SSL证书 并具有以下配置文件: cert = /home/marshall/stunnels/certs/umistunnel.keys; protocol version (all,SSLv2,SSLv3,TLSv1)sslVersion = SSLv3pid = ./stunnel4.pid[https]accept = 4433con
我根据 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的语法不兼容.

因此错误.尝试删除stunnel3.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读