Skip to content

Instantly share code, notes, and snippets.

@skanga
Created December 27, 2018 11:06
Show Gist options
  • Save skanga/39353a02142cbc26cc8cd339ffcfe2dc to your computer and use it in GitHub Desktop.
Save skanga/39353a02142cbc26cc8cd339ffcfe2dc to your computer and use it in GitHub Desktop.
Upgrade TLS on Centos 5 by building WGET, CURL and OPENSSL from scratch
# Download, compile and install openssl
mkdir ~/src/
cd ~/src/
wget https://www.openssl.org/source/openssl-1.0.2a.tar.gz
tar -zxvf openssl-*.tar.gz
cd openssl-*
./config -fpic shared
make
sudo make install
sudo echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
sudo /sbin/ldconfig
# Download, compile and install curl
mkdir ~/src/
cd ~/src/
wget http://curl.haxx.se/download/curl-7.42.1.tar.gz
tar -xzvf curl-*.tar.gz
cd curl-*
./configure --with-ssl=/usr/local/ssl --disable-ldap
make
sudo make install
# Download, compile and install wget
mkdir ~/src/
cd ~/src/
wget https://ftp.gnu.org/gnu/wget/wget-1.19.5.tar.gz
./configure --with-ssl=openssl --with-libssl-prefix=/usr/local/ssl --prefix=/usr/local
make
sudo make install
# Check which ssl libraries are in use by wget and curl
ldd /usr/local/bin/curl | grep ssl
ldd /usr/local/bin/wget | grep ssl
@neohitokiri
Copy link

# Download, compile and install wget
mkdir ~/src/
cd ~/src/
wget https://ftp.gnu.org/gnu/wget/wget-1.19.5.tar.gz
tar -xzvf wget-1.19.5.tar.gz
cd wget-1.19.5
./configure --with-ssl=openssl --with-libssl-prefix=/usr/local/ssl --prefix=/usr/local
make
sudo make install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment