net-ssh-backports 6.3.4.backports → 6.3.6.backports

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4b789946bcf65642f7c7bfcfca48f1a01900826fc934d30a3e5626f67d484d6
4
- data.tar.gz: 8f7282bb62e397fe3bc348a04936c8384481fba3fbd3378983402fee654aa14e
3
+ metadata.gz: 11f75b7708864ad48d35c19370dce6e2865aa0be10cc2ad8c46f88c8bd2e677e
4
+ data.tar.gz: 75b03f76290c2267085309e76cc3c30ae7892f447a564dafbe17771b958693c7
5
5
  SHA512:
6
- metadata.gz: 8eee9be83f4313adb451351c7b353f163c635d837e2f327ca400647317a3d3d5b2a1f76ddb123718c8fba029e1f5a196ee93dfd7aef23ba8e11ed8e159d5e4b9
7
- data.tar.gz: 67af2e5b3f775c55686ca7ed8aa353a1df2a01b1ce29c1ae5dc87a046a9d45d8f977a5d884333607d30b0da09228fc629c8c1d2d677e008085aeea9dfa37e074
6
+ metadata.gz: bb7591b3a6db6c47ee242cba5b13d2b9a3285c88b0199c6eb487c50e026957e1c212d810a36b5aefa72a49901e73b0721f21a17f03908496d6274673a9131c34
7
+ data.tar.gz: 4b562a83eda3bf0894f292f72362210397715a7a368bfeca63e7696dc0b1b5430948629e4a8da77b1e132195b03d2515a29bf90ff67454cc71b668fc02255f91
data/.gitignore CHANGED
@@ -11,3 +11,4 @@ test/integration/playbook.retry
11
11
  .byebug_history
12
12
 
13
13
  tryout
14
+ /.vscode/settings.json
@@ -249,35 +249,37 @@ module Net
249
249
  # Load prepared identities. Private key decryption errors ignored if ignore_decryption_errors
250
250
  def load_identities(identities, ask_passphrase, ignore_decryption_errors)
251
251
  identities.map do |identity|
252
- case identity[:load_from]
253
- when :pubkey_file
254
- key = KeyFactory.load_public_key(identity[:pubkey_file])
255
- { public_key: key, from: :file, file: identity[:privkey_file] }
256
- when :privkey_file
257
- private_key = KeyFactory.load_private_key(
258
- identity[:privkey_file], options[:passphrase], ask_passphrase, options[:password_prompt]
259
- )
260
- key = private_key.send(:public_key)
261
- { public_key: key, from: :file, file: identity[:privkey_file], key: private_key }
262
- when :data
263
- private_key = KeyFactory.load_data_private_key(
264
- identity[:data], options[:passphrase], ask_passphrase, "<key in memory>", options[:password_prompt]
265
- )
266
- key = private_key.send(:public_key)
267
- { public_key: key, from: :key_data, data: identity[:data], key: private_key }
268
- else
269
- identity
270
- end
271
- rescue OpenSSL::PKey::RSAError, OpenSSL::PKey::DSAError, OpenSSL::PKey::ECError, OpenSSL::PKey::PKeyError, ArgumentError => e
272
- if ignore_decryption_errors
273
- identity
274
- else
252
+ begin
253
+ case identity[:load_from]
254
+ when :pubkey_file
255
+ key = KeyFactory.load_public_key(identity[:pubkey_file])
256
+ { public_key: key, from: :file, file: identity[:privkey_file] }
257
+ when :privkey_file
258
+ private_key = KeyFactory.load_private_key(
259
+ identity[:privkey_file], options[:passphrase], ask_passphrase, options[:password_prompt]
260
+ )
261
+ key = private_key.send(:public_key)
262
+ { public_key: key, from: :file, file: identity[:privkey_file], key: private_key }
263
+ when :data
264
+ private_key = KeyFactory.load_data_private_key(
265
+ identity[:data], options[:passphrase], ask_passphrase, "<key in memory>", options[:password_prompt]
266
+ )
267
+ key = private_key.send(:public_key)
268
+ { public_key: key, from: :key_data, data: identity[:data], key: private_key }
269
+ else
270
+ identity
271
+ end
272
+ rescue OpenSSL::PKey::RSAError, OpenSSL::PKey::DSAError, OpenSSL::PKey::ECError, OpenSSL::PKey::PKeyError, ArgumentError => e
273
+ if ignore_decryption_errors
274
+ identity
275
+ else
276
+ process_identity_loading_error(identity, e)
277
+ nil
278
+ end
279
+ rescue Exception => e
275
280
  process_identity_loading_error(identity, e)
