-
-
Save CvH/470a70678dc5b537a477b7daf881d526 to your computer and use it in GitHub Desktop.
Build openssl (with SSLv2/3 support for security testing)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# OpenSSL version from https://openssl.org/source/ | |
openssl_version=3.0.7 | |
# Install build dependencies | |
apt -y install build-essential | |
# Build OpenSSL | |
cd /root | |
wget https://openssl.org/source/openssl-${openssl_version}.tar.gz | |
tar xf "openssl-$openssl_version.tar.gz" | |
cd "openssl-$openssl_version" | |
./config --prefix="$(pwd)/local" --openssldir=/usr/lib/ssl enable-ssl2 enable-ssl3 no-shared | |
make depend | |
make | |
make -i install | |
cp local/bin/openssl /usr/bin/ | |
# To test: | |
# $ openssl s_client -connect google.com:443 -ssl2 | |
# 139675635414688:error:1407F0E5:SSL routines:ssl2_write:ssl handshake failure:s2_pkt.c:412: | |
# $ openssl s_client -connect google.com:443 -ssl3 | |
# 140647504119456:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:s3_pkt.c:365: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment