Skip to content
Snippets Groups Projects
Commit b042ab7b authored by Markus Gothe's avatar Markus Gothe :ok_hand:
Browse files

openssh: Do full validation of the file.

'ssh-keygen -l' is a bit forgiving for
corrupted files, hardening this by
using 'ssh-keygen -y' instead.
parent 3ce7af98
No related branches found
No related tags found
No related merge requests found
......@@ -346,7 +346,7 @@ start_service()
key=/etc/ssh/ssh_host_${type}_key
[ -f $key ] && {
[ -x /usr/bin/ssh-keygen ] && {
if ! /usr/bin/ssh-keygen -l -f $key > /dev/null 2>&1; then
if ! /usr/bin/ssh-keygen -y -f $key > /dev/null 2>&1; then
rm -rf $key
fi
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment