forked from rbsec/sslscan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_openssl_debian.sh
executable file
·52 lines (39 loc) · 1.08 KB
/
build_openssl_debian.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
#
# Script to build OpenSSL deb packages from source with SSLv2 support
# Built packages are automatically installed with dpkg
# Tested on Debian Squeeze and Kali 1.0.8
# The packages will probably get replaced next time you do a system upgrade
# To prevent this, hold the packages using the following command
#
# $ echo "openssl hold" | sudo dpkg --set-selections
#
# Clean up previous build
sudo rm -rf openssl
mkdir openssl
cd openssl
# Exit if any command fails
set -e
# Install dependencies
sudo apt-get update
sudo apt-get -y --no-upgrade install build-essential devscripts quilt
sudo apt-get -y build-dep openssl
# Get the source
apt-get source openssl
cd openssl*
# Revert the patches
quilt pop -a
# Remove the 'ssltest_no_sslv2.patch' line
sed -i '/ssltest_no_sslv2.patch/d' debian/patches/series
# Remove the 'no-ssl2' build argument
sed -i 's/ no-ssl2//g' debian/rules
# Re-apply patches
quilt push -a
# Packaging stuff
dch -n 'Allow SSLv2'
dpkg-source --commit
# Build the packges (takes a while)
sudo debuild -uc -us
# Install the packages
cd ..
sudo dpkg -i *ssl*.deb