Skip to content

Commit

Permalink
Merge pull request #7202 from peterwywong/hostkeys-2
Browse files Browse the repository at this point in the history
Improve PR 7193: Check host keys supported by the operating system and report new ones if any
  • Loading branch information
besawn committed Jun 21, 2022
2 parents e84af2a + b73d7e1 commit 3a301a1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions xCAT-test/autotest/testcase/install_xCAT/case0
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ check:rc==0
check:output=~running
cmd:rm -rf /install_xCAT_xcat-core.tar.bz2 /install_xCAT_xcat-dep.tar.bz2

# Check host keys supported by the operating system and report new ones, if any.
cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys
check:rc==0
cmd:ssh-keygen --help 2>&1 | grep "\[-t" | sed -E 's/.*(\[\-t.*)/\1/' | cut -d "[" -f2 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 | grep -v '\-sk' > /tmp/current_os_host_keys
check:rc==0
cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys
check:output!~>
cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys
check:rc==0

# Obtain the highest version of TLS supported by OpenSSL/TLS.
cmd:openssl s_client --help 2>&1 | grep "\-tls1" | awk '{print $1}' | sort | tail -1
check:rc==0
Expand Down Expand Up @@ -61,6 +71,16 @@ cmd:sleep 5
cmd:service goconserver status
cmd:service conserver status

# Check host keys supported by the operating system and report new ones, if any.
cmd:echo -e "dsa\necdsa\ned25519\nrsa\nrsa1" > /tmp/known_host_keys
check:rc==0
cmd:ssh-keygen --help 2>&1 | grep "\[-t" | sed -E 's/.*(\[\-t.*)/\1/' | cut -d "[" -f2 | cut -d "]" -f1 | sed 's/-t//' | sed 's/|//g' | xargs -n 1 | grep -v '\-sk' > /tmp/current_os_host_keys
check:rc==0
cmd:diff /tmp/known_host_keys /tmp/current_os_host_keys
check:output!~>
cmd:rm -f /tmp/known_host_keys /tmp/current_os_host_keys
check:rc==0

# Obtain the highest version of TLS supported by OpenSSL/TLS.
cmd:openssl s_client --help 2>&1 | grep "\-tls1" | awk '{print $1}' | sort | tail -1
check:rc==0
Expand Down

0 comments on commit 3a301a1

Please sign in to comment.