net-ssh 2.0.23 → 2.0.24

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.
@@ -1,4 +1,10 @@
1
1
 
2
+ === 2.0.24 / 14 Jan 2011
3
+
4
+ * Fix for process code to correctly wait until remote_id is set before sending any output, including eof. [Daniel Pittman, Markus Roberts]
5
+ * Fix circular require warning in Ruby 1.9.2 [Gavin Brock]
6
+
7
+
2
8
  === 2.0.23 / 03 Jun 2010
3
9
 
4
10
  * delay CHANNEL_EOF packet until output buffer is empty [Rich Lane]
@@ -3,6 +3,7 @@
3
3
  * Docs: http://net-ssh.github.com/net-ssh
4
4
  * Issues: http://net-ssh.lighthouseapp.com/
5
5
  * Codes: http://github.com/net-ssh/net-ssh
6
+ * Email: net-ssh@solutious.com
6
7
 
7
8
  == DESCRIPTION:
8
9
 
@@ -120,7 +121,7 @@ which should produce the following:
120
121
 
121
122
  (The MIT License)
122
123
 
123
- Copyright (c) 2008 Jamis Buck <jamis@37signals.com>
124
+ Copyright (c) 2008 Jamis Buck
124
125
 
125
126
  Permission is hereby granted, free of charge, to any person obtaining
126
127
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -42,6 +42,7 @@ Rake::GemPackageTask.new(@spec) do |p|
42
42
  p.need_tar = true if RUBY_PLATFORM !~ /mswin/
43
43
  end
44
44
 
45
+ task :build => [ :package ]
45
46
  task :release => [ :rdoc, :package ]
46
47
  task :install => [ :rdoc, :package ] do
