From 27c51ba2013362857c153bc370ea3ecd156a2b07 Mon Sep 17 00:00:00 2001 From: Ben Schmeckpeper Date: Wed, 20 Jul 2022 11:50:45 -0500 Subject: Failing test for passing a blank password --- test/authentication/test_ed25519.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/authentication/test_ed25519.rb b/test/authentication/test_ed25519.rb index 0d47714..e4f347a 100644 --- a/test/authentication/test_ed25519.rb +++ b/test/authentication/test_ed25519.rb @@ -92,6 +92,12 @@ unless ENV['NET_SSH_NO_ED25519'] self.assert_equal(pub_key.fingerprint('sha256'), key_fingerprint_sha256_pwd) end + def test_pwd_key_blank + self.assert_raises(Net::SSH::Authentication::ED25519::OpenSSHPrivateKeyLoader::DecryptError) do + Net::SSH::Authentication::ED25519::PrivKey.read(private_key_no_rounds, '') + end + end + def test_priv_key_no_rounds_should_raise self.assert_raises(Net::SSH::Authentication::ED25519::OpenSSHPrivateKeyLoader::DecryptError) do Net::SSH::Authentication::ED25519::PrivKey.read(private_key_no_rounds, 'pwd') -- cgit v1.2.1