net-ssh 4.0.0.rc2 → 4.0.0.rc3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1956d73c8269053e9a74ba3a9f35fbf3b74b30b
4
- data.tar.gz: 787bec5bdcd306b76fb46df94f58117409302355
3
+ metadata.gz: 0070d7f98af428299d967d5cd906b45d026f1d02
4
+ data.tar.gz: 264a809d4f1f0c2ef7325ca490932976ce939e30
5
5
  SHA512:
6
- metadata.gz: a0061edadf67e981245ecc5ba288edc601b93a581429920532329a41e866df8ce5f497dee81bdc90581997f25ee2763e11547dab8ae11e437ef33badc913639d
7
- data.tar.gz: ac13a2b972abc5295374cde51df3413d38534b08cbd5acb636d7b16974c24db277c409ab5e8c38512b58fb630c92d0911f0f7d6fe9e82424113ac4c2cf624c1a
6
+ metadata.gz: bfd3b8af45d03f984512d544101a3c07193e45caf6d343f65795ad3b889641144a72c3ef25a2760ffb043d13bc5462943043bc0082657bac3a731e8c399aaab3
7
+ data.tar.gz: 68c6ad1b2aa8b0a483cd47c988d7add452cded1d2a901f8304d5b7fe39a7bb297be0d8d96ca7a066fc890123fc5f9442f8a8baf9725da1bdb2bdee4757830e64
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,7 @@
1
+ === 4.0.0.rc3
2
+
3
+ * parse `+` character in config files [Christoph Lupprich, #470, #314]
4
+
1
5
  === 4.0.0.rc2
2
6
 
3
7
  * Fixed OpenSSL 2.0/Ruby 2.4.0 warnings [Miklós Fazekas, #468]
@@ -211,24 +211,8 @@ module Net; module SSH; module Transport
211
211
  def prepare_preferred_algorithms!
212
212
  options[:compression] = %w(zlib@openssh.com zlib) if options[:compression] == true
213
213
 
214
- ALGORITHMS.each do |algorithm, list|
215
- algorithms[algorithm] = list.dup
216
-
217
- # apply the preferred algorithm order, if any
218
- if options[algorithm]
219
- algorithms[algorithm] = Array(options[algorithm]).compact.uniq
220
- unsupported = []
221
- algorithms[algorithm].select! do |name|
222
- supported = ALGORITHMS[algorithm].include?(name)
223
- unsupported << name unless supported
224
- supported
225
- end
226
- lwarn { "unsupported #{algorithm} algorithm: `#{unsupported}'" } unless unsupported.empty?
227
-
228
- if options[:append_all_supported_algorithms]
229
- list.each { |name| algorithms[algorithm] << name unless algorithms[algorithm].include?(name) }
230
- end
231
- end
214
+ ALGORITHMS.each do |algorithm, supported|
215
+ algorithms[algorithm] = compose_algorithm_list(supported, options[algorithm], options[:append_all_supported_algorithms])
232
216
  end
233
217
 
234
218
  # for convention, make sure our list has the same keys as the server
@@ -252,6 +236,38 @@ module Net; module SSH; module Transport
252
236
  end
253
237
  end
254
238
 
239
+ # Composes the list of algorithms by taking supported algorithms and matching with supplied options.
240
+ def compose_algorithm_list(supported, option, append_all_supported_algorithms = false)
241
+ return supported.dup unless option
242
+
243
+ list = []
244
+ option = Array(option).compact.uniq
245
+
246
+ if option.first && option.first.start_with?('+')
247
+ list = supported.dup
248
+ list << option.first[1..-1]
249
+ list.concat(option[1..-1])
250
+ list.uniq!
251
+ else
252
+ list = option
253
+
254
+ if append_all_supported_algorithms
255
+ supported.each { |name| list << name unless list.include?(name) }
256
+ end
257
+ end
258
+
259
+ unsupported = []
260
+ list.select! do |name|
261
+ is_supported = supported.include?(name)
262
+ unsupported << name unless is_supported
263
+ is_supported
264
+ end
265
+
266
+ lwarn { "unsupported #{algorithm} algorithm: `#{unsupported}'" } unless unsupported.empty?
267
+
268
+ list
269
+ end
270
+
255
271
  # Parses a KEXINIT packet from the server.
256
272
  def parse_server_algorithm_packet(packet)
257
273
  data = { raw: packet.content }
@@ -55,7 +55,7 @@ module Net; module SSH
55
55
 
56
56
  # The prerelease component of this version of the Net::SSH library
57
57
  # nil allowed
58
- PRE = "rc2"
58
+ PRE = "rc3"
59
59
 
60
60
  # The current version of the Net::SSH library as a Version instance
61
61
  CURRENT = new(*[MAJOR, MINOR, TINY, PRE].compact)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.rc2
4
+ version: 4.0.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
8
8
  - Delano Mandelbaum
9
9
  - Miklós Fazekas
10
- autorequire:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain:
13
13
  - |
@@ -32,115 +32,101 @@ cert_chain:
32
32
  L4d54WIy4HkZCqQXoTSiK5HZMIdXkPk3F1bZdJ8Dy1sMRru0rUkkM5mW7TQ75mfW
33
33
  Zp0QrZyNZhtitrXFbZneGRrIA/8G2Krft5Ly/A==
34
34
  -----END CERTIFICATE-----
35
- date: 2016-12-15 00:00:00.000000000 Z
35
+ date: 2016-12-22 00:00:00.000000000 Z
36
36
  dependencies:
37
37
  - !ruby/object:Gem::Dependency
38
- name: rbnacl-libsodium
39
38
  requirement: !ruby/object:Gem::Requirement
40
39
  requirements:
41
40
  - - "~>"
42
41
  - !ruby/object:Gem::Version
43
42
  version: 1.0.10
44
- type: :development
43
+ name: rbnacl-libsodium
45
44
  prerelease: false
45
+ type: :development
46
46
  version_requirements: !ruby/object:Gem::Requirement
47
47
  requirements:
48
48
  - - "~>"
49
49
  - !ruby/object:Gem::Version
50
50
  version: 1.0.10
51
51
  - !ruby/object:Gem::Dependency
52
- name: rbnacl
53
52
  requirement: !ruby/object:Gem::Requirement
54
53
  requirements:
55
54
  - - "~>"
56
55
  - !ruby/object:Gem::Version
57
56
  version: 3.4.0
58
- type: :development
57
+ name: rbnacl
59
58
  prerelease: false
60
- version_requirements: !ruby/object:Gem::Requirement
61
- requirements:
62
- - - "~>"
63
- - !ruby/object:Gem::Version
64
- version: 3.4.0
65
- - !ruby/object:Gem::Dependency
66
- name: bcrypt_pbkdf
67
- requirement: !ruby/object:Gem::Requirement
68
- requirements:
69
- - - "~>"
70
- - !ruby/object:Gem::Version
71
- version: 1.0.0
72
59
  type: :development
73
- prerelease: false
74
60
  version_requirements: !ruby/object:Gem::Requirement
75
61
  requirements:
76
62
  - - "~>"
77
63
  - !ruby/object:Gem::Version
78
- version: 1.0.0
64
+ version: 3.4.0
79
65
  - !ruby/object:Gem::Dependency
80
- name: bundler
81
66
  requirement: !ruby/object:Gem::Requirement
82
67
  requirements:
83
68
  - - "~>"
84
69
  - !ruby/object:Gem::Version
85
70
  version: '1.11'
86
- type: :development
71
+ name: bundler
87
72
  prerelease: false
73
+ type: :development
88
74
  version_requirements: !ruby/object:Gem::Requirement
89
75
  requirements:
90
76
  - - "~>"
91
77
  - !ruby/object:Gem::Version
92
78
  version: '1.11'
93
79
  - !ruby/object:Gem::Dependency
94
- name: rake
95
80
  requirement: !ruby/object:Gem::Requirement
96
81
  requirements:
97
82
  - - "~>"
98
83
  - !ruby/object:Gem::Version
99
84
  version: '12.0'
100
- type: :development
85
+ name: rake
101
86
  prerelease: false
87
+ type: :development
102
88
  version_requirements: !ruby/object:Gem::Requirement
103
89
  requirements:
104
90
  - - "~>"
105
91
  - !ruby/object:Gem::Version
106
92
  version: '12.0'
107
93
  - !ruby/object:Gem::Dependency
108
- name: minitest
109
94
  requirement: !ruby/object:Gem::Requirement
110
95
  requirements:
111
96
  - - "~>"
112
97
  - !ruby/object:Gem::Version
113
98
  version: '5.10'
114
- type: :development
99
+ name: minitest
115
100
  prerelease: false
101
+ type: :development
116
102
  version_requirements: !ruby/object:Gem::Requirement
117
103
  requirements:
118
104
  - - "~>"
119
105
  - !ruby/object:Gem::Version
120
106
  version: '5.10'
121
107
  - !ruby/object:Gem::Dependency
122
- name: rubocop
123
108
  requirement: !ruby/object:Gem::Requirement
124
109
  requirements:
125
110
  - - "~>"
126
111
  - !ruby/object:Gem::Version
127
112
  version: 0.46.0
128
- type: :development
113
+ name: rubocop
129
114
  prerelease: false
115
+ type: :development
130
116
  version_requirements: !ruby/object:Gem::Requirement
131
117
  requirements:
132
118
  - - "~>"
133
119
  - !ruby/object:Gem::Version
134
120
  version: 0.46.0
135
121
  - !ruby/object:Gem::Dependency
136
- name: mocha
137
122
  requirement: !ruby/object:Gem::Requirement
138
123
  requirements:
139
124
  - - ">="
140
125
  - !ruby/object:Gem::Version
141
126
  version: 1.2.1
142
- type: :development
127
+ name: mocha
143
128
  prerelease: false
129
+ type: :development
144
130
  version_requirements: !ruby/object:Gem::Requirement
145
131
  requirements:
146
132
  - - ">="
@@ -262,7 +248,7 @@ homepage: https://github.com/net-ssh/net-ssh
262
248
  licenses:
263
249
  - MIT
264
250
  metadata: {}
265
- post_install_message:
251
+ post_install_message:
266
252
  rdoc_options: []
267
253
  require_paths:
268
254
  - lib
@@ -277,9 +263,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
277
263
  - !ruby/object:Gem::Version
278
264
  version: 1.3.1
279
265
  requirements: []
280
- rubyforge_project:
281
- rubygems_version: 2.5.1
282
- signing_key:
266
+ rubyforge_project:
267
+ rubygems_version: 2.6.8
268
+ signing_key:
283
269
  specification_version: 4
284
270
  summary: 'Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.'
285
271
  test_files: []
metadata.gz.sig CHANGED
Binary file