net-ssh 2.0.6 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +9 -0
- data/Manifest +1 -1
- data/lib/net/ssh/authentication/agent.rb +2 -2
- data/lib/net/ssh/authentication/key_manager.rb +4 -4
- data/lib/net/ssh/version.rb +1 -1
- data/net-ssh.gemspec +3 -3
- data/test/authentication/methods/test_hostbased.rb +2 -0
- data/test/authentication/test_key_manager.rb +4 -4
- metadata +3 -4
- data/TODO +0 -1
data/CHANGELOG.rdoc
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
=== 2.0.7 / 29 December 2008
|
2
|
+
|
3
|
+
* Make key manager use private keys instead of requiring public key to exist [arilerner@mac.com]
|
4
|
+
|
5
|
+
* Fix failing tests [arilerner@mac.com]
|
6
|
+
|
7
|
+
* Don't include pageant when running under JRuby [Angel N. Sciortino]
|
8
|
+
|
9
|
+
|
1
10
|
=== 2.0.6 / 6 December 2008
|
2
11
|
|
3
12
|
* Update the Manifest file so that the gem includes all necessary files [Jamis Buck]
|
data/Manifest
CHANGED
@@ -62,6 +62,7 @@ lib/net/ssh/verifiers/strict.rb
|
|
62
62
|
lib/net/ssh/version.rb
|
63
63
|
lib/net/ssh.rb
|
64
64
|
Manifest
|
65
|
+
net-ssh.gemspec
|
65
66
|
Rakefile
|
66
67
|
README.rdoc
|
67
68
|
setup.rb
|
@@ -101,4 +102,3 @@ test/transport/test_server_version.rb
|
|
101
102
|
test/transport/test_session.rb
|
102
103
|
test/transport/test_state.rb
|
103
104
|
THANKS.rdoc
|
104
|
-
TODO
|
@@ -3,7 +3,7 @@ require 'net/ssh/errors'
|
|
3
3
|
require 'net/ssh/loggable'
|
4
4
|
require 'net/ssh/transport/server_version'
|
5
5
|
|
6
|
-
require 'net/ssh/authentication/pageant' if File::ALT_SEPARATOR
|
6
|
+
require 'net/ssh/authentication/pageant' if File::ALT_SEPARATOR && !(RUBY_PLATFORM =~ /java/)
|
7
7
|
|
8
8
|
module Net; module SSH; module Authentication
|
9
9
|
|
@@ -173,4 +173,4 @@ module Net; module SSH; module Authentication
|
|
173
173
|
end
|
174
174
|
end
|
175
175
|
|
176
|
-
end; end; end
|
176
|
+
end; end; end
|
@@ -87,12 +87,12 @@ module Net
|
|
87
87
|
known_identities[key] = { :from => :agent }
|
88
88
|
end
|
89
89
|
end
|
90
|
-
|
90
|
+
|
91
91
|
key_files.each do |file|
|
92
|
-
|
93
|
-
if File.readable?(public_key_file)
|
92
|
+
if File.readable?(file)
|
94
93
|
begin
|
95
|
-
|
94
|
+
private_key = KeyFactory.load_private_key(file)
|
95
|
+
key = private_key.send :public_key
|
96
96
|
identities.push key
|
97
97
|
known_identities[key] = { :from => :file, :file => file }
|
98
98
|
rescue Exception => e
|
data/lib/net/ssh/version.rb
CHANGED
data/net-ssh.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{net-ssh}
|
3
|
-
s.version = "2.0.
|
3
|
+
s.version = "2.0.7"
|
4
4
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
6
6
|
s.authors = ["Jamis Buck"]
|
7
|
-
s.date = %q{2008-12-
|
7
|
+
s.date = %q{2008-12-29}
|
8
8
|
s.description = %q{a pure-Ruby implementation of the SSH2 client protocol}
|
9
9
|
s.email = %q{jamis@jamisbuck.org}
|
10
10
|
s.extra_rdoc_files = ["CHANGELOG.rdoc", "lib/net/ssh/authentication/agent.rb", "lib/net/ssh/authentication/constants.rb", "lib/net/ssh/authentication/key_manager.rb", "lib/net/ssh/authentication/methods/abstract.rb", "lib/net/ssh/authentication/methods/hostbased.rb", "lib/net/ssh/authentication/methods/keyboard_interactive.rb", "lib/net/ssh/authentication/methods/password.rb", "lib/net/ssh/authentication/methods/publickey.rb", "lib/net/ssh/authentication/pageant.rb", "lib/net/ssh/authentication/session.rb", "lib/net/ssh/buffer.rb", "lib/net/ssh/buffered_io.rb", "lib/net/ssh/config.rb", "lib/net/ssh/connection/channel.rb", "lib/net/ssh/connection/constants.rb", "lib/net/ssh/connection/session.rb", "lib/net/ssh/connection/term.rb", "lib/net/ssh/errors.rb", "lib/net/ssh/key_factory.rb", "lib/net/ssh/known_hosts.rb", "lib/net/ssh/loggable.rb", "lib/net/ssh/packet.rb", "lib/net/ssh/prompt.rb", "lib/net/ssh/proxy/errors.rb", "lib/net/ssh/proxy/http.rb", "lib/net/ssh/proxy/socks4.rb", "lib/net/ssh/proxy/socks5.rb", "lib/net/ssh/ruby_compat.rb", "lib/net/ssh/service/forward.rb", "lib/net/ssh/test/channel.rb", "lib/net/ssh/test/extensions.rb", "lib/net/ssh/test/kex.rb", "lib/net/ssh/test/local_packet.rb", "lib/net/ssh/test/packet.rb", "lib/net/ssh/test/remote_packet.rb", "lib/net/ssh/test/script.rb", "lib/net/ssh/test/socket.rb", "lib/net/ssh/test.rb", "lib/net/ssh/transport/algorithms.rb", "lib/net/ssh/transport/cipher_factory.rb", "lib/net/ssh/transport/constants.rb", "lib/net/ssh/transport/hmac/abstract.rb", "lib/net/ssh/transport/hmac/md5.rb", "lib/net/ssh/transport/hmac/md5_96.rb", "lib/net/ssh/transport/hmac/none.rb", "lib/net/ssh/transport/hmac/sha1.rb", "lib/net/ssh/transport/hmac/sha1_96.rb", "lib/net/ssh/transport/hmac.rb", "lib/net/ssh/transport/identity_cipher.rb", "lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb", "lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb", "lib/net/ssh/transport/kex.rb", "lib/net/ssh/transport/openssl.rb", "lib/net/ssh/transport/packet_stream.rb", "lib/net/ssh/transport/server_version.rb", "lib/net/ssh/transport/session.rb", "lib/net/ssh/transport/state.rb", "lib/net/ssh/verifiers/lenient.rb", "lib/net/ssh/verifiers/null.rb", "lib/net/ssh/verifiers/strict.rb", "lib/net/ssh/version.rb", "lib/net/ssh.rb", "README.rdoc", "THANKS.rdoc"]
|
11
|
-
s.files = ["CHANGELOG.rdoc", "lib/net/ssh/authentication/agent.rb", "lib/net/ssh/authentication/constants.rb", "lib/net/ssh/authentication/key_manager.rb", "lib/net/ssh/authentication/methods/abstract.rb", "lib/net/ssh/authentication/methods/hostbased.rb", "lib/net/ssh/authentication/methods/keyboard_interactive.rb", "lib/net/ssh/authentication/methods/password.rb", "lib/net/ssh/authentication/methods/publickey.rb", "lib/net/ssh/authentication/pageant.rb", "lib/net/ssh/authentication/session.rb", "lib/net/ssh/buffer.rb", "lib/net/ssh/buffered_io.rb", "lib/net/ssh/config.rb", "lib/net/ssh/connection/channel.rb", "lib/net/ssh/connection/constants.rb", "lib/net/ssh/connection/session.rb", "lib/net/ssh/connection/term.rb", "lib/net/ssh/errors.rb", "lib/net/ssh/key_factory.rb", "lib/net/ssh/known_hosts.rb", "lib/net/ssh/loggable.rb", "lib/net/ssh/packet.rb", "lib/net/ssh/prompt.rb", "lib/net/ssh/proxy/errors.rb", "lib/net/ssh/proxy/http.rb", "lib/net/ssh/proxy/socks4.rb", "lib/net/ssh/proxy/socks5.rb", "lib/net/ssh/ruby_compat.rb", "lib/net/ssh/service/forward.rb", "lib/net/ssh/test/channel.rb", "lib/net/ssh/test/extensions.rb", "lib/net/ssh/test/kex.rb", "lib/net/ssh/test/local_packet.rb", "lib/net/ssh/test/packet.rb", "lib/net/ssh/test/remote_packet.rb", "lib/net/ssh/test/script.rb", "lib/net/ssh/test/socket.rb", "lib/net/ssh/test.rb", "lib/net/ssh/transport/algorithms.rb", "lib/net/ssh/transport/cipher_factory.rb", "lib/net/ssh/transport/constants.rb", "lib/net/ssh/transport/hmac/abstract.rb", "lib/net/ssh/transport/hmac/md5.rb", "lib/net/ssh/transport/hmac/md5_96.rb", "lib/net/ssh/transport/hmac/none.rb", "lib/net/ssh/transport/hmac/sha1.rb", "lib/net/ssh/transport/hmac/sha1_96.rb", "lib/net/ssh/transport/hmac.rb", "lib/net/ssh/transport/identity_cipher.rb", "lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb", "lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb", "lib/net/ssh/transport/kex.rb", "lib/net/ssh/transport/openssl.rb", "lib/net/ssh/transport/packet_stream.rb", "lib/net/ssh/transport/server_version.rb", "lib/net/ssh/transport/session.rb", "lib/net/ssh/transport/state.rb", "lib/net/ssh/verifiers/lenient.rb", "lib/net/ssh/verifiers/null.rb", "lib/net/ssh/verifiers/strict.rb", "lib/net/ssh/version.rb", "lib/net/ssh.rb", "Manifest", "Rakefile", "README.rdoc", "setup.rb", "test/authentication/methods/common.rb", "test/authentication/methods/test_abstract.rb", "test/authentication/methods/test_hostbased.rb", "test/authentication/methods/test_keyboard_interactive.rb", "test/authentication/methods/test_password.rb", "test/authentication/methods/test_publickey.rb", "test/authentication/test_agent.rb", "test/authentication/test_key_manager.rb", "test/authentication/test_session.rb", "test/common.rb", "test/configs/eqsign", "test/configs/exact_match", "test/configs/wild_cards", "test/connection/test_channel.rb", "test/connection/test_session.rb", "test/test_all.rb", "test/test_buffer.rb", "test/test_buffered_io.rb", "test/test_config.rb", "test/test_key_factory.rb", "test/transport/hmac/test_md5.rb", "test/transport/hmac/test_md5_96.rb", "test/transport/hmac/test_none.rb", "test/transport/hmac/test_sha1.rb", "test/transport/hmac/test_sha1_96.rb", "test/transport/kex/test_diffie_hellman_group1_sha1.rb", "test/transport/kex/test_diffie_hellman_group_exchange_sha1.rb", "test/transport/test_algorithms.rb", "test/transport/test_cipher_factory.rb", "test/transport/test_hmac.rb", "test/transport/test_identity_cipher.rb", "test/transport/test_packet_stream.rb", "test/transport/test_server_version.rb", "test/transport/test_session.rb", "test/transport/test_state.rb", "THANKS.rdoc"
|
11
|
+
s.files = ["CHANGELOG.rdoc", "lib/net/ssh/authentication/agent.rb", "lib/net/ssh/authentication/constants.rb", "lib/net/ssh/authentication/key_manager.rb", "lib/net/ssh/authentication/methods/abstract.rb", "lib/net/ssh/authentication/methods/hostbased.rb", "lib/net/ssh/authentication/methods/keyboard_interactive.rb", "lib/net/ssh/authentication/methods/password.rb", "lib/net/ssh/authentication/methods/publickey.rb", "lib/net/ssh/authentication/pageant.rb", "lib/net/ssh/authentication/session.rb", "lib/net/ssh/buffer.rb", "lib/net/ssh/buffered_io.rb", "lib/net/ssh/config.rb", "lib/net/ssh/connection/channel.rb", "lib/net/ssh/connection/constants.rb", "lib/net/ssh/connection/session.rb", "lib/net/ssh/connection/term.rb", "lib/net/ssh/errors.rb", "lib/net/ssh/key_factory.rb", "lib/net/ssh/known_hosts.rb", "lib/net/ssh/loggable.rb", "lib/net/ssh/packet.rb", "lib/net/ssh/prompt.rb", "lib/net/ssh/proxy/errors.rb", "lib/net/ssh/proxy/http.rb", "lib/net/ssh/proxy/socks4.rb", "lib/net/ssh/proxy/socks5.rb", "lib/net/ssh/ruby_compat.rb", "lib/net/ssh/service/forward.rb", "lib/net/ssh/test/channel.rb", "lib/net/ssh/test/extensions.rb", "lib/net/ssh/test/kex.rb", "lib/net/ssh/test/local_packet.rb", "lib/net/ssh/test/packet.rb", "lib/net/ssh/test/remote_packet.rb", "lib/net/ssh/test/script.rb", "lib/net/ssh/test/socket.rb", "lib/net/ssh/test.rb", "lib/net/ssh/transport/algorithms.rb", "lib/net/ssh/transport/cipher_factory.rb", "lib/net/ssh/transport/constants.rb", "lib/net/ssh/transport/hmac/abstract.rb", "lib/net/ssh/transport/hmac/md5.rb", "lib/net/ssh/transport/hmac/md5_96.rb", "lib/net/ssh/transport/hmac/none.rb", "lib/net/ssh/transport/hmac/sha1.rb", "lib/net/ssh/transport/hmac/sha1_96.rb", "lib/net/ssh/transport/hmac.rb", "lib/net/ssh/transport/identity_cipher.rb", "lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb", "lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb", "lib/net/ssh/transport/kex.rb", "lib/net/ssh/transport/openssl.rb", "lib/net/ssh/transport/packet_stream.rb", "lib/net/ssh/transport/server_version.rb", "lib/net/ssh/transport/session.rb", "lib/net/ssh/transport/state.rb", "lib/net/ssh/verifiers/lenient.rb", "lib/net/ssh/verifiers/null.rb", "lib/net/ssh/verifiers/strict.rb", "lib/net/ssh/version.rb", "lib/net/ssh.rb", "Manifest", "net-ssh.gemspec", "Rakefile", "README.rdoc", "setup.rb", "test/authentication/methods/common.rb", "test/authentication/methods/test_abstract.rb", "test/authentication/methods/test_hostbased.rb", "test/authentication/methods/test_keyboard_interactive.rb", "test/authentication/methods/test_password.rb", "test/authentication/methods/test_publickey.rb", "test/authentication/test_agent.rb", "test/authentication/test_key_manager.rb", "test/authentication/test_session.rb", "test/common.rb", "test/configs/eqsign", "test/configs/exact_match", "test/configs/wild_cards", "test/connection/test_channel.rb", "test/connection/test_session.rb", "test/test_all.rb", "test/test_buffer.rb", "test/test_buffered_io.rb", "test/test_config.rb", "test/test_key_factory.rb", "test/transport/hmac/test_md5.rb", "test/transport/hmac/test_md5_96.rb", "test/transport/hmac/test_none.rb", "test/transport/hmac/test_sha1.rb", "test/transport/hmac/test_sha1_96.rb", "test/transport/kex/test_diffie_hellman_group1_sha1.rb", "test/transport/kex/test_diffie_hellman_group_exchange_sha1.rb", "test/transport/test_algorithms.rb", "test/transport/test_cipher_factory.rb", "test/transport/test_hmac.rb", "test/transport/test_identity_cipher.rb", "test/transport/test_packet_stream.rb", "test/transport/test_server_version.rb", "test/transport/test_session.rb", "test/transport/test_state.rb", "THANKS.rdoc"]
|
12
12
|
s.has_rdoc = true
|
13
13
|
s.homepage = %q{http://net-ssh.rubyforge.org/ssh}
|
14
14
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Net-ssh", "--main", "README.rdoc"]
|
@@ -16,6 +16,7 @@ module Authentication; module Methods
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def test_authenticate_should_return_false_if_no_keys_can_authenticate
|
19
|
+
ENV.stubs(:[]).with('USER').returns(nil)
|
19
20
|
key_manager.expects(:sign).with(&signature_parameters(keys.first)).returns("sig-one")
|
20
21
|
key_manager.expects(:sign).with(&signature_parameters(keys.last)).returns("sig-two")
|
21
22
|
|
@@ -37,6 +38,7 @@ module Authentication; module Methods
|
|
37
38
|
end
|
38
39
|
|
39
40
|
def test_authenticate_should_return_true_if_any_key_can_authenticate
|
41
|
+
ENV.stubs(:[]).with('USER').returns(nil)
|
40
42
|
key_manager.expects(:sign).with(&signature_parameters(keys.first)).returns("sig-one")
|
41
43
|
|
42
44
|
transport.expect do |t, packet|
|
@@ -32,13 +32,13 @@ module Authentication
|
|
32
32
|
manager.stubs(:agent).returns(nil)
|
33
33
|
|
34
34
|
stub_file_key "/first", rsa
|
35
|
-
stub_file_key "/second", dsa
|
35
|
+
stub_file_key "/second", dsa
|
36
36
|
|
37
37
|
identities = manager.identities
|
38
38
|
assert_equal 2, identities.length
|
39
39
|
assert_equal rsa.to_blob, identities.first.to_blob
|
40
40
|
assert_equal dsa.to_blob, identities.last.to_blob
|
41
|
-
|
41
|
+
|
42
42
|
assert_equal({:from => :file, :file => "/first"}, manager.known_identities[rsa])
|
43
43
|
assert_equal({:from => :file, :file => "/second"}, manager.known_identities[dsa])
|
44
44
|
end
|
@@ -75,8 +75,8 @@ module Authentication
|
|
75
75
|
def stub_file_key(name, key, also_private=false)
|
76
76
|
manager.add(name)
|
77
77
|
File.expects(:readable?).returns(true)
|
78
|
-
Net::SSH::KeyFactory.expects(:
|
79
|
-
|
78
|
+
Net::SSH::KeyFactory.expects(:load_private_key).with(name, nil).returns(key).at_least_once
|
79
|
+
key.expects(:public_key).returns(key)
|
80
80
|
end
|
81
81
|
|
82
82
|
def rsa(size=32)
|
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: 2.0.
|
4
|
+
version: 2.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamis Buck
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-12-
|
12
|
+
date: 2008-12-29 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -159,6 +159,7 @@ files:
|
|
159
159
|
- lib/net/ssh/version.rb
|
160
160
|
- lib/net/ssh.rb
|
161
161
|
- Manifest
|
162
|
+
- net-ssh.gemspec
|
162
163
|
- Rakefile
|
163
164
|
- README.rdoc
|
164
165
|
- setup.rb
|
@@ -198,8 +199,6 @@ files:
|
|
198
199
|
- test/transport/test_session.rb
|
199
200
|
- test/transport/test_state.rb
|
200
201
|
- THANKS.rdoc
|
201
|
-
- TODO
|
202
|
-
- net-ssh.gemspec
|
203
202
|
has_rdoc: true
|
204
203
|
homepage: http://net-ssh.rubyforge.org/ssh
|
205
204
|
post_install_message:
|