net-ssh 3.1.0.beta3 → 3.1.0.rc1
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGES.txt +5 -0
- data/lib/net/ssh/connection/session.rb +5 -3
- data/lib/net/ssh/verifiers/secure.rb +1 -1
- data/lib/net/ssh/version.rb +1 -1
- data/net-ssh.gemspec +5 -4
- data/test/connection/test_session.rb +8 -0
- data/test/verifiers/test_secure.rb +40 -0
- metadata +3 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1186f0f901ff1e9fcfa25d956c044ee53a54bee8
|
4
|
+
data.tar.gz: edac339140a2f3d294dd1cd2035c53a205178634
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab441807f815f8e6a6ef089643dcb90e2cbcf288aedb63b28f4892ec7daf20f8a2da962e797b7ff7e7454c51f83437dd2a9f61922a982d06caa7fc2692f32fcf
|
7
|
+
data.tar.gz: a393728bbe3395b1a118d43864c414f421cff17061500ad59143c25fafd1c704f7e42b137fb1ad05dde4ec43f78b1c22fe7b4d1675f2f0f639bb6d8f91774542
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGES.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
=== 3.1.0.rc1
|
2
|
+
|
3
|
+
* fix Secure#verify [Jean Boussier]
|
4
|
+
* use the smallest of don't spend longer time than keepalive if it's configured [Eugene Kenny]
|
5
|
+
|
1
6
|
=== 3.1.0.beta3
|
2
7
|
|
3
8
|
* forward/on_open_failed should stop listning closed socket otherwise it locks #269 [Miklos Fazekas,Scott McGillivray]
|
@@ -609,9 +609,11 @@ module Net; module SSH; module Connection
|
|
609
609
|
end
|
610
610
|
|
611
611
|
def io_select_wait(wait)
|
612
|
-
|
613
|
-
|
614
|
-
|
612
|
+
if @keepalive.enabled?
|
613
|
+
[wait, @keepalive.interval].compact.min
|
614
|
+
else
|
615
|
+
wait
|
616
|
+
end
|
615
617
|
end
|
616
618
|
|
617
619
|
MAP = Constants.constants.inject({}) do |memo, name|
|
@@ -30,7 +30,7 @@ module Net; module SSH; module Verifiers
|
|
30
30
|
# If a match was found, return true. Otherwise, raise an exception
|
31
31
|
# indicating that the key was not recognized.
|
32
32
|
unless found
|
33
|
-
process_cache_miss(host_keys, HostKeyMismatch, "does not match")
|
33
|
+
process_cache_miss(host_keys, arguments, HostKeyMismatch, "does not match")
|
34
34
|
end
|
35
35
|
|
36
36
|
found
|
data/lib/net/ssh/version.rb
CHANGED
@@ -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 = "
|
58
|
+
PRE = "rc1"
|
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)
|
data/net-ssh.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: net-ssh 3.1.0.
|
5
|
+
# stub: net-ssh 3.1.0.rc1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "net-ssh"
|
9
|
-
s.version = "3.1.0.
|
9
|
+
s.version = "3.1.0.rc1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Jamis Buck", "Delano Mandelbaum", "Mikl\u{f3}s Fazekas"]
|
14
14
|
s.cert_chain = ["net-ssh-public_cert.pem"]
|
15
|
-
s.date = "2016-03-
|
15
|
+
s.date = "2016-03-12"
|
16
16
|
s.description = "Net::SSH: a pure-Ruby implementation of the SSH2 client protocol. It allows you to write programs that invoke and interact with processes on remote servers, via SSH2."
|
17
17
|
s.email = "net-ssh@solutious.com"
|
18
18
|
s.extra_rdoc_files = [
|
@@ -184,7 +184,8 @@ Gem::Specification.new do |s|
|
|
184
184
|
"test/transport/test_packet_stream.rb",
|
185
185
|
"test/transport/test_server_version.rb",
|
186
186
|
"test/transport/test_session.rb",
|
187
|
-
"test/transport/test_state.rb"
|
187
|
+
"test/transport/test_state.rb",
|
188
|
+
"test/verifiers/test_secure.rb"
|
188
189
|
]
|
189
190
|
s.homepage = "https://github.com/net-ssh/net-ssh"
|
190
191
|
s.licenses = ["MIT"]
|
@@ -427,6 +427,14 @@ module Connection
|
|
427
427
|
session(options).process
|
428
428
|
end
|
429
429
|
|
430
|
+
def test_process_should_call_io_select_with_wait_if_provided_and_minimum
|
431
|
+
timeout = 10
|
432
|
+
wait = 5
|
433
|
+
options = { :keepalive => true, :keepalive_interval => timeout }
|
434
|
+
IO.expects(:select).with([socket],[],nil,wait).returns([[],[],[]])
|
435
|
+
session(options).process(wait)
|
436
|
+
end
|
437
|
+
|
430
438
|
def test_loop_should_call_process_until_process_returns_false
|
431
439
|
IO.stubs(:select).with([socket],[],nil,nil).returns([[],[],[]])
|
432
440
|
session.expects(:process).with(nil).times(4).returns(true,true,true,false).yields
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'common'
|
2
|
+
require 'net/ssh/verifiers/secure'
|
3
|
+
require 'ostruct'
|
4
|
+
|
5
|
+
class TestSecure < Test::Unit::TestCase
|
6
|
+
def test_raises_unknown_key_error_if_empty
|
7
|
+
secure_verifier = Net::SSH::Verifiers::Secure.new
|
8
|
+
host_keys = []
|
9
|
+
def host_keys.host
|
10
|
+
'foo'
|
11
|
+
end
|
12
|
+
assert_raises(Net::SSH::HostKeyUnknown) {
|
13
|
+
secure_verifier.verify(session:OpenStruct.new(host_keys:host_keys))
|
14
|
+
}
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_passess_if_sam
|
18
|
+
secure_verifier = Net::SSH::Verifiers::Secure.new
|
19
|
+
key = OpenStruct.new(ssh_type:'key_type',to_blob:'keyblob')
|
20
|
+
host_keys = [key]
|
21
|
+
def host_keys.host
|
22
|
+
'foo'
|
23
|
+
end
|
24
|
+
secure_verifier.verify(session:OpenStruct.new(host_keys:host_keys), key:key)
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_raises_mismatch_error_if_not_the_same
|
28
|
+
secure_verifier = Net::SSH::Verifiers::Secure.new
|
29
|
+
key_in_known_hosts = OpenStruct.new(ssh_type:'key_type',to_blob:'keyblob')
|
30
|
+
key_actual = OpenStruct.new(ssh_type:'key_type',to_blob:'not keyblob')
|
31
|
+
|
32
|
+
host_keys = [key_in_known_hosts]
|
33
|
+
def host_keys.host
|
34
|
+
'foo'
|
35
|
+
end
|
36
|
+
assert_raises(Net::SSH::HostKeyMismatch) {
|
37
|
+
secure_verifier.verify(session:OpenStruct.new(host_keys:host_keys), key:key_actual)
|
38
|
+
}
|
39
|
+
end
|
40
|
+
end
|
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: 3.1.0.
|
4
|
+
version: 3.1.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamis Buck
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
s/ZUKye79ELwFYKJOhjW5g725OL3hy+llhEleytwKRwgXFQBPTC4f5UkdxZVVWGH
|
32
32
|
e2C9M1m/2odPZo8h
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2016-03-
|
34
|
+
date: 2016-03-12 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: test-unit
|
@@ -236,6 +236,7 @@ files:
|
|
236
236
|
- test/transport/test_server_version.rb
|
237
237
|
- test/transport/test_session.rb
|
238
238
|
- test/transport/test_state.rb
|
239
|
+
- test/verifiers/test_secure.rb
|
239
240
|
homepage: https://github.com/net-ssh/net-ssh
|
240
241
|
licenses:
|
241
242
|
- MIT
|
metadata.gz.sig
CHANGED
Binary file
|