47
48
  sh %{sudo gem install pkg/#{name}-#{version}.gem}
@@ -5,7 +5,7 @@ contributions:
5
5
  GOTOU Yuuzou <gotoyuzo@notwork.org>
6
6
  * help and code related to OpenSSL
7
7
 
8
- Guillaume Mar�ais <guillaume.marcais@free.fr>
8
+ Guillaume Marçais <guillaume.marcais@free.fr>
9
9
  * support for communicating with the the PuTTY "pageant" process
10
10
 
11
11
  Daniel Berger <djberg96@yahoo.com>
@@ -14,3 +14,6 @@ Daniel Berger <djberg96@yahoo.com>
14
14
 
15
15
  Chris Andrews <chris@nodnol.org> and Lee Jensen <lee@outerim.com>
16
16
  * support for ssh agent forwarding
17
+
18
+ Hiroshi Nakamura
19
+ * fixed errors with JRuby tests
@@ -311,7 +311,7 @@ module Net; module SSH; module Connection
311
311
  @on_process.call(self) if @on_process
312
312
  enqueue_pending_output
313
313
 
314
- if @eof and not @sent_eof and output.empty?
314
+ if @eof and not @sent_eof and output.empty? and remote_id
315
315
  connection.send_message(Buffer.from(:byte, CHANNEL_EOF, :long, remote_id))
316
316
  @sent_eof = true
317
317
  end
@@ -11,7 +11,7 @@ module Net; module SSH
11
11
  # klass = Net::SSH::KeyFactory.get("rsa")
12
12
  # assert klass.is_a?(OpenSSL::PKey::RSA)
13
13
  #
14
- # key = Net::SSH::KeyFacory.load_public_key("~/.ssh/id_dsa.pub")
14
+ # key = Net::SSH::KeyFactory.load_public_key("~/.ssh/id_dsa.pub")
15
15
  class KeyFactory
16
16
  # Specifies the mapping of SSH names to OpenSSL key classes.
17
17
  MAP = {
@@ -1,5 +1,4 @@
1
1
  require 'openssl'
2
- require 'net/ssh/buffer'
3
2
 
4
3
  module OpenSSL
5
4
 
@@ -51,7 +51,7 @@ module Net; module SSH
51
51
  MINOR = 0
52
52
 
53
53
  # The tiny component of this version of the Net::SSH library
54
- TINY = 23
54
+ TINY = 24
55
55
 
56
56
  # The current version of the Net::SSH library as a Version instance
57
57
  CURRENT = new(MAJOR, MINOR, TINY)
@@ -1,7 +1,7 @@
1
1
  @spec = Gem::Specification.new do |s|
2
2
  s.name = "net-ssh"
3
3
  s.rubyforge_project = 'net-ssh'
4
- s.version = "2.0.23"
4
+ s.version = "2.0.24"
5
5
  s.summary = "Net::SSH: a pure-Ruby implementation of the SSH2 client protocol."
6
6
  s.description = s.summary
7
7
  s.authors = ["Jamis Buck", "Delano Mandelbaum"]
@@ -1,11 +1,11 @@
1
- 2010-03-16
1
+ 2010-03-16
2
2
 
3
3
  RUNNING TESTS
4
4
 
5
5
  Run the test suite from the net-ssh directory with the following command:
6
6
 
7
7
  ruby -Ilib -Itest -rrubygems test/test_all.rb
8
-
8
+
9
9
  Run a single test file like this:
10
10
 
11
11
  ruby -Ilib -Itest -rrubygems test/transport/test_server_version.rb
@@ -25,18 +25,19 @@ PORT FORWARDING TESTS
25
25
  ruby -Ilib -Itest -rrubygems test/manual/test_forward.rb
26
26
 
27
27
  test_forward.rb must be run separately from the test suite because
28
- it requires authorizing your public SSH keys on you localhost.
28
+ it requires authorizing your public SSH keys on you localhost.
29
29
 
30
30
  If you already have keys you can do this:
31
31
 
32
32
  cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
33
33
 
34
34
  If you don't have keys see:
35
-
35
+
36
36
  http://kimmo.suominen.com/docs/ssh/#ssh-keygen
37
-
38
- You should now be able to login to your localhost with out
37
+
38
+ You should now be able to login to your localhost with out
39
39
  bring prompted for a password:
40
40
 
41
41
  ssh localhost
42
-
42
+
43
+ -Delano
@@ -75,7 +75,7 @@ module Authentication; module Methods
75
75
 
76
76
  @@keys = nil
77
77
  def keys
78
- @@keys ||= [OpenSSL::PKey::RSA.new(32), OpenSSL::PKey::DSA.new(32)]
78
+ @@keys ||= [OpenSSL::PKey::RSA.new(512), OpenSSL::PKey::DSA.new(512)]
79
79
  end
80
80
 
81
81
  def key_manager(options={})
@@ -106,7 +106,7 @@ module Authentication; module Methods
106
106
 
107
107
  @@keys = nil
108
108
  def keys
109
- @@keys ||= [OpenSSL::PKey::RSA.new(32), OpenSSL::PKey::DSA.new(32)]
109
+ @@keys ||= [OpenSSL::PKey::RSA.new(512), OpenSSL::PKey::DSA.new(512)]
110
110
  end
111
111
 
112
112
  def key_manager(options={})
@@ -96,7 +96,7 @@ module Authentication
96
96
 
97
97
  def test_identities_should_augment_identities_with_comment_field
98
98
  key1 = key
99
- key2 = OpenSSL::PKey::DSA.new(32)
99
+ key2 = OpenSSL::PKey::DSA.new(512)
100
100
 
101
101
  socket.expect do |s, type, buffer|
102
102
  assert_equal SSH2_AGENT_REQUEST_IDENTITIES, type
@@ -180,7 +180,7 @@ module Authentication
180
180
  end
181
181
 
182
182
  def key
183
- @key ||= OpenSSL::PKey::RSA.new(32)
183
+ @key ||= OpenSSL::PKey::RSA.new(512)
184
184
  end
185
185
 
186
186
  def socket
@@ -84,12 +84,12 @@ module Authentication
84
84
  key.expects(:public_key).returns(key)
85
85
  end
86
86
 
87
- def rsa(size=32)
87
+ def rsa(size=512)
88
88
  @rsa ||= OpenSSL::PKey::RSA.new(size)
89
89
  end
90
90
 
91
91
  def dsa
92
- @dsa ||= OpenSSL::PKey::DSA.new(32)
92
+ @dsa ||= OpenSSL::PKey::DSA.new(512)
93
93
  end
94
94
 
95
95
  def agent
@@ -1,7 +1,7 @@
1
1
  # $ ruby -Ilib -Itest -rrubygems test/test_all.rb
2
2
  # $ ruby -Ilib -Itest -rrubygems test/transport/test_server_version.rb
3
3
  Dir.chdir(File.dirname(__FILE__)) do
4
- test_files = Dir['**/test_*.rb']
4
+ test_files = Dir['**/test_*.rb']-['test_all.rb'] # prevent circular require
5
5
  test_files = test_files.reject { |f| f =~ /^manual/ }
6
6
  test_files = test_files.select { |f| f =~ Regexp.new(ENV['ONLY']) } if ENV['ONLY']
7
7
  test_files = test_files.reject { |f| f =~ Regexp.new(ENV['EXCEPT']) } if ENV['EXCEPT']
@@ -48,10 +48,12 @@ class TestKeyFactory < Test::Unit::TestCase
48
48
  private
49
49
 
50
50
  def rsa_key
51
- @rsa_key ||= OpenSSL::PKey::RSA.new("0@\002\001\000\002\t\000\300\030\317\2132\340 \267\002\003\001\000\001\002\t\000\236~\232\025\350Y=\341\002\005\000\352D\217\a\002\005\000\321\352\304\321\002\005\000\242\350\206%\002\005\000\270\021\217\361\002\004~\253\214j")
51
+ # 512 bits
52
+ @rsa_key ||= OpenSSL::PKey::RSA.new("0\202\001;\002\001\000\002A\000\235\236\374N\e@2E\321\3757\003\354c\276N\f\003\3479Ko\005\317\0027\a\255=\345!\306\220\340\211;\027u\331\260\362\2063x\332\301y4\353\v%\032\214v\312\304\212\271GJ\353\2701\031\002\003\001\000\001\002@\022Y\306*\031\306\031\224Cde\231QV3{\306\256U\2477\377\017\000\020\323\363R\332\027\351\034\224OU\020\227H|pUS\n\263+%\304\341\321\273/\271\e\004L\250\273\020&,\t\304By\002!\000\311c\246%a\002\305\277\262R\266\244\250\025V_\351]\264\016\265\341\355\305\223\347Z$8\205#\023\002!\000\310\\\367|\243I\363\350\020\307\246\302\365\ed\212L\273\2158M\223w\a\367 C\t\224A4\243\002!\000\262]+}\327\231\331\002\2331^\312\036\204'g\363\f&\271\020\245\365-\024}\306\374e\202\2459\002 }\231\341\276\3551\277\307{5\\\361\233\353G\024wS\237\fk}\004\302&\205\277\340rb\211\327\002!\000\223\307\025I:\215_\260\370\252\3757\256Y&X\364\354\342\215\350\203E8\227|\f\237M\375D|")
52
53
  end
53
54
 
54
55
  def dsa_key
56
+ # 512 bits
55
57
  @dsa_key ||= OpenSSL::PKey::DSA.new("0\201\367\002\001\000\002A\000\203\316/\037u\272&J\265\003l3\315d\324h\372{\t8\252#\331_\026\006\035\270\266\255\343\353Z\302\276\335\336\306\220\375\202L\244\244J\206>\346\b\315\211\302L\246x\247u\a\376\366\345\302\016#\002\025\000\244\274\302\221Og\275/\302+\356\346\360\024\373wI\2573\361\002@\027\215\270r*\f\213\350C\245\021:\350 \006\\\376\345\022`\210b\262\3643\023XLKS\320\370\002\276\347A\nU\204\276\324\256`=\026\240\330\306J\316V\213\024\e\030\215\355\006\037q\337\356ln\002@\017\257\034\f\260\333'S\271#\237\230E\321\312\027\021\226\331\251Vj\220\305\316\036\v\266+\000\230\270\177B\003?t\a\305]e\344\261\334\023\253\323\251\223M\2175)a(\004\"lI8\312\303\307\a\002\024_\aznW\345\343\203V\326\246ua\203\376\201o\350\302\002")
56
58
  end
57
59
 
@@ -95,9 +95,9 @@ module Transport; module Kex
95
95
  Net::SSH::Transport::Kex::DiffieHellmanGroup1SHA1
96
96
  end
97
97
 
98
- # 368 bits is the smallest possible key that will work with this, so
98
+ # 512 bits is the smallest possible key that will work with this, so
99
99
  # we use it for speed reasons
100
- def server_key(bits=368)
100
+ def server_key(bits=512)
101
101
  @server_key ||= OpenSSL::PKey::RSA.new(bits)
102
102
  end
103
103
 
@@ -378,6 +378,13 @@ module Transport
378
378
  next
379
379
  end
380
380
 
381
+ # JRuby Zlib implementation (1.4 & 1.5) does not have byte-to-byte compatibility with MRI's.
382
+ # skip these 80 or more tests under JRuby.
383
+ if defined?(JRUBY_VERSION)
384
+ puts "Skipping zlib tests for JRuby"
385
+ next
386
+ end
387
+
381
388
  hmacs.each do |hmac_name|
382
389
  [false, :standard].each do |compress|
383
390
  cipher_method_name = cipher_name.gsub(/\W/, "_")
@@ -114,12 +114,18 @@ module Transport
114
114
  end
115
115
 
116
116
  def test_compress_when_compression_is_enabled_should_return_compressed_text
117
- state.set :compression => :standard
117
+ state.set :compression => :standard
118
+ # JRuby Zlib implementation (1.4 & 1.5) does not have byte-to-byte compatibility with MRI's.
119
+ # skip this test under JRuby.
120
+ return if defined?(JRUBY_VERSION)
118
121
  assert_equal "x\234\312H\315\311\311WH-K-\252L\312O\251\004\000\000\000\377\377", state.compress("hello everybody")
119
122
  end
120
123
 
121
124
  def test_decompress_when_compression_is_enabled_should_return_decompressed_text
122
- state.set :compression => :standard
125
+ state.set :compression => :standard
126
+ # JRuby Zlib implementation (1.4 & 1.5) does not have byte-to-byte compatibility with MRI's.
127
+ # skip this test under JRuby.
128
+ return if defined?(JRUBY_VERSION)
123
129
  assert_equal "hello everybody", state.decompress("x\234\312H\315\311\311WH-K-\252L\312O\251\004\000\000\000\377\377")
124
130
  end
125
131
 
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.23
4
+ hash: 63
5
+ prerelease: false
6
+ segments:
7
+ - 2
8
+ - 0
9
+ - 24
10
+ version: 2.0.24
5
11
  platform: ruby
6
12
  authors:
7
13
  - Jamis Buck
@@ -10,7 +16,7 @@ autorequire:
10
16
  bindir: bin
11
17
  cert_chain: []
12
18
 
13
- date: 2010-06-03 00:00:00 -04:00
19
+ date: 2011-01-14 00:00:00 -05:00
14
20
  default_executable:
15
21
  dependencies: []
16
22
 
@@ -154,21 +160,27 @@ rdoc_options:
154
160
  require_paths:
155
161
  - lib
156
162
  required_ruby_version: !ruby/object:Gem::Requirement
163
+ none: false
157
164
  requirements:
158
165
  - - ">="
159
166
  - !ruby/object:Gem::Version
167
+ hash: 3
168
+ segments:
169
+ - 0
160
170
  version: "0"
161
- version:
162
171
  required_rubygems_version: !ruby/object:Gem::Requirement
172
+ none: false
163
173
  requirements:
164
174
  - - ">="
165
175
  - !ruby/object:Gem::Version
176
+ hash: 3
177
+ segments:
178
+ - 0
166
179
  version: "0"
167
- version:
168
180
  requirements: []
169
181
 
170
182
  rubyforge_project: net-ssh
171
- rubygems_version: 1.3.5
183
+ rubygems_version: 1.3.7
172
184
  signing_key:
173
185
  specification_version: 3
174
186
  summary: "Net::SSH: a pure-Ruby implementation of the SSH2 client protocol."