File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 22
33if [[ $( id -u) = 0 ]]; then # only root can update crypto policies
44 # Set system crypto policies based on the ENABLE_SHA1 environment variable.
5+ is_el8=false
6+ is_el9=false
57 if grep -q ' ^VERSION_ID=["]8' /etc/os-release; then
68 is_el8=true
9+ elif grep -q ' ^VERSION_ID=["]9' /etc/os-release; then
10+ is_el9=true
711 else
8- is_el8=false
12+ : # SHA1 is not supported on el10
913 fi
1014
1115 if command -v update-crypto-policies & > /dev/null; then
@@ -15,14 +19,16 @@ if [[ $(id -u) = 0 ]]; then # only root can update crypto policies
1519 YES)
1620 if $is_el8 ; then
1721 update-crypto-policies --set DEFAULT > /dev/null
18- else
22+ elif $is_el9 ; then
1923 update-crypto-policies --set DEFAULT:SHA1 > /dev/null
24+ else
25+ echo " SHA1 is not supported on this platform; please unset ENABLE_SHA1"
2026 fi
2127 ;;
2228 NO)
2329 if $is_el8 ; then
2430 update-crypto-policies --set DEFAULT:NO-SHA1 > /dev/null
25- else
31+ elif $is_el9 ; then
2632 update-crypto-policies --set DEFAULT > /dev/null
2733 fi
2834 ;;
You can’t perform that action at this time.
0 commit comments