Skip to content

Commit

Permalink
Merge pull request #421 from dscho/disable-cbc-ciphers-again
Browse files Browse the repository at this point in the history
git-extra: disable CBC ciphers in ssh_config again
  • Loading branch information
dscho authored Jun 2, 2022
2 parents da05dce + 65c6b50 commit 092c857
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions git-extra/git-extra.install.in
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,9 @@ test -d "$TMPDIR" || test ! -d "$TMP" || {\
! grep -q '^Ciphers [a-z].*cbc' /etc/ssh/ssh_config ||
sed -i -e 's/^Ciphers [a-z].*cbc/# &/' /etc/ssh/ssh_config

grep -q '^Ciphers\s\++' /etc/ssh/ssh_config ||
printf '%s\n%s\n' \
'# Added by git-extra' \
'Ciphers +aes128-cbc,3des-cbc,aes256-cbc,aes192-cbc' \
>>/etc/ssh/ssh_config
# Revert change by prior versions of git-extra.
! grep -q '^Ciphers\s\++' /etc/ssh/ssh_config ||
sed -i -e '/^# Added by git-extra/{N;/^\(.*\n\)\?Ciphers +[a-z].*cbc/d}' /etc/ssh/ssh_config

grep -q '^Host\s\+ssh\.dev\.azure\.com' /etc/ssh/ssh_config ||
printf '%s\n%s\n\t%s\n\t%s\n' \
Expand Down

0 comments on commit 092c857

Please sign in to comment.