summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMiklós Fazekas <mfazekas@szemafor.com>2023-01-24 04:28:14 +0100
committerGitHub <noreply@github.com>2023-01-24 04:28:14 +0100
commitc8b740b0cd37b4df0987107f5eaafce4f2db4f03 (patch)
tree984254c50f71834c1d01c0fc540b246e7bef0f2f /lib
parent4922d2bc3a52f1ad3db02336602fd3733cb804b2 (diff)
parent6792bebca7c4a92f7145811fc0cd3ba8551cb8a4 (diff)
downloadnet-ssh-c8b740b0cd37b4df0987107f5eaafce4f2db4f03.tar.gz
Merge pull request #876 from bschmeck/raise-on-nil-pbkdf
Raise error when BCryptPbkdf fails
Diffstat (limited to 'lib')
-rw-r--r--lib/net/ssh/authentication/ed25519.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/net/ssh/authentication/ed25519.rb b/lib/net/ssh/authentication/ed25519.rb
index dccc64f..892000a 100644
--- a/lib/net/ssh/authentication/ed25519.rb
+++ b/lib/net/ssh/authentication/ed25519.rb
@@ -77,6 +77,7 @@ module Net
raise "BCryptPbkdf is not implemented for jruby" if RUBY_PLATFORM == "java"
key = BCryptPbkdf::key(password, salt, keylen + ivlen, rounds)
+ raise DecryptError.new("BCyryptPbkdf failed", encrypted_key: true) unless key
else
key = '\x00' * (keylen + ivlen)
end