summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Schmeckpeper <ben.schmeckpeper@gmail.com>2022-07-20 11:50:45 -0500
committerBen Schmeckpeper <ben.schmeckpeper@gmail.com>2022-07-20 11:51:16 -0500
commit27c51ba2013362857c153bc370ea3ecd156a2b07 (patch)
tree8217194395e3d1ed3769628144fdef313cf6f432
parenta73b37b706c9956895b29ab18e2a2c93f43ed8d2 (diff)
downloadnet-ssh-27c51ba2013362857c153bc370ea3ecd156a2b07.tar.gz
Failing test for passing a blank password
-rw-r--r--test/authentication/test_ed25519.rb6
1 files changed, 6 insertions, 0 deletions
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')