276
281
  nil
277
282
  end
278
- rescue Exception => e
279
- process_identity_loading_error(identity, e)
280
- nil
281
283
  end.compact
282
284
  end
283
285
 
@@ -55,26 +55,26 @@ module Net
55
55
  # service request. Returns true if an authentication method succeeds in
56
56
  # authenticating the user, and false otherwise.
57
57
  def authenticate(next_service, username, password=nil)
58
- begin
59
- debug { "beginning authentication of `#{username}'" }
58
+ debug { "beginning authentication of `#{username}'" }
60
59
 
61
- transport.send_message(transport.service_request("ssh-userauth"))
62
- expect_message(SERVICE_ACCEPT)
60
+ transport.send_message(transport.service_request("ssh-userauth"))
61
+ expect_message(SERVICE_ACCEPT)
63
62
 
64
- key_manager = KeyManager.new(logger, options)
65
- keys.each { |key| key_manager.add(key) } unless keys.empty?
66
- keycerts.each { |keycert| key_manager.add_keycert(keycert) } unless keycerts.empty?
67
- key_data.each { |key2| key_manager.add_key_data(key2) } unless key_data.empty?
68
- default_keys.each { |key| key_manager.add(key) } unless options.key?(:keys) || options.key?(:key_data)
63
+ key_manager = KeyManager.new(logger, options)
64
+ keys.each { |key| key_manager.add(key) } unless keys.empty?
65
+ keycerts.each { |keycert| key_manager.add_keycert(keycert) } unless keycerts.empty?
66
+ key_data.each { |key2| key_manager.add_key_data(key2) } unless key_data.empty?
67
+ default_keys.each { |key| key_manager.add(key) } unless options.key?(:keys) || options.key?(:key_data)
69
68
 
70
- attempted = []
71
-
72
- @auth_methods.each do |name|
69
+ attempted = []
70
+ @auth_methods.each do |name|
71
+ begin
73
72
  next unless @allowed_auth_methods.include?(name)
74
73
 
75
74
  attempted << name
76
75
 
77
76
  debug { "trying #{name}" }
77
+
78
78
  begin
79
79
  auth_class = Methods.const_get(name.split(/\W+/).map { |p| p.capitalize }.join)
80
80
  method = auth_class.new(self, key_manager: key_manager, password_prompt: options[:password_prompt])
@@ -84,8 +84,7 @@ module Net
84
84
  end
85
85
 
86
86
  return true if method.authenticate(next_service, username, password)
87
- rescue Net::SSH::Authentication::DisallowedMethod => e
88
- raise e
87
+ rescue Net::SSH::Authentication::DisallowedMethod
89
88
  end
90
89
  end
91
90
 
@@ -52,7 +52,7 @@ module Net
52
52
  MINOR = 3
53
53
 
54
54
  # The tiny component of this version of the Net::SSH library
55
- TINY = 4
55
+ TINY = 6
56
56
 
57
57
  # The prerelease component of this version of the Net::SSH library
58
58
  # nil allowed
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ssh-backports
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.3.4.backports
4
+ version: 6.3.6.backports
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2024-01-16 00:00:00.000000000 Z
13
+ date: 2024-01-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bcrypt_pbkdf