jruby-openssl 0.1.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jruby-openssl might be problematic. Click here for more details.

@@ -1,3 +1,12 @@
1
+ == 0.2
2
+
3
+ - Enable remaining tests; fix a nil string issue in SSLSocket.sysread (JRUBY-1888)
4
+ - Fix socket buffering issue by setting socket IO sync = true
5
+ - Fix bad file descriptor issue caused by unnecessary close (JRUBY-2152)
6
+ - Fix AES key length (JRUBY-2187)
7
+ - Fix cipher initialization (JRUBY-1100)
8
+ - Now, only compatible with JRuby 1.1
9
+
1
10
  == 0.1.1
2
11
 
3
12
  - Fixed blocker issue preventing HTTPS/SSL from working (JRUBY-1222)
data/README.txt CHANGED
@@ -1,3 +1,9 @@
1
+ = JRuby-OpenSSL
2
+
3
+ * http://jruby-extras.rubyforge.org/jruby-openssl
4
+
5
+ == DESCRIPTION:
6
+
1
7
  JRuby-OpenSSL is an add-on gem for JRuby that emulates the Ruby OpenSSL native library.
2
8
 
3
9
  JRuby offers *just enough* compatibility for most Ruby applications that use OpenSSL.
Binary file
@@ -1,5 +1,5 @@
1
1
  module Jopenssl
2
2
  module Version
3
- VERSION = "0.1.1"
3
+ VERSION = "0.2"
4
4
  end
5
5
  end
@@ -28,8 +28,19 @@ def make_key(pem)
28
28
  end
29
29
  end
30
30
 
31
+ if $DEBUG
32
+ def log(s); File.open("ssl-server-debug", "a") {|f| f.puts s}; end
33
+ File.open("ssl-server-debug", "w") {|f| f << ""}
34
+ log "server starting"
35
+ else
36
+ def log(s) end
37
+ end
38
+
39
+ begin
31
40
  ca_cert = OpenSSL::X509::Certificate.new(get_pem)
41
+ log "got ca cert #{ca_cert.inspect}"
32
42
  ssl_cert = OpenSSL::X509::Certificate.new(get_pem)
43
+ log "got ssl cert #{ssl_cert.inspect}"
33
44
  ssl_key = make_key(get_pem)
34
45
  port = Integer(ARGV.shift)
35
46
  verify_mode = Integer(ARGV.shift)
@@ -49,6 +60,7 @@ Socket.do_not_reverse_lookup = true
49
60
  tcps = nil
50
61
  100.times{|i|
51
62
  begin
63
+ log "starting server on #{port+i}"
52
64
  tcps = TCPServer.new("0.0.0.0", port+i)
53
65
  port = port + i
54
66
  break
@@ -56,9 +68,11 @@ tcps = nil
56
68
  next
57
69
  end
58
70
  }
71
+ log "starting ssl server"
59
72
  ssls = OpenSSL::SSL::SSLServer.new(tcps, ctx)
60
73
  ssls.start_immediately = start_immediately
61
74
 
75
+ log("sending pid #{Process.pid}")
62
76
  $stdout.sync = true
63
77
  $stdout.puts Process.pid
64
78
  $stdout.puts port
@@ -79,3 +93,7 @@ loop do
79
93
  ssl.close
80
94
  }
81
95
  end
96
+ rescue
97
+ log $!
98
+ log $!.backtrace.join("\n")
99
+ end
@@ -74,6 +74,7 @@ class OpenSSL::TestSSL < Test::Unit::TestCase
74
74
  jruby_oop {
75
75
  begin
76
76
  cmd = [RUBY]
77
+ cmd << "-Ilib"
77
78
  cmd << "-d" if $DEBUG
78
79
  cmd << SSL_SERVER << port0.to_s << verify_mode.to_s
79
80
  cmd << (start_immediately ? "yes" : "no")
@@ -81,15 +82,21 @@ class OpenSSL::TestSSL < Test::Unit::TestCase
81
82
  server.write(@ca_cert.to_pem)
82
83
  server.write(@svr_cert.to_pem)
83
84
  server.write(@svr_key.to_pem)
84
- pid = Integer(server.gets)
85
+ $stderr.puts "sent certs to server" if $DEBUG
86
+ str = server.gets
87
+ $stderr.puts "got pid from server: #{str}" if $DEBUG
88
+ pid = Integer(str)
85
89
  if port = server.gets
86
90
  if $DEBUG
87
91
  $stderr.printf("%s started: pid=%d port=%d\n", SSL_SERVER, pid, port)
88
92
  end
89
93
  block.call(server, port.to_i)
90
94
  end
95
+ rescue => e
96
+ puts e, *(e.backtrace)
91
97
  ensure
92
98
  if server
99
+ $stderr.puts "killing: #{pid}" if $DEBUG
93
100
  Process.kill(:KILL, pid)
94
101
  server.close
95
102
  end
@@ -6,13 +6,13 @@ begin
6
6
  require 'openssl/test_digest'
7
7
  require 'openssl/test_hmac'
8
8
  require 'openssl/test_ns_spki'
9
- # require 'openssl/test_pair'
9
+ require 'openssl/test_pair'
10
10
  require 'openssl/test_pkey_rsa'
11
11
  require 'openssl/test_ssl'
12
12
  require 'openssl/test_x509cert'
13
13
  require 'openssl/test_x509crl'
14
- require 'openssl/test_x509name'
15
14
  require 'openssl/test_x509ext'
15
+ require 'openssl/test_x509name'
16
16
  require 'openssl/test_x509req'
17
17
  require 'openssl/test_x509store'
18
18
  rescue Exception => e
metadata CHANGED
@@ -1,33 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: jruby-openssl
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.1.1
7
- date: 2008-01-06 00:00:00 -06:00
8
- summary: OpenSSL add-on for JRuby
9
- require_paths:
10
- - lib
11
- email: ola.bini@gmail.com
12
- homepage: http://jruby-extras.rubyforge.org/jopenssl
13
- rubyforge_project: jruby-extras
14
- description: JRuby-OpenSSL is an add-on gem for JRuby that emulates the Ruby OpenSSL native library.
15
- autorequire:
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
4
+ version: "0.2"
25
5
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
6
  authors:
30
7
  - Ola Bini and JRuby contributors
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-03-19 00:00:00 -05:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: = JRuby-OpenSSL
17
+ email: ola.bini@gmail.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - History.txt
24
+ - README.txt
25
+ - License.txt
31
26
  files:
32
27
  - History.txt
33
28
  - README.txt
@@ -66,20 +61,32 @@ files:
66
61
  - test/openssl/utils.rb
67
62
  - test/test_openssl.rb
68
63
  - test/ut_eof.rb
69
- test_files:
70
- - test/test_openssl.rb
64
+ has_rdoc: true
65
+ homepage: http://jruby-extras.rubyforge.org/jopenssl
66
+ post_install_message:
71
67
  rdoc_options:
72
68
  - --main
73
69
  - README.txt
74
- extra_rdoc_files:
75
- - History.txt
76
- - README.txt
77
- - License.txt
78
- executables: []
79
-
80
- extensions: []
81
-
70
+ require_paths:
71
+ - lib
72
+ required_ruby_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: "0"
77
+ version:
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: "0"
83
+ version:
82
84
  requirements: []
83
85
 
84
- dependencies: []
85
-
86
+ rubyforge_project: jruby-extras
87
+ rubygems_version: 1.0.1
88
+ signing_key:
89
+ specification_version: 2
90
+ summary: OpenSSL add-on for JRuby
91
+ test_files:
92
+ - test/test_openssl.rb