2

Im trying to upgrade my stunnel to 5.4 on my Centos 6.6 server, to give me TLS1.2 support (4.9 doesn't support it). However I cannot compile the source code as it gives me errors (and I cannot find any meaningful solution on the Internet)

I can't find a repository with stunnel 5.4 in, or a pre-built RPM that I can download and install. Does anyone know anywhere where I can download it from?

Thanks

4

It's pretty simple. You have to create a .rpm package from the latest .tar.gz file (stunnel 5.40 in our case). You will need rpmbuild tool and also compilers and other stuff installed.

1) yum -y install glibc-devel kernel-headers kernel-devel gcc gcc-c++ autoconf automake make
2) yum -y install rpm-build
3) wget https://www.stunnel.org/downloads/stunnel-5.40.tar.gz

Since the spec file used for the build will search for some missing files, you have to create them manually otherwise the build will fail

4) touch stunnel.logrotate; touch stunnel.init
5) ln -s /usr/share/doc/stunnel-4.29 /usr/share/doc/stunnel
6) rpmbuild -ta stunnel-5.40.tar.gz
7) rpm -Uhv /root/rpmbuild/RPMS/x86_64/stunnel*

In case the rpmbuild fails you could do this:

cd /root/rpmbuild/BUILD/stunnel-5.40/
make
make install

Issue a stunnel -version at the end just to be sure that you have the latest stunnel version up & running like in my case:

root@zira /root/rpmbuild/BUILD/stunnel-5.40 (33 entries, 1 hidden)
56/23483# stunnel -version
stunnel 5.40 on x86_64-redhat-linux-gnu platform
Compiled/running with OpenSSL 1.0.1e-fips 11 Feb 2013
  • In RHEL7 and Stunnel 5.56, rpmbuild was always going to /home/user/rpmbuild and not root. And the rpm -Uhv was failing and there is no x86_64 folder. but the make install idea works perfectly. I don't know if this is due to stunnel changes or rhel, but thanks for the steps. Saved me from hours of aimless surfing lol. – Macindows Nov 27 at 2:24
1

The above answer is perfect. It does skip 2 steps in between thou. When you directly run the command rpmbuild, in most cases you'll be faced with an error. Missing repos for OpenSSL and tcpwrappers. In order to install those dependencies, execute the following commands:

$ yum install tcp_wrappers-devel
$ yum install openssl.i386 openssl-devel.x86_64

Then you can run the command rpmbuild -ta stunnel-5.40.tar.gz successfully.

  • Thank you. Although I did get openssl.i386 not found error but I assume it is removed from later versions. I installed openssl.i386 openssl-devel.x86_64 and openssl-devel for just in case. – Macindows Nov 27 at 2:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.