net-ssh 6.1.0 → 6.2.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.github/workflows/ci.yml +76 -0
- data/.gitignore +2 -0
- data/.rubocop_todo.yml +39 -148
- data/CHANGES.txt +10 -3
- data/lib/net/ssh/authentication/agent.rb +14 -0
- data/lib/net/ssh/authentication/certificate.rb +5 -4
- data/lib/net/ssh/authentication/ed25519.rb +1 -1
- data/lib/net/ssh/connection/channel.rb +1 -0
- data/lib/net/ssh/test/channel.rb +1 -1
- data/lib/net/ssh/test/remote_packet.rb +1 -1
- data/lib/net/ssh/test/script.rb +1 -1
- data/lib/net/ssh/transport/algorithms.rb +3 -1
- data/lib/net/ssh/transport/cipher_factory.rb +3 -3
- data/lib/net/ssh/transport/kex/abstract.rb +9 -2
- data/lib/net/ssh/transport/openssl.rb +13 -4
- data/lib/net/ssh/version.rb +2 -2
- data.tar.gz.sig +0 -0
- metadata +5 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41c56dfbc79ea932b949dfc90f27bf3377cdbd3a48c32fd409db872562f38491
|
4
|
+
data.tar.gz: 648aeea80bec0e871f4c8e26ea7e24773fbd8de8a0e8ccb305b00a3f96c53172
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50ded00bb7ce3aa76167557dad7f2840d047c7861a5d3480fe3141bc67ccdcf502fd3a2dd4d1097d21467ec7cf83d1decd14809581e2203851eca52f083b1844
|
7
|
+
data.tar.gz: '056481ae85b0919dac4b75cd7434ea921c4fa248a050ef3d6b19d0c38ac49e6f0824731c192d6a242f2b6eba5c684e28244f9b8d15341a5ead44db3aac1d48ea'
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -0,0 +1,76 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [pull_request]
|
3
|
+
jobs:
|
4
|
+
test:
|
5
|
+
runs-on: ubuntu-latest
|
6
|
+
strategy:
|
7
|
+
matrix:
|
8
|
+
ruby-version: [2.7.2, 2.6.6, 2.5.8, 2.4.10, 3.0.0]
|
9
|
+
steps:
|
10
|
+
- uses: actions/checkout@v1
|
11
|
+
|
12
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
13
|
+
uses: ruby/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: ${{ matrix.ruby-version }}
|
16
|
+
- name: Set up Python ${{ matrix.python-version }}
|
17
|
+
uses: actions/setup-python@v2
|
18
|
+
with:
|
19
|
+
python-version: 2.7
|
20
|
+
|
21
|
+
- name: Cache bundler
|
22
|
+
uses: actions/cache@v1
|
23
|
+
id: bundler-cache
|
24
|
+
with:
|
25
|
+
path: vendor/bundle
|
26
|
+
key: ${{ runner.os }}-${{ matrix.ruby-version }}-gem-v3-${{ hashFiles('**/Gemfile') }}-${{ hashFiles('**/net-ssh.gemspec') }}
|
27
|
+
restore-keys: |
|
28
|
+
${{ runner.os }}-${{ matrix.ruby-version }}-gem-v3-
|
29
|
+
|
30
|
+
- name: Cache pip
|
31
|
+
uses: actions/cache@v1
|
32
|
+
id: pip-cache
|
33
|
+
with:
|
34
|
+
path: ~/.cache/pip
|
35
|
+
key: ${{ runner.os }}-pip-v1
|
36
|
+
restore-keys: |
|
37
|
+
${{ runner.os }}-pip-v1
|
38
|
+
- name: Bundle install
|
39
|
+
run: |
|
40
|
+
gem install bundler
|
41
|
+
bundle config set path 'vendor/bundle'
|
42
|
+
bundle config set --local path 'vendor/bundle'
|
43
|
+
bundle install --jobs 4 --retry 3 --path vendor/bundle
|
44
|
+
BUNDLE_GEMFILE=./Gemfile.noed25519 bundle install --jobs 4 --retry 3 --path vendor/bundle
|
45
|
+
env:
|
46
|
+
BUNDLE_PATH: vendor/bundle
|
47
|
+
|
48
|
+
- name: Add to etc/hosts
|
49
|
+
run: |
|
50
|
+
sudo echo "127.0.0.1 gateway.netssh" | sudo tee -a /etc/hosts
|
51
|
+
- name: Ansible install
|
52
|
+
run: |
|
53
|
+
python -m pip install --upgrade pip
|
54
|
+
pip install ansible urllib3 pyOpenSSL ndg-httpsclient pyasn1
|
55
|
+
ansible-galaxy install rvm.ruby
|
56
|
+
pwd
|
57
|
+
uname -a
|
58
|
+
export
|
59
|
+
who am i
|
60
|
+
ansible-playbook ./test/integration/playbook.yml -i "localhost," --become -c local -e 'no_rvm=true' -e 'myuser=runner' -e 'mygroup=runner' -e 'homedir=/home/runner'
|
61
|
+
- name: Run Tests
|
62
|
+
run: bundle exec rake test
|
63
|
+
env:
|
64
|
+
NET_SSH_RUN_INTEGRATION_TESTS_DISABLED: 1
|
65
|
+
- name: Run Tests (without ed25519)
|
66
|
+
run: bundle exec rake test
|
67
|
+
env:
|
68
|
+
BUNDLE_GEMFILE: ./Gemfile.noed25519
|
69
|
+
NET_SSH_RUN_INTEGRATION_TESTS_DISABLED: 1
|
70
|
+
- name: Run test helper test
|
71
|
+
run: bundle exec rake test_test
|
72
|
+
- name: Rubocop
|
73
|
+
if: matrix.ruby-version != '3.0.0'
|
74
|
+
run: bundle exec rubocop
|
75
|
+
|
76
|
+
|
data/.gitignore
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2020-05-29 10:37:36 +0200 using RuboCop version 0.74.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 75
|
10
10
|
# Cop supports --auto-correct.
|
11
11
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
12
12
|
# SupportedStyles: with_first_argument, with_fixed_indentation
|
13
13
|
Layout/AlignArguments:
|
14
14
|
Enabled: false
|
15
15
|
|
16
|
-
# Offense count:
|
16
|
+
# Offense count: 63
|
17
17
|
# Cop supports --auto-correct.
|
18
18
|
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
19
19
|
# SupportedHashRocketStyles: key, separator, table
|
@@ -32,39 +32,13 @@ Layout/AlignHash:
|
|
32
32
|
Layout/EmptyLineAfterGuardClause:
|
33
33
|
Enabled: false
|
34
34
|
|
35
|
-
# Offense count:
|
35
|
+
# Offense count: 172
|
36
36
|
# Cop supports --auto-correct.
|
37
37
|
# Configuration parameters: EnforcedStyle.
|
38
38
|
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
39
39
|
Layout/EmptyLinesAroundModuleBody:
|
40
40
|
Enabled: false
|
41
41
|
|
42
|
-
# Offense count: 2
|
43
|
-
# Cop supports --auto-correct.
|
44
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
45
|
-
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
|
46
|
-
Layout/IndentFirstArrayElement:
|
47
|
-
Exclude:
|
48
|
-
- 'lib/net/ssh/transport/openssl.rb'
|
49
|
-
|
50
|
-
# Offense count: 3
|
51
|
-
# Cop supports --auto-correct.
|
52
|
-
Layout/LeadingBlankLines:
|
53
|
-
Exclude:
|
54
|
-
- 'Rakefile'
|
55
|
-
- 'lib/net/ssh/authentication/pub_key_fingerprint.rb'
|
56
|
-
- 'support/arcfour_check.rb'
|
57
|
-
|
58
|
-
# Offense count: 14
|
59
|
-
# Cop supports --auto-correct.
|
60
|
-
# Configuration parameters: AllowDoxygenCommentStyle.
|
61
|
-
Layout/LeadingCommentSpace:
|
62
|
-
Exclude:
|
63
|
-
- 'test/integration/test_ed25519_pkeys.rb'
|
64
|
-
- 'test/integration/test_forward.rb'
|
65
|
-
- 'test/integration/test_id_rsa_keys.rb'
|
66
|
-
- 'test/integration/test_proxy.rb'
|
67
|
-
|
68
42
|
# Offense count: 23
|
69
43
|
# Cop supports --auto-correct.
|
70
44
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
@@ -87,7 +61,7 @@ Layout/SpaceAfterColon:
|
|
87
61
|
- 'test/integration/test_ed25519_pkeys.rb'
|
88
62
|
- 'test/verifiers/test_always.rb'
|
89
63
|
|
90
|
-
# Offense count:
|
64
|
+
# Offense count: 291
|
91
65
|
# Cop supports --auto-correct.
|
92
66
|
Layout/SpaceAfterComma:
|
93
67
|
Enabled: false
|
@@ -99,7 +73,7 @@ Layout/SpaceAfterComma:
|
|
99
73
|
Layout/SpaceAroundEqualsInParameterDefault:
|
100
74
|
Enabled: false
|
101
75
|
|
102
|
-
# Offense count:
|
76
|
+
# Offense count: 12
|
103
77
|
# Cop supports --auto-correct.
|
104
78
|
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
105
79
|
# SupportedStyles: space, no_space
|
@@ -122,14 +96,7 @@ Layout/SpaceInsideReferenceBrackets:
|
|
122
96
|
Exclude:
|
123
97
|
- 'lib/net/ssh/transport/algorithms.rb'
|
124
98
|
|
125
|
-
# Offense count:
|
126
|
-
# Cop supports --auto-correct.
|
127
|
-
# Configuration parameters: EnforcedStyle.
|
128
|
-
# SupportedStyles: final_newline, final_blank_line
|
129
|
-
Layout/TrailingBlankLines:
|
130
|
-
Enabled: false
|
131
|
-
|
132
|
-
# Offense count: 739
|
99
|
+
# Offense count: 730
|
133
100
|
# Cop supports --auto-correct.
|
134
101
|
# Configuration parameters: AllowInHeredoc.
|
135
102
|
Layout/TrailingWhitespace:
|
@@ -177,14 +144,6 @@ Lint/Loop:
|
|
177
144
|
- 'lib/net/ssh/authentication/methods/password.rb'
|
178
145
|
- 'lib/net/ssh/key_factory.rb'
|
179
146
|
|
180
|
-
# Offense count: 3
|
181
|
-
# Configuration parameters: MaximumRangeSize.
|
182
|
-
Lint/MissingCopEnableDirective:
|
183
|
-
Exclude:
|
184
|
-
- 'test/authentication/test_agent.rb'
|
185
|
-
- 'test/authentication/test_certificate.rb'
|
186
|
-
- 'test/integration/test_agent.rb'
|
187
|
-
|
188
147
|
# Offense count: 1
|
189
148
|
Lint/NonLocalExitFromIterator:
|
190
149
|
Exclude:
|
@@ -207,12 +166,6 @@ Lint/UnderscorePrefixedVariableName:
|
|
207
166
|
Exclude:
|
208
167
|
- 'lib/net/ssh/test/local_packet.rb'
|
209
168
|
|
210
|
-
# Offense count: 1
|
211
|
-
# Cop supports --auto-correct.
|
212
|
-
Lint/UnneededRequireStatement:
|
213
|
-
Exclude:
|
214
|
-
- 'lib/net/ssh/ruby_compat.rb'
|
215
|
-
|
216
169
|
# Offense count: 60
|
217
170
|
# Cop supports --auto-correct.
|
218
171
|
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
@@ -229,7 +182,7 @@ Lint/UnusedBlockArgument:
|
|
229
182
|
- 'test/transport/test_algorithms.rb'
|
230
183
|
- 'test/transport/test_hmac.rb'
|
231
184
|
|
232
|
-
# Offense count:
|
185
|
+
# Offense count: 65
|
233
186
|
# Cop supports --auto-correct.
|
234
187
|
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
|
235
188
|
Lint/UnusedMethodArgument:
|
@@ -251,11 +204,11 @@ Lint/UselessAssignment:
|
|
251
204
|
- 'test/integration/common.rb'
|
252
205
|
- 'test/integration/test_forward.rb'
|
253
206
|
|
254
|
-
# Offense count:
|
207
|
+
# Offense count: 239
|
255
208
|
Metrics/AbcSize:
|
256
|
-
Max:
|
209
|
+
Max: 71
|
257
210
|
|
258
|
-
# Offense count:
|
211
|
+
# Offense count: 17
|
259
212
|
# Configuration parameters: CountComments, ExcludedMethods.
|
260
213
|
# ExcludedMethods: refine
|
261
214
|
Metrics/BlockLength:
|
@@ -266,23 +219,21 @@ Metrics/BlockLength:
|
|
266
219
|
Metrics/BlockNesting:
|
267
220
|
Max: 4
|
268
221
|
|
269
|
-
# Offense count:
|
222
|
+
# Offense count: 33
|
270
223
|
# Configuration parameters: CountComments.
|
271
224
|
Metrics/ClassLength:
|
272
225
|
Max: 488
|
273
226
|
|
274
|
-
# Offense count:
|
227
|
+
# Offense count: 40
|
275
228
|
Metrics/CyclomaticComplexity:
|
276
|
-
Max:
|
277
|
-
Exclude:
|
278
|
-
- 'lib/net/ssh/config.rb'
|
229
|
+
Max: 28
|
279
230
|
|
280
|
-
# Offense count:
|
231
|
+
# Offense count: 224
|
281
232
|
# Configuration parameters: CountComments, ExcludedMethods.
|
282
233
|
Metrics/MethodLength:
|
283
|
-
Max:
|
234
|
+
Max: 72
|
284
235
|
|
285
|
-
# Offense count:
|
236
|
+
# Offense count: 3
|
286
237
|
# Configuration parameters: CountComments.
|
287
238
|
Metrics/ModuleLength:
|
288
239
|
Max: 160
|
@@ -292,11 +243,11 @@ Metrics/ModuleLength:
|
|
292
243
|
Metrics/ParameterLists:
|
293
244
|
Max: 6
|
294
245
|
|
295
|
-
# Offense count:
|
246
|
+
# Offense count: 32
|
296
247
|
Metrics/PerceivedComplexity:
|
297
248
|
Max: 20
|
298
249
|
|
299
|
-
# Offense count:
|
250
|
+
# Offense count: 10
|
300
251
|
Naming/AccessorMethodName:
|
301
252
|
Exclude:
|
302
253
|
- 'lib/net/ssh/authentication/methods/password.rb'
|
@@ -313,25 +264,9 @@ Naming/BinaryOperatorParameterName:
|
|
313
264
|
- 'lib/net/ssh/buffer.rb'
|
314
265
|
- 'lib/net/ssh/version.rb'
|
315
266
|
|
316
|
-
# Offense count:
|
267
|
+
# Offense count: 16
|
317
268
|
Naming/ClassAndModuleCamelCase:
|
318
|
-
|
319
|
-
- 'lib/net/ssh/transport/hmac/md5_96.rb'
|
320
|
-
- 'lib/net/ssh/transport/hmac/sha1_96.rb'
|
321
|
-
- 'lib/net/ssh/transport/hmac/sha2_256.rb'
|
322
|
-
- 'lib/net/ssh/transport/hmac/sha2_256_96.rb'
|
323
|
-
- 'lib/net/ssh/transport/hmac/sha2_256_etm.rb'
|
324
|
-
- 'lib/net/ssh/transport/hmac/sha2_512.rb'
|
325
|
-
- 'lib/net/ssh/transport/hmac/sha2_512_96.rb'
|
326
|
-
- 'lib/net/ssh/transport/hmac/sha2_512_etm.rb'
|
327
|
-
- 'test/transport/hmac/test_md5_96.rb'
|
328
|
-
- 'test/transport/hmac/test_sha1_96.rb'
|
329
|
-
- 'test/transport/hmac/test_sha2_256.rb'
|
330
|
-
- 'test/transport/hmac/test_sha2_256_96.rb'
|
331
|
-
- 'test/transport/hmac/test_sha2_256_etm.rb'
|
332
|
-
- 'test/transport/hmac/test_sha2_512.rb'
|
333
|
-
- 'test/transport/hmac/test_sha2_512_96.rb'
|
334
|
-
- 'test/transport/hmac/test_sha2_512_etm.rb'
|
269
|
+
Enabled: false
|
335
270
|
|
336
271
|
# Offense count: 4
|
337
272
|
Naming/ConstantName:
|
@@ -340,7 +275,7 @@ Naming/ConstantName:
|
|
340
275
|
- 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb'
|
341
276
|
- 'lib/net/ssh/transport/openssl.rb'
|
342
277
|
|
343
|
-
# Offense count:
|
278
|
+
# Offense count: 12
|
344
279
|
# Configuration parameters: Blacklist.
|
345
280
|
# Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
|
346
281
|
Naming/HeredocDelimiterNaming:
|
@@ -352,7 +287,7 @@ Naming/HeredocDelimiterNaming:
|
|
352
287
|
- 'test/integration/test_agent.rb'
|
353
288
|
- 'test/test_key_factory.rb'
|
354
289
|
|
355
|
-
# Offense count:
|
290
|
+
# Offense count: 5
|
356
291
|
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
357
292
|
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
358
293
|
Naming/MemoizedInstanceVariableName:
|
@@ -394,7 +329,6 @@ Naming/UncommunicativeMethodParamName:
|
|
394
329
|
- 'lib/net/ssh/authentication/pageant.rb'
|
395
330
|
- 'lib/net/ssh/buffer.rb'
|
396
331
|
- 'lib/net/ssh/buffered_io.rb'
|
397
|
-
- 'lib/net/ssh/ruby_compat.rb'
|
398
332
|
- 'lib/net/ssh/test/socket.rb'
|
399
333
|
- 'lib/net/ssh/transport/ctr.rb'
|
400
334
|
- 'lib/net/ssh/transport/hmac/abstract.rb'
|
@@ -446,7 +380,7 @@ Style/AsciiComments:
|
|
446
380
|
- 'lib/net/ssh/authentication/pageant.rb'
|
447
381
|
- 'lib/net/ssh/buffered_io.rb'
|
448
382
|
|
449
|
-
# Offense count:
|
383
|
+
# Offense count: 9
|
450
384
|
# Cop supports --auto-correct.
|
451
385
|
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
|
452
386
|
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
@@ -487,29 +421,12 @@ Style/CharacterLiteral:
|
|
487
421
|
Exclude:
|
488
422
|
- 'test/test_buffer.rb'
|
489
423
|
|
490
|
-
# Offense count:
|
424
|
+
# Offense count: 17
|
491
425
|
# Cop supports --auto-correct.
|
492
426
|
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
493
427
|
# SupportedStyles: nested, compact
|
494
428
|
Style/ClassAndModuleChildren:
|
495
|
-
|
496
|
-
- 'lib/net/ssh/transport/ctr.rb'
|
497
|
-
- 'lib/net/ssh/transport/hmac.rb'
|
498
|
-
- 'lib/net/ssh/transport/hmac/md5.rb'
|
499
|
-
- 'lib/net/ssh/transport/hmac/md5_96.rb'
|
500
|
-
- 'lib/net/ssh/transport/hmac/none.rb'
|
501
|
-
- 'lib/net/ssh/transport/hmac/ripemd160.rb'
|
502
|
-
- 'lib/net/ssh/transport/hmac/sha1.rb'
|
503
|
-
- 'lib/net/ssh/transport/hmac/sha1_96.rb'
|
504
|
-
- 'lib/net/ssh/transport/hmac/sha2_256.rb'
|
505
|
-
- 'lib/net/ssh/transport/hmac/sha2_256_96.rb'
|
506
|
-
- 'lib/net/ssh/transport/hmac/sha2_256_etm.rb'
|
507
|
-
- 'lib/net/ssh/transport/hmac/sha2_512.rb'
|
508
|
-
- 'lib/net/ssh/transport/hmac/sha2_512_96.rb'
|
509
|
-
- 'lib/net/ssh/transport/hmac/sha2_512_etm.rb'
|
510
|
-
- 'lib/net/ssh/transport/kex.rb'
|
511
|
-
- 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb'
|
512
|
-
- 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha256.rb'
|
429
|
+
Enabled: false
|
513
430
|
|
514
431
|
# Offense count: 7
|
515
432
|
Style/ClassVars:
|
@@ -554,13 +471,7 @@ Style/ConditionalAssignment:
|
|
554
471
|
- 'lib/net/ssh/transport/state.rb'
|
555
472
|
- 'test/test_key_factory.rb'
|
556
473
|
|
557
|
-
# Offense count:
|
558
|
-
# Cop supports --auto-correct.
|
559
|
-
Style/DefWithParentheses:
|
560
|
-
Exclude:
|
561
|
-
- 'test/integration/test_forward.rb'
|
562
|
-
|
563
|
-
# Offense count: 14
|
474
|
+
# Offense count: 13
|
564
475
|
Style/Documentation:
|
565
476
|
Exclude:
|
566
477
|
- 'spec/**/*'
|
@@ -568,7 +479,6 @@ Style/Documentation:
|
|
568
479
|
- 'lib/net/ssh/authentication/ed25519.rb'
|
569
480
|
- 'lib/net/ssh/connection/keepalive.rb'
|
570
481
|
- 'lib/net/ssh/connection/session.rb'
|
571
|
-
- 'lib/net/ssh/ruby_compat.rb'
|
572
482
|
- 'lib/net/ssh/test/extensions.rb'
|
573
483
|
- 'lib/net/ssh/transport/kex.rb'
|
574
484
|
- 'lib/net/ssh/transport/key_expander.rb'
|
@@ -602,14 +512,14 @@ Style/FormatStringToken:
|
|
602
512
|
Exclude:
|
603
513
|
- 'lib/net/ssh/loggable.rb'
|
604
514
|
|
605
|
-
# Offense count:
|
515
|
+
# Offense count: 171
|
606
516
|
# Cop supports --auto-correct.
|
607
517
|
# Configuration parameters: EnforcedStyle.
|
608
518
|
# SupportedStyles: always, never
|
609
519
|
Style/FrozenStringLiteralComment:
|
610
520
|
Enabled: false
|
611
521
|
|
612
|
-
# Offense count:
|
522
|
+
# Offense count: 35
|
613
523
|
# Configuration parameters: MinBodyLength.
|
614
524
|
Style/GuardClause:
|
615
525
|
Enabled: false
|
@@ -620,7 +530,7 @@ Style/IfInsideElse:
|
|
620
530
|
Exclude:
|
621
531
|
- 'lib/net/ssh/connection/session.rb'
|
622
532
|
|
623
|
-
# Offense count:
|
533
|
+
# Offense count: 13
|
624
534
|
# Cop supports --auto-correct.
|
625
535
|
Style/IfUnlessModifier:
|
626
536
|
Exclude:
|
@@ -629,8 +539,6 @@ Style/IfUnlessModifier:
|
|
629
539
|
- 'lib/net/ssh/proxy/command.rb'
|
630
540
|
- 'lib/net/ssh/service/forward.rb'
|
631
541
|
- 'lib/net/ssh/transport/ctr.rb'
|
632
|
-
- 'lib/net/ssh/transport/kex.rb'
|
633
|
-
- 'lib/net/ssh/transport/kex/abstract5656.rb'
|
634
542
|
- 'lib/net/ssh/transport/key_expander.rb'
|
635
543
|
- 'test/integration/test_proxy.rb'
|
636
544
|
- 'test/test_key_factory.rb'
|
@@ -690,7 +598,7 @@ Style/MultipleComparison:
|
|
690
598
|
Style/MutableConstant:
|
691
599
|
Enabled: false
|
692
600
|
|
693
|
-
# Offense count:
|
601
|
+
# Offense count: 14
|
694
602
|
# Cop supports --auto-correct.
|
695
603
|
# Configuration parameters: EnforcedStyle.
|
696
604
|
# SupportedStyles: both, prefix, postfix
|
@@ -734,7 +642,7 @@ Style/Not:
|
|
734
642
|
Exclude:
|
735
643
|
- 'lib/net/ssh/connection/channel.rb'
|
736
644
|
|
737
|
-
# Offense count:
|
645
|
+
# Offense count: 10
|
738
646
|
# Cop supports --auto-correct.
|
739
647
|
# Configuration parameters: Strict.
|
740
648
|
Style/NumericLiterals:
|
@@ -771,7 +679,7 @@ Style/ParenthesesAroundCondition:
|
|
771
679
|
- 'lib/net/ssh/transport/ctr.rb'
|
772
680
|
- 'test/integration/test_proxy.rb'
|
773
681
|
|
774
|
-
# Offense count:
|
682
|
+
# Offense count: 23
|
775
683
|
# Cop supports --auto-correct.
|
776
684
|
# Configuration parameters: PreferredDelimiters.
|
777
685
|
Style/PercentLiteralDelimiters:
|
@@ -819,19 +727,13 @@ Style/RedundantBegin:
|
|
819
727
|
- 'lib/net/ssh/verifiers/accept_new.rb'
|
820
728
|
- 'test/manual/test_pageant.rb'
|
821
729
|
|
822
|
-
# Offense count:
|
823
|
-
# Cop supports --auto-correct.
|
824
|
-
Style/RedundantParentheses:
|
825
|
-
Exclude:
|
826
|
-
- 'support/arcfour_check.rb'
|
827
|
-
|
828
|
-
# Offense count: 59
|
730
|
+
# Offense count: 61
|
829
731
|
# Cop supports --auto-correct.
|
830
732
|
# Configuration parameters: AllowMultipleReturnValues.
|
831
733
|
Style/RedundantReturn:
|
832
734
|
Enabled: false
|
833
735
|
|
834
|
-
# Offense count:
|
736
|
+
# Offense count: 18
|
835
737
|
# Cop supports --auto-correct.
|
836
738
|
Style/RedundantSelf:
|
837
739
|
Exclude:
|
@@ -910,14 +812,14 @@ Style/SpecialGlobalVars:
|
|
910
812
|
- 'test/manual/test_pageant.rb'
|
911
813
|
- 'test/test_all.rb'
|
912
814
|
|
913
|
-
# Offense count:
|
815
|
+
# Offense count: 1801
|
914
816
|
# Cop supports --auto-correct.
|
915
817
|
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
916
818
|
# SupportedStyles: single_quotes, double_quotes
|
917
819
|
Style/StringLiterals:
|
918
820
|
Enabled: false
|
919
821
|
|
920
|
-
# Offense count:
|
822
|
+
# Offense count: 7
|
921
823
|
# Cop supports --auto-correct.
|
922
824
|
# Configuration parameters: IgnoredMethods.
|
923
825
|
# IgnoredMethods: respond_to, define_method
|
@@ -928,8 +830,6 @@ Style/SymbolProc:
|
|
928
830
|
- 'lib/net/ssh/connection/session.rb'
|
929
831
|
- 'lib/net/ssh/test/extensions.rb'
|
930
832
|
- 'lib/net/ssh/transport/algorithms.rb'
|
931
|
-
- 'test/integration/test_forward.rb'
|
932
|
-
- 'test/test/test_test.rb'
|
933
833
|
|
934
834
|
# Offense count: 1
|
935
835
|
# Cop supports --auto-correct.
|
@@ -937,20 +837,18 @@ Style/UnneededCondition:
|
|
937
837
|
Exclude:
|
938
838
|
- 'lib/net/ssh/proxy/command.rb'
|
939
839
|
|
940
|
-
# Offense count:
|
840
|
+
# Offense count: 2
|
941
841
|
# Cop supports --auto-correct.
|
942
842
|
Style/UnneededInterpolation:
|
943
843
|
Exclude:
|
944
844
|
- 'lib/net/ssh/proxy/socks5.rb'
|
945
845
|
- 'lib/net/ssh/transport/session.rb'
|
946
|
-
- 'test/integration/test_forward.rb'
|
947
846
|
|
948
|
-
# Offense count:
|
847
|
+
# Offense count: 2
|
949
848
|
# Cop supports --auto-correct.
|
950
849
|
Style/UnneededPercentQ:
|
951
850
|
Exclude:
|
952
851
|
- 'net-ssh.gemspec'
|
953
|
-
- 'test/test_config.rb'
|
954
852
|
|
955
853
|
# Offense count: 2
|
956
854
|
# Cop supports --auto-correct.
|
@@ -973,10 +871,3 @@ Style/ZeroLengthPredicate:
|
|
973
871
|
Exclude:
|
974
872
|
- 'lib/net/ssh/buffered_io.rb'
|
975
873
|
- 'lib/net/ssh/connection/channel.rb'
|
976
|
-
|
977
|
-
# Offense count: 1636
|
978
|
-
# Cop supports --auto-correct.
|
979
|
-
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
980
|
-
# URISchemes: http, https
|
981
|
-
Metrics/LineLength:
|
982
|
-
Max: 932
|
data/CHANGES.txt
CHANGED
@@ -1,6 +1,13 @@
|
|
1
|
+
=== 6.2.0 rc1
|
2
|
+
|
3
|
+
=== 6.2.0 beta1
|
4
|
+
|
5
|
+
* rsa-sha2-512, rsa-sha2-256 host_key algs [#771]
|
6
|
+
* JRuby aes*-ctr suppport [#767]
|
7
|
+
|
1
8
|
=== 6.1.0
|
2
9
|
|
3
|
-
*
|
10
|
+
* Adapt to ssh's default behaviors when no username is provided.
|
4
11
|
When Net::SSH.start user is nil and config has no entry
|
5
12
|
we default to Etc.getpwuid.name() instead of Etc.getlogin(). [#749]
|
6
13
|
|
@@ -36,7 +43,7 @@
|
|
36
43
|
=== 5.2.0.rc3
|
37
44
|
|
38
45
|
* Fix check_host_ip read from config
|
39
|
-
* Support ssh-ed25519 in
|
46
|
+
* Support ssh-ed25519 in known hosts
|
40
47
|
|
41
48
|
=== 5.2.0.rc2
|
42
49
|
|
@@ -59,7 +66,7 @@
|
|
59
66
|
|
60
67
|
=== 5.0.2
|
61
68
|
|
62
|
-
*
|
69
|
+
* Fix ctr for jruby [#612]
|
63
70
|
|
64
71
|
=== 5.0.1
|
65
72
|
|
@@ -39,6 +39,8 @@ module Net
|
|
39
39
|
SSH2_AGENT_ADD_IDENTITY = 17
|
40
40
|
SSH2_AGENT_REMOVE_IDENTITY = 18
|
41
41
|
SSH2_AGENT_REMOVE_ALL_IDENTITIES = 19
|
42
|
+
SSH2_AGENT_LOCK = 22
|
43
|
+
SSH2_AGENT_UNLOCK = 23
|
42
44
|
SSH2_AGENT_ADD_ID_CONSTRAINED = 25
|
43
45
|
SSH2_AGENT_FAILURE = 30
|
44
46
|
SSH2_AGENT_VERSION_RESPONSE = 103
|
@@ -189,6 +191,18 @@ module Net
|
|
189
191
|
raise AgentError, "could not remove all identity from agent" if type != SSH_AGENT_SUCCESS
|
190
192
|
end
|
191
193
|
|
194
|
+
# lock the ssh agent with password
|
195
|
+
def lock(password)
|
196
|
+
type, = send_and_wait(SSH2_AGENT_LOCK, :string, password)
|
197
|
+
raise AgentError, "could not lock agent" if type != SSH_AGENT_SUCCESS
|
198
|
+
end
|
199
|
+
|
200
|
+
# unlock the ssh agent with password
|
201
|
+
def unlock(password)
|
202
|
+
type, = send_and_wait(SSH2_AGENT_UNLOCK, :string, password)
|
203
|
+
raise AgentError, "could not unlock agent" if type != SSH_AGENT_SUCCESS
|
204
|
+
end
|
205
|
+
|
192
206
|
private
|
193
207
|
|
194
208
|
def unix_socket_class
|
@@ -35,8 +35,9 @@ module Net
|
|
35
35
|
cert.valid_before = if RUBY_PLATFORM == "java"
|
36
36
|
# 0x20c49ba5e353f7 = 0x7fffffffffffffff/1000, the largest value possible for JRuby
|
37
37
|
# JRuby Time.at multiplies the arg by 1000, and then stores it in a signed long.
|
38
|
-
#
|
39
|
-
|
38
|
+
# 0x20c49ba2d52500 = 292278993-01-01 00:00:00 +0000
|
39
|
+
# JRuby 9.1 does not accept the year 292278994 because of edge cases (https://github.com/JodaOrg/joda-time/issues/190)
|
40
|
+
Time.at([0x20c49ba2d52500, buffer.read_int64].min)
|
40
41
|
else
|
41
42
|
Time.at(buffer.read_int64)
|
42
43
|
end
|
@@ -69,8 +70,8 @@ module Net
|
|
69
70
|
key.ssh_do_sign(data)
|
70
71
|
end
|
71
72
|
|
72
|
-
def ssh_do_verify(sig, data)
|
73
|
-
key.ssh_do_verify(sig, data)
|
73
|
+
def ssh_do_verify(sig, data, options = {})
|
74
|
+
key.ssh_do_verify(sig, data, options)
|
74
75
|
end
|
75
76
|
|
76
77
|
def to_pem
|
data/lib/net/ssh/test/channel.rb
CHANGED
data/lib/net/ssh/test/script.rb
CHANGED
@@ -22,9 +22,9 @@ module Net
|
|
22
22
|
"3des-ctr" => "des-ede3",
|
23
23
|
"blowfish-ctr" => "bf-ecb",
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
"aes256-ctr" => ::OpenSSL::Cipher.ciphers.include?("aes-256-ctr") ? "aes-256-ctr" : "aes-256-ecb",
|
26
|
+
"aes192-ctr" => ::OpenSSL::Cipher.ciphers.include?("aes-192-ctr") ? "aes-192-ctr" : "aes-192-ecb",
|
27
|
+
"aes128-ctr" => ::OpenSSL::Cipher.ciphers.include?("aes-128-ctr") ? "aes-128-ctr" : "aes-128-ecb",
|
28
28
|
'cast128-ctr' => 'cast5-ecb',
|
29
29
|
|
30
30
|
'none' => 'none'
|
@@ -64,11 +64,16 @@ module Net
|
|
64
64
|
|
65
65
|
private
|
66
66
|
|
67
|
+
def matching?(key_ssh_type, host_key_alg)
|
68
|
+
return true if key_ssh_type == host_key_alg
|
69
|
+
return true if key_ssh_type == 'ssh-rsa' && ['rsa-sha2-512', 'rsa-sha2-256'].include?(host_key_alg)
|
70
|
+
end
|
71
|
+
|
67
72
|
# Verify that the given key is of the expected type, and that it
|
68
73
|
# really is the key for the session's host. Raise Net::SSH::Exception
|
69
74
|
# if it is not.
|
70
75
|
def verify_server_key(key) #:nodoc:
|
71
|
-
|
76
|
+
unless matching?(key.ssh_type, algorithms.host_key)
|
72
77
|
raise Net::SSH::Exception, "host key algorithm mismatch '#{key.ssh_type}' != '#{algorithms.host_key}'"
|
73
78
|
end
|
74
79
|
|
@@ -97,7 +102,9 @@ module Net
|
|
97
102
|
|
98
103
|
hash = digester.digest(response.to_s)
|
99
104
|
|
100
|
-
|
105
|
+
server_key = result[:server_key]
|
106
|
+
server_sig = result[:server_sig]
|
107
|
+
unless connection.host_key_verifier.verify_signature { server_key.ssh_do_verify(server_sig, hash, host_key: algorithms.host_key) }
|
101
108
|
raise Net::SSH::Exception, 'could not verify server signature'
|
102
109
|
end
|
103
110
|
|
@@ -63,8 +63,17 @@ module OpenSSL
|
|
63
63
|
end
|
64
64
|
|
65
65
|
# Verifies the given signature matches the given data.
|
66
|
-
def ssh_do_verify(sig, data)
|
67
|
-
|
66
|
+
def ssh_do_verify(sig, data, options = {})
|
67
|
+
digester =
|
68
|
+
if options[:host_key] == "rsa-sha2-512"
|
69
|
+
OpenSSL::Digest::SHA512.new
|
70
|
+
elsif options[:host_key] == "rsa-sha2-256"
|
71
|
+
OpenSSL::Digest::SHA256.new
|
72
|
+
else
|
73
|
+
OpenSSL::Digest::SHA1.new
|
74
|
+
end
|
75
|
+
|
76
|
+
verify(digester, sig, data)
|
68
77
|
end
|
69
78
|
|
70
79
|
# Returns the signature for the given data.
|
@@ -94,7 +103,7 @@ module OpenSSL
|
|
94
103
|
end
|
95
104
|
|
96
105
|
# Verifies the given signature matches the given data.
|
97
|
-
def ssh_do_verify(sig, data)
|
106
|
+
def ssh_do_verify(sig, data, options = {})
|
98
107
|
sig_r = sig[0,20].unpack("H*")[0].to_i(16)
|
99
108
|
sig_s = sig[20,20].unpack("H*")[0].to_i(16)
|
100
109
|
a1sig = OpenSSL::ASN1::Sequence([
|
@@ -192,7 +201,7 @@ module OpenSSL
|
|
192
201
|
end
|
193
202
|
|
194
203
|
# Verifies the given signature matches the given data.
|
195
|
-
def ssh_do_verify(sig, data)
|
204
|
+
def ssh_do_verify(sig, data, options = {})
|
196
205
|
digest = digester.digest(data)
|
197
206
|
a1sig = nil
|
198
207
|
|
data/lib/net/ssh/version.rb
CHANGED
@@ -49,14 +49,14 @@ module Net
|
|
49
49
|
MAJOR = 6
|
50
50
|
|
51
51
|
# The minor component of this version of the Net::SSH library
|
52
|
-
MINOR =
|
52
|
+
MINOR = 2
|
53
53
|
|
54
54
|
# The tiny component of this version of the Net::SSH library
|
55
55
|
TINY = 0
|
56
56
|
|
57
57
|
# The prerelease component of this version of the Net::SSH library
|
58
58
|
# nil allowed
|
59
|
-
PRE =
|
59
|
+
PRE = "rc2"
|
60
60
|
|
61
61
|
# The current version of the Net::SSH library as a Version instance
|
62
62
|
CURRENT = new(*[MAJOR, MINOR, TINY, PRE].compact)
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-ssh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.2.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamis Buck
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
voajiJNS75Pw/2j13WnPB4Q6w7dHSb57E/VluBpVKmcQZN0dGdAkEIVty3v7kw9g
|
32
32
|
y++VpCpWM/PstIFv4ApZMf501UY=
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2021-03-12 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bcrypt_pbkdf
|
@@ -156,6 +156,7 @@ extra_rdoc_files:
|
|
156
156
|
- LICENSE.txt
|
157
157
|
- README.md
|
158
158
|
files:
|
159
|
+
- ".github/workflows/ci.yml"
|
159
160
|
- ".gitignore"
|
160
161
|
- ".rubocop.yml"
|
161
162
|
- ".rubocop_todo.yml"
|
@@ -279,9 +280,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
279
280
|
version: '2.3'
|
280
281
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
281
282
|
requirements:
|
282
|
-
- - "
|
283
|
+
- - ">"
|
283
284
|
- !ruby/object:Gem::Version
|
284
|
-
version:
|
285
|
+
version: 1.3.1
|
285
286
|
requirements: []
|
286
287
|
rubygems_version: 3.0.3
|
287
288
|
signing_key:
|
metadata.gz.sig
CHANGED
Binary file
|