use a stronger hashing algorithm
Nobody wants to use md5 these days... Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
parent
057717074a
commit
acf3ac9884
@ -99,7 +99,7 @@ _mnt_dev() {
|
|||||||
_verify_checksum() {
|
_verify_checksum() {
|
||||||
local _status
|
local _status
|
||||||
cd "/run/archiso/bootmnt/${archisobasedir}/${arch}"
|
cd "/run/archiso/bootmnt/${archisobasedir}/${arch}"
|
||||||
md5sum -c airootfs.md5 > /tmp/checksum.log 2>&1
|
sha512sum -c airootfs.sha512 > /tmp/checksum.log 2>&1
|
||||||
_status=$?
|
_status=$?
|
||||||
cd "${OLDPWD}"
|
cd "${OLDPWD}"
|
||||||
return ${_status}
|
return ${_status}
|
||||||
@ -153,7 +153,7 @@ archiso_mount_handler() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${checksum}" == "y" ]]; then
|
if [[ "${checksum}" == "y" ]]; then
|
||||||
if [[ -f "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.md5" ]]; then
|
if [[ -f "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.sha512" ]]; then
|
||||||
msg -n ":: Self-test requested, please wait..."
|
msg -n ":: Self-test requested, please wait..."
|
||||||
if _verify_checksum; then
|
if _verify_checksum; then
|
||||||
msg "done. Checksum is OK, continue booting."
|
msg "done. Checksum is OK, continue booting."
|
||||||
@ -163,7 +163,7 @@ archiso_mount_handler() {
|
|||||||
launch_interactive_shell
|
launch_interactive_shell
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "ERROR: checksum=y option specified but ${archisobasedir}/${arch}/airootfs.md5 not found"
|
echo "ERROR: checksum=y option specified but ${archisobasedir}/${arch}/airootfs.sha512 not found"
|
||||||
launch_interactive_shell
|
launch_interactive_shell
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -41,7 +41,7 @@ archiso_pxe_http_mount_handler () {
|
|||||||
_curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sfs" "/${arch}"
|
_curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sfs" "/${arch}"
|
||||||
|
|
||||||
if [[ "${checksum}" == "y" ]]; then
|
if [[ "${checksum}" == "y" ]]; then
|
||||||
_curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.md5" "/${arch}"
|
_curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sha512" "/${arch}"
|
||||||
fi
|
fi
|
||||||
if [[ "${verify}" == "y" ]]; then
|
if [[ "${verify}" == "y" ]]; then
|
||||||
_curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sfs.sig" "/${arch}"
|
_curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sfs.sig" "/${arch}"
|
||||||
|
@ -249,7 +249,7 @@ _mkairootfs_sfs () {
|
|||||||
_mkchecksum () {
|
_mkchecksum () {
|
||||||
_msg_info "Creating checksum file for self-test..."
|
_msg_info "Creating checksum file for self-test..."
|
||||||
cd "${work_dir}/iso/${install_dir}/${arch}"
|
cd "${work_dir}/iso/${install_dir}/${arch}"
|
||||||
md5sum airootfs.sfs > airootfs.md5
|
sha512sum airootfs.sfs > airootfs.sha512
|
||||||
cd ${OLDPWD}
|
cd ${OLDPWD}
|
||||||
_msg_info "Done!"
|
_msg_info "Done!"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user