summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordelano <delano.mandelbaum@gmail.com>2013-02-06 05:55:40 -0800
committerdelano <delano.mandelbaum@gmail.com>2013-02-06 05:57:02 -0800
commitcd3ecfd4e8365ccb354072e10495490ec66b3d49 (patch)
tree452b225ed30e14110f89004df0299ccfc39d57eb
parent3dc2bffe7607d8df486a963e9ddb7cf22f51a1b5 (diff)
parent7f17d4104c782e19e2ce0a33ba4560ef9c0a0fde (diff)
downloadnet-ssh-cd3ecfd4e8365ccb354072e10495490ec66b3d49.tar.gz
add license information to gemspec [jordimassaguerpla]
-rw-r--r--CHANGES.txt5
-rw-r--r--README.rdoc27
-rw-r--r--Rakefile2
-rw-r--r--lib/net/ssh/test/local_packet.rb8
-rw-r--r--net-ssh.gemspec4
5 files changed, 34 insertions, 12 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 797869e..d42954e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,9 @@
+=== 2.6.4 / 06 Feb 2013
+
+* Added license info to gemspec [jordimassaguerpla]
+
+
=== 2.6.3 / 10 Jan 2013
* Small doc fix and correct error class for PKey::EC key type [Andreas Wolff]
diff --git a/README.rdoc b/README.rdoc
index f681d9b..54f0ce4 100644
--- a/README.rdoc
+++ b/README.rdoc
@@ -47,12 +47,12 @@ In a nutshell:
# "on_data" is called when the process writes something to stdout
ch.on_data do |c, data|
- $STDOUT.print data
+ $stdout.print data
end
# "on_extended_data" is called when the process writes something to stderr
ch.on_extended_data do |c, type, data|
- $STDERR.print data
+ $stderr.print data
end
ch.on_close { puts "done!" }
@@ -90,11 +90,24 @@ Lastly, if you want to run the tests or use any of the Rake tasks, you'll need:
NOTE: If you are running on jruby you need to install jruby-pageant manually (gemspec doesn't allow for platform specific dependencies).
+However, in order to be sure the code you're installing hasn't been tampered with, it's recommended that you verify the signiture[http://docs.rubygems.org/read/chapter/21]. To do this, you need to add my public key as a trusted certificate (you only need to do this once):
+
+ # Add the public key as a trusted certificate
+ # (You only need to do this once)
+ $ curl -O https://raw.github.com/net-ssh/net-ssh/master/gem-public_cert.pem
+ $ gem cert --add gem-public_cert.pem
+
+Then, when install the gem, do so with high security:
+
+ $ gem install net-ssh -P HighSecurity
+
+If you don't add the public key, you'll see an error like "Couldn't verify data signature". If you're still having trouble let me know and I'll give you a hand.
+
== RUBY 1.8 SUPPORT
net-ssh supports Ruby 1.8.x up until the 2.5.1 release. Later releases will work but the test suite is no longer guaranteed to pass all tests.
-== JRUBY 1.6
+== JRUBY 1.6
There is an issue with jruby-openssl that produces the following error in jruby 1.6:
@@ -111,7 +124,7 @@ from Karl Varga:
Ruby's OpenSSL bindings always return a key length of 16 for RC4 ciphers, which means that when we try to use ARCFOUR256 or higher, Net::SSH generates keys which are consistently too short - 16 bytes as opposed to 32 bytes - resulting in the following error:
OpenSSL::CipherError: key length too short
-
+
My patch simply instructs Net::SSH to build keys of the the proper length, regardless of the required key length reported by OpenSSL.
You should also be aware that your OpenSSL C libraries may also contain this bug. I've updated to 0.9.8k, but according to this thread[https://bugzilla.mindrot.org/show_bug.cgi?id=1291], the bug existed as recently as 0.9.8e! I've manually taken a look at my header files and they look ok, which is what makes me think it's a bug in the Ruby implementation.
@@ -120,17 +133,17 @@ To see your OpenSSL version:
$ openssl version
OpenSSL 0.9.8k 25 Mar 2009
-
+
After installing this gem, verify that Net::SSH is generating keys of the correct length by running the script <tt>support/arcfour_check.rb</tt>:
$ ruby arcfour_support.rb
-
+
which should produce the following:
arcfour128: [16, 8] OpenSSL::Cipher::Cipher
arcfour256: [32, 8] OpenSSL::Cipher::Cipher
arcfour512: [64, 8] OpenSSL::Cipher::Cipher
-
+
== RUNNING TESTS
diff --git a/Rakefile b/Rakefile
index 3a78e10..ebfa95f 100644
--- a/Rakefile
+++ b/Rakefile
@@ -32,6 +32,8 @@ begin
s.add_development_dependency 'test-unit'
s.add_development_dependency 'mocha'
+ s.license = "MIT"
+
s.signing_key = File.join('/mnt/gem/', 'gem-private_key.pem')
s.cert_chain = ['gem-public_cert.pem']
end
diff --git a/lib/net/ssh/test/local_packet.rb b/lib/net/ssh/test/local_packet.rb
index 3909d21..ac2e3d4 100644
--- a/lib/net/ssh/test/local_packet.rb
+++ b/lib/net/ssh/test/local_packet.rb
@@ -33,17 +33,17 @@ module Net; module SSH; module Test
type = packet.read_byte
raise "expected #{@type}, but got #{type}" if @type != type
- @data.zip(types).each do |expected, type|
- type ||= case expected
+ @data.zip(types).each do |expected, _type|
+ _type ||= case expected
when nil then break
when Numeric then :long
when String then :string
when TrueClass, FalseClass then :bool
end
- actual = packet.send("read_#{type}")
+ actual = packet.send("read_#{_type}")
next if expected.nil?
- raise "expected #{type} #{expected.inspect} but got #{actual.inspect}" unless expected == actual
+ raise "expected #{_type} #{expected.inspect} but got #{actual.inspect}" unless expected == actual
end
end
end
diff --git a/net-ssh.gemspec b/net-ssh.gemspec
index c545fa4..4ce99b1 100644
--- a/net-ssh.gemspec
+++ b/net-ssh.gemspec
@@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = "net-ssh"
- s.version = "2.6.3"
+ s.version = "2.6.4"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Jamis Buck", "Delano Mandelbaum"]
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
"Rakefile",
"Rudyfile",
"THANKS.txt",
+ "gem-public_cert.pem",
"lib/net/ssh.rb",
"lib/net/ssh/authentication/agent.rb",
"lib/net/ssh/authentication/agent/java_pageant.rb",
@@ -165,6 +166,7 @@ Gem::Specification.new do |s|
"test/transport/test_state.rb"
]
s.homepage = "https://github.com/net-ssh/net-ssh"
+ s.licenses = ["MIT"]
s.require_paths = ["lib"]
s.rubyforge_project = "net-ssh"
s.rubygems_version = "1.8.25"