-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall_openssl.sh
More file actions
68 lines (52 loc) · 1.79 KB
/
install_openssl.sh
File metadata and controls
68 lines (52 loc) · 1.79 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
#!/bin/sh
#
#
#
clear
echo "
Version: 0.0.12 \r\n
Last Updated: 1/4/2024
\r\n \r\n
This is meant for Ubuntu 20.04+ \r\n \r\n
Updating system first..."
#sudo -E apt-get update
#wait
#sudo -E apt-get upgrade -y
sudo apt-get install -y ca-certificates
sudo update-ca-certificates
#--- clean up any previous tries ---
#rm openssl-3.0.2.tar.gz.*
#rm openssl-3.0.2.tar.gz.sha256.*
#--------------------------------------------------------------------------------------------
# https://code.luasoftware.com/tutorials/linux/upgrade-openssl-on-ubuntu-20/
openssl version -a
sudo cp -R /usr/lib/ssl /usr/lib/ssl-prev-version-bk
cd /home/ubuntu/
# get the latest version -
echo "\r\n \r\n \r\n"
echo "To get the latest version, visit: https://www.openssl.org/source/ \r\n \r\n \r\n "
echo " or: https://github.com/openssl/openssl/releases/ \r\n \r\n "
Version=3.2.0
echo "\r\n \r\n Downloading OpenSSL ${Version} \r\n \r\n "
wget --no-check-certificate https://www.openssl.org/source/openssl-${Version}.tar.gz
wget --no-check-certificate https://www.openssl.org/source/openssl-${Version}.tar.gz.sha256
echo "$(cat openssl-${Version}.tar.gz.sha256) openssl-${Version}.tar.gz" | sha256sum --check
echo "\r\n \r\n ---- Installing ---- \r\n \r\n "
tar -zxf openssl-${Version}.tar.gz
cd openssl-${Version}
./config
make
make test
sudo make install
#-- Change symbolic link
sudo mv /usr/bin/openssl /usr/bin/openssl-${Version}
sudo ln -s /usr/local/bin/openssl /usr/bin/openssl
sudo ldconfig
sudo ldconfig /usr/local/lib64/
#-- fix error (RAND_write_file) - https://superuser.com/questions/1485171/cant-load-root-rnd-into-rng-where-can-i-find-it-or-how-to-create-it
cd ~/; openssl rand -writerand .rnd
openssl version -a
cd ..
rm openssl-${Version}.tar.gz
rm openssl-${Version}.tar.gz.sha256
echo "\r\n \r\n DONE \r\n \r\n "