net-ssh-backports 6.3.5.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: 8f0926227faa7f95554bb3b35498266161a625e5419da811c2f3b28cf031bac5
4
- data.tar.gz: f84f8c5d5801318f6b9a906fb49f0d6d5b0f9d99524103ad496a9d4029059f2d
3
+ metadata.gz: 11f75b7708864ad48d35c19370dce6e2865aa0be10cc2ad8c46f88c8bd2e677e
4
+ data.tar.gz: 75b03f76290c2267085309e76cc3c30ae7892f447a564dafbe17771b958693c7
5
5
  SHA512:
6
- metadata.gz: ece9f000d7d5073c457c88a535b19d580c7343e415ab092ba3bbe4155b29aef96e30da80bcd1609e4bfa45deafebe9ffffb602965c709ee546ddbe8e54bf924a
7
- data.tar.gz: 6e288d23a6ef7c63b404eb03761b301e734eade713238b4bf09474330e91d3d257083b90fa64a33f4b482030ca8372211154fc17f9afa320c9f72680fb7cd2c2
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
 
@@ -67,7 +67,6 @@ module Net
67
67
  default_keys.each { |key| key_manager.add(key) } unless options.key?(:keys) || options.key?(:key_data)
68
68
 
69
69
  attempted = []
70
-
71
70
  @auth_methods.each do |name|
72
71
  begin
73
72
  next unless @allowed_auth_methods.include?(name)
@@ -75,6 +74,7 @@ module Net
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 = 5
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.5.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