-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-libssl1.1-system.sh
More file actions
executable file
·72 lines (62 loc) · 2.37 KB
/
install-libssl1.1-system.sh
File metadata and controls
executable file
·72 lines (62 loc) · 2.37 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
#
# install-libssl1.1-system.sh - Install DSSSL libraries as system libssl1.1
#
# This script installs the hardened DSSSL libraries as system libssl1.1
# so applications automatically use DSSSL-hardened SSL/TLS.
#
set -e
echo "Installing DSSSL as system libssl1.1..."
echo "=========================================="
# Check if running as root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root (sudo)"
echo ""
echo "Run the following commands as root:"
echo " sudo mkdir -p /opt/dsssl-system"
echo " sudo cp -r /home/john/DSMILSystem/toolchains/DSSSL /opt/dsssl-system/"
echo " sudo cp /opt/dsssl-system/libssl.so.4 /usr/lib/libssl.so.1.1"
echo " sudo cp /opt/dsssl-system/libcrypto.so.4 /usr/lib/libcrypto.so.1.1"
echo " sudo ln -sf /usr/lib/libssl.so.1.1 /usr/lib/libssl.so"
echo " sudo ln -sf /usr/lib/libcrypto.so.1.1 /usr/lib/libcrypto.so"
echo " sudo cp -r /opt/dsssl-system/include/openssl /usr/include/"
echo " sudo ldconfig"
echo ""
echo "Then test with:"
echo " openssl version"
echo " ldd /bin/ls | grep libssl"
exit 1
fi
# Create installation directory
echo "Creating installation directory..."
mkdir -p /opt/dsssl-system
# Copy DSSSL to system location
echo "Copying DSSSL libraries..."
cp -r /home/john/DSMILSystem/toolchains/DSSSL/* /opt/dsssl-system/
# Install as libssl1.1
echo "Installing as system libssl1.1..."
cp /opt/dsssl-system/libssl.so.4 /usr/lib/libssl.so.1.1
cp /opt/dsssl-system/libcrypto.so.4 /usr/lib/libcrypto.so.1.1
# Create default symlinks
echo "Creating library symlinks..."
ln -sf /usr/lib/libssl.so.1.1 /usr/lib/libssl.so
ln -sf /usr/lib/libcrypto.so.1.1 /usr/lib/libcrypto.so
# Install headers
echo "Installing headers..."
cp -r /opt/dsssl-system/include/openssl /usr/include/
# Update library cache
echo "Updating library cache..."
ldconfig
echo ""
echo "=========================================="
echo "✅ DSSSL installed as system libssl1.1!"
echo ""
echo "System now uses DSSSL-hardened SSL/TLS:"
echo " - libssl.so.1.1 → DSSSL-hardened libssl"
echo " - libcrypto.so.1.1 → DSSSL-hardened libcrypto"
echo " - All applications automatically use hardened SSL"
echo ""
echo "Test installation:"
echo " openssl version # Should show DSSSL version"
echo " ldd /bin/ls | grep libssl # Should show libssl.so.1.1"
echo "=========================================="