我已经在 linux 服务器上安装了 stunnel 版本 stunnel-5.43.tar.gz。分配认证路径和文件后,由于tlsversionstunnel.conf
,我的 stunnel 无法启动。看到这是我的 stunnel.conf:
[abc]
client = yes cert = /usr/local/etc/stunnel/cert.pem key = /usr/local/etc/stunnel/key.pem CAfile = /usr/local/etc/stunnel/Cert.pem sslVersion = TLSv1.2 accept = 127.0.0.1:5001 connect = x.x.x.x:port
启动 stunnel 时出现此错误:
[root@test stunnel]# stunnel #Certification loaded here >Loading certificate from file: /usr/local/etc/stunnel/cert.pem >Certificate loaded from file: /usr/local/etc/stunnel/cert.pem >Loading private key from file: /usr/local/etc/stunnel/key.pem >Insecure file permissions on /usr/local/etc/stunnel/key.pem >#Getting here >SSL_CTX_use_PrivateKey_file: B080074: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch >Service [abc]: Failed to initialize TLS context
服务 [abc]:无法初始化 TLS 上下文