File tree Expand file tree Collapse file tree 2 files changed +8
-32
lines changed
etc/initramfs-tools/hooks Expand file tree Collapse file tree 2 files changed +8
-32
lines changed Original file line number Diff line number Diff line change @@ -5,28 +5,12 @@ case $1 in
55esac
66. /usr/share/initramfs-tools/hook-functions
77
8- copy_exec /usr/bin/wget /usr/bin/real_wget
9-
10- strace_and_copy_libs_for_url ()
11- {
12- LIB_PAT=" \" .*/lib/.*\" "
13- STRACED_LIBS=$( strace /usr/bin/wget --no-iri -q -O - " $1 " 2>&1 | grep -o " $LIB_PAT " )
14-
15- echo " $STRACED_LIBS " | while IFS= read -r line
16- do
17- # Strip the quotation marks
18- line=" ${line% \" } "
19- line=" ${line# \" } "
20-
21- if [ -f " $line " ]
22- then
23- copy_exec " $line "
24- fi
25- done
26- }
27-
28- strace_and_copy_libs_for_url " https://www.debian.org"
29- strace_and_copy_libs_for_url " https://raw.githubusercontent.com/stupidpupil/https-keyscript/master/tests/fixtures/encrypted_keyfile"
30- strace_and_copy_libs_for_url " https://mozilla-modern.badssl.com"
8+ # To find out what library are needed do
9+ # strace busybox wget https://badssl.com 2>&1 | grep open
10+ for needed_lib in " libnss_dns.*" " libnss_files.so.*" " libresolv.so.*" " ld-linux-*.so.*" " libc.so.*"
11+ do
12+ lib=$( find /lib/ -name " $needed_lib " -type f)
13+ copy_exec " $lib "
14+ done
3115
3216copy_exec /etc/ssl/certs/ca-certificates.crt
Original file line number Diff line number Diff line change @@ -34,14 +34,6 @@ if [ -z "$url" ] || [ -z "$openssl_passphrase" ]; then
3434 use_https=0
3535fi
3636
37- if [ -x /usr/bin/real_wget ]; then
38- wget_path=" /usr/bin/real_wget"
39- elif [ -x /usr/bin/wget ]; then
40- wget_path=" /usr/bin/wget"
41- else
42- wget_path=" wget"
43- fi
44-
4537#
4638# Plymouth helper functions
4739#
@@ -149,7 +141,7 @@ https_try_fetch ()
149141
150142 message " Fetching remote keyfile for $CRYPTTAB_NAME ..."
151143
152- encrypted_keyfile=$( $wget_path --secure-protocol=PFS -q -O - " $url " )
144+ encrypted_keyfile=$( wget -q -O - " $url " )
153145
154146 if [ $? -eq 0 ]; then
155147 decrypted_keyfile=$( echo " $encrypted_keyfile " | openssl enc -base64 -aes-256-cbc -md sha256 -d -salt -k " $openssl_passphrase " )
You can’t perform that action at this time.
0 commit comments