Merged
fix(security): Enforce TLS verification and add sha256/md5 integrity checks #4475
wangzheng97Add on Jun 30
fix(security): Enforce TLS verification and add sha256/md5 integrity checks #4475
Merged
Total: 1 files changed+4-4
| @@ -615,12 +615,12 @@ download_single_cann_package() { | |||
| 615 | 615 | ||
| 616 | local download_success=false | 616 | local download_success=false |
| 617 | if command_exists wget; then | 617 | if command_exists wget; then |
| 618 | - if wget --no-check-certificate --progress=bar:force -O "$target_file" "$resource_url"; then | 618 | + 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=true | 620 | download_success=true |
| 621 | fi | 621 | fi |
| 622 | elif command_exists curl; then | 622 | elif command_exists curl; then |
| 623 | - if curl --insecure -L -# -o "$target_file" "$resource_url"; then | 623 | + 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=true | 625 | download_success=true |
| 626 | fi | 626 | 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; then | 733 | if command_exists wget; then |
| 734 | - if wget --no-check-certificate "$var_value"; then | 734 | + if wget "$var_value"; then |
| 735 | log_print "info" "$dep download completed" | 735 | log_print "info" "$dep download completed" |
| 736 | download_success=true | 736 | download_success=true |
| 737 | fi | 737 | fi |
| 738 | elif command_exists curl; then | 738 | elif command_exists curl; then |
| 739 | - if curl --insecure -L -O "$var_value"; then | 739 | + if curl -L -O "$var_value"; then |
| 740 | log_print "info" "$dep download completed" | 740 | log_print "info" "$dep download completed" |
| 741 | download_success=true | 741 | download_success=true |
| 742 | fi | 742 | fi |