Commit 2198f516 authored by Jamie Scaife's avatar Jamie Scaife

Added new verification functions, other minor adjustments

parent 9ee0d7b5
......@@ -149,6 +149,19 @@ gpg_signed_hashes_sha256_sha1 () {
hash_verify "sha1" "SHA1SUMS" "downloads/$choice/"
}
gpg_signed_direct () {
gpg_verify "downloads/$choice/$sig_name" "downloads/$choice/$file_name"
}
hashed_direct_sha256_md5 () {
hash_verify "sha256" "SHA256SUMS" "downloads/$choice/"
hash_verify "md5" "MD5SUMS" "downloads/$choice/"
}
wireshark_gpg_signed_message_with_hashes_sha256_sha1_md5 () {
echo "Automatic verification for Wireshark is not yet available, due to their less-common format of integrity verification files."
}
gpg_verify () { # <signature> <file>
echo "Verifying '$2' using signature '$1':" | log
gpg_verification_output=$("$gnupg" --verify "$1" "$2" 2>&1)
......@@ -257,11 +270,12 @@ case "$choice" in
"Nmap 7.70")
file_name="nmap-7.70-setup.exe"
sig_name="sigs/nmap-7.70-setup.exe.asc"
sig_name="nmap-7.70-setup.exe.asc"
dl_site_name="nmap-dist"
dl_site_sha256_expected="506d1efe9a49d17dd9d73613bc4e2d305e9f8b1ad55caeca78d926a4a637d832"
dl_path=""
dl_files=("$file_name" "$sig_name")
dl_sig_path="sigs"
dl_files=("$file_name" "$dl_sig_path/$sig_name")
verif_method="gpg_signed_direct"
;;
......@@ -286,12 +300,13 @@ case "$choice" in
;;
"Wireshark 3.0.2")
file_name="win64/Wireshark-win64-3.0.2.exe"
file_name="Wireshark-win64-3.0.2.exe"
sig_name="SIGNATURES-3.0.2.txt"
dl_site_name="wireshark-downloads"
dl_site_sha256_expected="9d5e133d874e70434799b0fcd2e27f636226e1c247ad152ccd16f29825c39aec"
dl_path=""
dl_files=("$file_name" "$sig_name")
dl_file_path="win64"
dl_files=("$dl_file_path/$file_name" "$sig_name")
verif_method="wireshark_gpg_signed_message_with_hashes_sha256_sha1_md5"
;;
......@@ -340,6 +355,6 @@ case "$verif_method" in
;;
esac
if [ -z "$security_warning" ]; then
if [ ! -z "$security_warning" ]; then
echo -e "\nSECURITY WARNING: $security_warning" | log
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment