net-ssh 2.9.2 → 2.9.3.beta1
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.tar.gz.sig +0 -0
- data/.travis.yml +12 -4
- data/CHANGES.txt +7 -0
- data/Rakefile +10 -5
- data/lib/net/ssh/authentication/key_manager.rb +8 -4
- data/lib/net/ssh/authentication/pageant.rb +19 -4
- data/lib/net/ssh/proxy/command.rb +18 -5
- data/lib/net/ssh/transport/cipher_factory.rb +0 -1
- data/lib/net/ssh/transport/session.rb +8 -7
- data/lib/net/ssh/version.rb +2 -2
- data/net-ssh.gemspec +4 -4
- data/test/authentication/test_key_manager.rb +4 -0
- data/test/transport/test_session.rb +1 -1
- metadata +4 -4
- metadata.gz.sig +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec0f0d0b39f574411bd29862e5a2daa9a1b3dc91
|
4
|
+
data.tar.gz: a168942e250f47b0667d7d565f140feb9583b9dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1232cbcb52c0f9fbc4d3d2d8e340f9d3a64bde61cf4f579faaa189e815280cc986ee28d55ecb1d019623a6597310eda24fb88e74382e85b986a6a6390bdb645
|
7
|
+
data.tar.gz: d88ec6f463ada1697a50f1f71e1de20f537d17edf873f76d06034031a5b72ef8520a714ce18af7127e0c89596f81becb8662e0624399a10d7cde0cce87cdae6b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.travis.yml
CHANGED
@@ -1,10 +1,18 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
-
|
4
|
-
-
|
3
|
+
- 1.9.3
|
4
|
+
- 2.0.0
|
5
|
+
- 2.1.0
|
6
|
+
- 2.2.0
|
7
|
+
- jruby-head
|
8
|
+
- jruby-19mode
|
9
|
+
- 1.8.7
|
5
10
|
|
6
|
-
|
7
|
-
install: gem install jeweler test-unit mocha
|
11
|
+
install: gem install test-unit mocha
|
8
12
|
|
9
13
|
script: rake test
|
10
14
|
|
15
|
+
matrix:
|
16
|
+
allow_failures:
|
17
|
+
- rvm: jruby-head
|
18
|
+
- rvm: 1.8.7
|
data/CHANGES.txt
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
=== 2.9.4-beta1
|
2
|
+
|
3
|
+
* Use sysread and syswrite on Windows instead of read_nonblock and write [marc-etienne]
|
4
|
+
* Windows/peagant: use fiddle on ruby 2.2+/windows [Charlie Savage]
|
5
|
+
* Check if ssh key is a file [kiela]
|
6
|
+
|
7
|
+
=== 2.9.3
|
1
8
|
=== 2.9.2-rc3
|
2
9
|
|
3
10
|
* Remove advertised algorithms that were not working (curve25519-sha256@libssh.org) [mfazekas]
|
data/Rakefile
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
require "rubygems"
|
9
9
|
require "rake"
|
10
10
|
require "rake/clean"
|
11
|
+
if RUBY_VERSION >= '1.9.0'
|
11
12
|
require "rdoc/task"
|
12
13
|
|
13
14
|
task :default => ["build"]
|
@@ -55,11 +56,6 @@ rescue LoadError
|
|
55
56
|
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
56
57
|
end
|
57
58
|
|
58
|
-
require 'rake/testtask'
|
59
|
-
Rake::TestTask.new do |t|
|
60
|
-
t.libs = ["lib", "test"]
|
61
|
-
end
|
62
|
-
|
63
59
|
extra_files = %w[LICENSE.txt THANKS.txt CHANGES.txt ]
|
64
60
|
RDoc::Task.new do |rdoc|
|
65
61
|
rdoc.rdoc_dir = "rdoc"
|
@@ -73,3 +69,12 @@ RDoc::Task.new do |rdoc|
|
|
73
69
|
rdoc.rdoc_files.include(file) if File.exists?(file)
|
74
70
|
}
|
75
71
|
end
|
72
|
+
end
|
73
|
+
|
74
|
+
require 'rake/testtask'
|
75
|
+
Rake::TestTask.new do |t|
|
76
|
+
t.libs = ["lib", "test"]
|
77
|
+
if RUBY_VERSION < '1.9.0'
|
78
|
+
t.ruby_opts << '-rubygems'
|
79
|
+
end
|
80
|
+
end
|
@@ -188,14 +188,18 @@ module Net
|
|
188
188
|
def prepare_identities_from_files
|
189
189
|
key_files.map do |file|
|
190
190
|
public_key_file = file + ".pub"
|
191
|
-
if
|
192
|
-
{ :load_from => :pubkey_file, :file =>
|
193
|
-
elsif
|
191
|
+
if readable_file?(public_key_file)
|
192
|
+
{ :load_from => :pubkey_file, :file => public_key_file }
|
193
|
+
elsif readable_file?(file)
|
194
194
|
{ :load_from => :privkey_file, :file => file }
|
195
195
|
end
|
196
196
|
end.compact
|
197
197
|
end
|
198
198
|
|
199
|
+
def readable_file?(path)
|
200
|
+
File.file?(path) && File.readable?(path)
|
201
|
+
end
|
202
|
+
|
199
203
|
# Prepared identities from user key_data, preserving their order and sources.
|
200
204
|
def prepare_identities_from_data
|
201
205
|
key_data.map do |data|
|
@@ -209,7 +213,7 @@ module Net
|
|
209
213
|
begin
|
210
214
|
case identity[:load_from]
|
211
215
|
when :pubkey_file
|
212
|
-
key = KeyFactory.load_public_key(identity[:file]
|
216
|
+
key = KeyFactory.load_public_key(identity[:file])
|
213
217
|
{ :public_key => key, :from => :file, :file => identity[:file] }
|
214
218
|
when :privkey_file
|
215
219
|
private_key = KeyFactory.load_private_key(identity[:file], options[:passphrase], ask_passphrase)
|
@@ -1,10 +1,20 @@
|
|
1
|
-
require 'dl/import'
|
2
|
-
|
3
1
|
if RUBY_VERSION < "1.9"
|
2
|
+
require 'dl/import'
|
4
3
|
require 'dl/struct'
|
5
|
-
|
4
|
+
elsif RUBY_VERSION < "2.2"
|
5
|
+
require 'dl/import'
|
6
6
|
require 'dl/types'
|
7
7
|
require 'dl'
|
8
|
+
else
|
9
|
+
require 'fiddle'
|
10
|
+
require 'fiddle/types'
|
11
|
+
require 'fiddle/import'
|
12
|
+
|
13
|
+
# For now map DL to Fiddler versus updating all the code below
|
14
|
+
module DL
|
15
|
+
CPtr = Fiddle::Pointer
|
16
|
+
RUBY_FREE = Fiddle::RUBY_FREE
|
17
|
+
end
|
8
18
|
end
|
9
19
|
|
10
20
|
require 'net/ssh/errors'
|
@@ -36,12 +46,17 @@ module Net; module SSH; module Authentication
|
|
36
46
|
dlload 'advapi32'
|
37
47
|
|
38
48
|
SIZEOF_DWORD = DL.sizeof('L')
|
39
|
-
|
49
|
+
elsif RUBY_VERSION < "2.2"
|
40
50
|
extend DL::Importer
|
41
51
|
dlload 'user32','kernel32', 'advapi32'
|
42
52
|
include DL::Win32Types
|
43
53
|
|
44
54
|
SIZEOF_DWORD = DL::SIZEOF_LONG
|
55
|
+
else
|
56
|
+
extend Fiddle::Importer
|
57
|
+
dlload 'user32','kernel32', 'advapi32'
|
58
|
+
include Fiddle::Win32Types
|
59
|
+
SIZEOF_DWORD = Fiddle::SIZEOF_LONG
|
45
60
|
end
|
46
61
|
|
47
62
|
typealias("LPCTSTR", "char *") # From winnt.h
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'socket'
|
2
|
+
require 'rubygems'
|
2
3
|
require 'net/ssh/proxy/errors'
|
3
4
|
require 'net/ssh/ruby_compat'
|
4
5
|
|
@@ -67,12 +68,24 @@ module Net; module SSH; module Proxy
|
|
67
68
|
end
|
68
69
|
@command_line = command_line
|
69
70
|
class << io
|
70
|
-
|
71
|
-
write_nonblock
|
72
|
-
|
71
|
+
if Gem.win_platform?
|
72
|
+
# read_nonblock and write_nonblock are not available on Windows
|
73
|
+
# pipe. Use sysread and syswrite as a replacement works.
|
74
|
+
def send(data, flag)
|
75
|
+
syswrite(data)
|
76
|
+
end
|
73
77
|
|
74
|
-
|
75
|
-
|
78
|
+
def recv(size)
|
79
|
+
sysread(size)
|
80
|
+
end
|
81
|
+
else
|
82
|
+
def send(data, flag)
|
83
|
+
write_nonblock(data)
|
84
|
+
end
|
85
|
+
|
86
|
+
def recv(size)
|
87
|
+
read_nonblock(size)
|
88
|
+
end
|
76
89
|
end
|
77
90
|
end
|
78
91
|
io
|
@@ -76,7 +76,6 @@ module Net; module SSH; module Transport
|
|
76
76
|
cipher.padding = 0
|
77
77
|
|
78
78
|
cipher.extend(Net::SSH::Transport::CTR) if (name =~ /-ctr(@openssh.org)?$/)
|
79
|
-
|
80
79
|
cipher.iv = Net::SSH::Transport::KeyExpander.expand_key(cipher.iv_len, options[:iv], options) if ossl_name != "rc4"
|
81
80
|
|
82
81
|
key_len = KEY_LEN_OVERRIDE[name] || cipher.key_len
|
@@ -63,14 +63,15 @@ module Net; module SSH; module Transport
|
|
63
63
|
@options = options
|
64
64
|
|
65
65
|
debug { "establishing connection to #{@host}:#{@port}" }
|
66
|
-
|
67
|
-
@socket = timeout(options[:timeout] || 0)
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
66
|
+
|
67
|
+
@socket = timeout(options[:timeout] || 0) do
|
68
|
+
if (factory = options[:proxy])
|
69
|
+
factory.open(@host, @port, options)
|
70
|
+
else
|
71
|
+
TCPSocket.open(@host, @port, @bind_address)
|
72
72
|
end
|
73
|
-
|
73
|
+
end
|
74
|
+
|
74
75
|
@socket.extend(PacketStream)
|
75
76
|
@socket.logger = @logger
|
76
77
|
|
data/lib/net/ssh/version.rb
CHANGED
@@ -51,11 +51,11 @@ module Net; module SSH
|
|
51
51
|
MINOR = 9
|
52
52
|
|
53
53
|
# The tiny component of this version of the Net::SSH library
|
54
|
-
TINY =
|
54
|
+
TINY = 3
|
55
55
|
|
56
56
|
# The prerelease component of this version of the Net::SSH library
|
57
57
|
# nil allowed
|
58
|
-
PRE =
|
58
|
+
PRE = 'beta1'
|
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 2.9.
|
5
|
+
# stub: net-ssh 2.9.3.beta1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "net-ssh"
|
9
|
-
s.version = "2.9.
|
9
|
+
s.version = "2.9.3.beta1"
|
10
10
|
|
11
|
-
s.required_rubygems_version = Gem::Requirement.new("
|
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 = "2015-01-
|
15
|
+
s.date = "2015-01-27"
|
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 = [
|
@@ -156,7 +156,9 @@ module Authentication
|
|
156
156
|
|
157
157
|
def stub_file_private_key(name, key, options = {})
|
158
158
|
manager.add(name)
|
159
|
+
File.stubs(:file?).with(name).returns(true)
|
159
160
|
File.stubs(:readable?).with(name).returns(true)
|
161
|
+
File.stubs(:file?).with(name + ".pub").returns(true)
|
160
162
|
File.stubs(:readable?).with(name + ".pub").returns(false)
|
161
163
|
|
162
164
|
case options.fetch(:passphrase, :indifferently)
|
@@ -179,7 +181,9 @@ module Authentication
|
|
179
181
|
|
180
182
|
def stub_file_public_key(name, key)
|
181
183
|
manager.add(name)
|
184
|
+
File.stubs(:file?).with(name).returns(true)
|
182
185
|
File.stubs(:readable?).with(name).returns(false)
|
186
|
+
File.stubs(:file?).with(name + ".pub").returns(true)
|
183
187
|
File.stubs(:readable?).with(name + ".pub").returns(true)
|
184
188
|
|
185
189
|
Net::SSH::KeyFactory.expects(:load_public_key).with(name + ".pub").returns(key).at_least_once
|
@@ -315,7 +315,7 @@ module Transport
|
|
315
315
|
def session(options={})
|
316
316
|
@session ||= begin
|
317
317
|
host = options.delete(:host) || "net.ssh.test"
|
318
|
-
TCPSocket.stubs(:open).with(host, options[:port] || 22).returns(socket)
|
318
|
+
TCPSocket.stubs(:open).with(host, options[:port] || 22, nil).returns(socket)
|
319
319
|
Net::SSH::Transport::ServerVersion.stubs(:new).returns(server_version)
|
320
320
|
Net::SSH::Transport::Algorithms.stubs(:new).returns(algorithms)
|
321
321
|
|
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.9.
|
4
|
+
version: 2.9.3.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamis Buck
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
MbvRpzgROzyfw1qYi4dnIyMwTtXFFcZ0a2jpxHPkcTYFK6TzvFgDLAP0Y/u9jqUQ
|
32
32
|
eZ7/3CdSi/isZHEw
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-01-
|
34
|
+
date: 2015-01-27 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: test-unit
|
@@ -243,9 +243,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
243
243
|
version: '0'
|
244
244
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
245
245
|
requirements:
|
246
|
-
- - '
|
246
|
+
- - '>'
|
247
247
|
- !ruby/object:Gem::Version
|
248
|
-
version:
|
248
|
+
version: 1.3.1
|
249
249
|
requirements: []
|
250
250
|
rubyforge_project: net-ssh
|
251
251
|
rubygems_version: 2.2.2
|
metadata.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
�����"e�k�<�wж�.)ì-0oeb�;S�k~'}M��mR��Q�|��*��,ލC�A�D�ߪ�~��k@�t��Y�O����9qa�}��6-!�y�8���)2�g���]��D���\��-(��F���!^���:�=���Q����A�;g�J�f00��co��l/Pi��<�DQ��u�ѡ�ze���?��zb���j�U�ъ�i虃6�݇R��,��g����cҔ�n�ζ/n���u���{���Ʒ
|