I generated an SSL certificate as specified on the answer to stunnel: SSL-to-SSL? (for smtp/imap)
And have the following configuation file:
cert = /home/marshall/stunnels/certs/umistunnel.keys
; protocol version (all, SSLv2, SSLv3, TLSv1)
sslVersion = SSLv3
pid = ./stunnel4.pid
[https]
accept = 4433
connect = 3000
When I run
> stunnel config.conf
the error I get is:
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
If I instead run:
> stunnel filethatdoesnotexist.asdf
I get the same result. And, if I run stunnel without any parameters, the only change is that the error states Line 0. What am I doing wrong here?
Best Answer
You may have both stunnel3 & stunnel4 installed on your system.
The default for "stunnel" is to softlink it to stunnel3:
The syntax of the stunnel.conf for stunnel3 is not compatible with the one for stunnel4.
Hence the error. Try removing stunnel3.