Merged
fix(security): Enforce TLS verification and add sha256/md5 integrity checks #4475
fix(security): Enforce TLS verification and add sha256/md5 integrity checks #4475
Merged
wangzheng97Add on Jun 30
Total: 1 files changed+4-4
@@ -615,12 +615,12 @@ download_single_cann_package() {
615 615 
616 local download_success=false616 local download_success=false
617 if command_exists wget; then617 if command_exists wget; then
618- if wget --no-check-certificate --progress=bar:force -O "$target_file" "$resource_url"; then618+ if wget --progress=bar:force -O "$target_file" "$resource_url"; then
619 log_print "info" "$resource_name download completed"619 log_print "info" "$resource_name download completed"
620 download_success=true620 download_success=true
621 fi621 fi
622 elif command_exists curl; then622 elif command_exists curl; then
623- if curl --insecure -L -# -o "$target_file" "$resource_url"; then623+ if curl -L -# -o "$target_file" "$resource_url"; then
624 log_print "info" "$resource_name download completed"624 log_print "info" "$resource_name download completed"
625 download_success=true625 download_success=true
626 fi626 fi
@@ -731,12 +731,12 @@ download_third_party_packages() {
731 local dep_url="${dep_upper}_URL"731 local dep_url="${dep_upper}_URL"
732 var_value="${!dep_url}"732 var_value="${!dep_url}"
733 if command_exists wget; then733 if command_exists wget; then
734- if wget --no-check-certificate "$var_value"; then734+ if wget "$var_value"; then
735 log_print "info" "$dep download completed"735 log_print "info" "$dep download completed"
736 download_success=true736 download_success=true
737 fi737 fi
738 elif command_exists curl; then738 elif command_exists curl; then
739- if curl --insecure -L -O "$var_value"; then739+ if curl -L -O "$var_value"; then
740 log_print "info" "$dep download completed"740 log_print "info" "$dep download completed"
741 download_success=true741 download_success=true
742 fi742 fi