jruby-openssl 0.8.2 → 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
data/License.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  JRuby-OpenSSL is distributed under the same license as JRuby (http://www.jruby.org/).
2
2
 
3
- Version: CPL 1.0/GPL 2.0/LGPL 2.1
3
+ Version: EPL 1.0/GPL 2.0/LGPL 2.1
4
4
 
5
5
  The contents of this file are subject to the Common Public
6
6
  License Version 1.0 (the "License"); you may not use this file
@@ -20,11 +20,11 @@ or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
20
20
  in which case the provisions of the GPL or the LGPL are applicable instead
21
21
  of those above. If you wish to allow use of your version of this file only
22
22
  under the terms of either the GPL or the LGPL, and not to allow others to
23
- use your version of this file under the terms of the CPL, indicate your
23
+ use your version of this file under the terms of the EPL, indicate your
24
24
  decision by deleting the provisions above and replace them with the notice
25
25
  and other provisions required by the GPL or the LGPL. If you do not delete
26
26
  the provisions above, a recipient may use your version of this file under
27
- the terms of any one of the CPL, the GPL or the LGPL.
27
+ the terms of any one of the EPL, the GPL or the LGPL.
28
28
 
29
29
  JRuby-OpenSSL includes software by the Legion of the Bouncy Castle
30
30
  (http://bouncycastle.org/license.html).
data/Rakefile CHANGED
@@ -1,8 +1,11 @@
1
1
  require 'rake'
2
2
  require 'rake/testtask'
3
+ load File.dirname(__FILE__) + "/lib/shared/jopenssl/version.rb"
3
4
 
4
- MANIFEST = FileList["Rakefile", "History.txt", "Manifest.txt", "README.txt", "License.txt", "lib/shared/jopenssl.jar", "lib/**/*", "test/**/*"]
5
- BC_JARS = FileList["../../build_lib/bc*.jar"]
5
+ BC_JARS = FileList["../../build_lib/bc*.jar"]
6
+ JOPENSSL_JAR = 'lib/shared/jopenssl.jar'
7
+ GEM_FILE = "pkg/jruby-openssl-#{Jopenssl::Version::VERSION}.gem"
8
+ GEM_SPEC_FILE = 'jruby-openssl.gemspec'
6
9
 
7
10
  task :default => [:java_compile, :test]
8
11
 
@@ -21,8 +24,8 @@ def java_classpath_arg # myriad of ways to discover JRuby classpath
21
24
  jruby_cpath ? "-cp \"#{jruby_cpath.gsub('\\', '/')}#{File::PATH_SEPARATOR}#{bc_jars}\"" : "-cp \"#{bc_jars}\""
22
25
  end
23
26
 
24
- desc "Compile the native Java code."
25
- task :java_compile do
27
+ desc "Compile the native Java code and create the jopenssl jar file."
28
+ task file JOPENSSL_JAR do
26
29
  mkdir_p "pkg/classes"
27
30
 
28
31
  File.open("pkg/compile_options", "w") do |f|
@@ -38,51 +41,18 @@ task :java_compile do
38
41
  end
39
42
 
40
43
  sh "javac @pkg/compile_options @pkg/compile_classpath @pkg/compile_sourcefiles"
41
- sh "jar cf ../../lib/ruby/shared/jopenssl.jar -C pkg/classes/ ."
44
+ sh "jar cf #{JOPENSSL_JAR} -C pkg/classes/ ."
45
+ FileUtils.cp JOPENSSL_JAR, '../../lib/ruby/shared/jopenssl.jar'
42
46
  end
43
- file "lib/shared/jopenssl.jar" => :java_compile
44
47
 
45
48
  task :more_clean do
46
- rm_f FileList['lib/shared/jopenssl.jar']
49
+ rm_f FileList[JOPENSSL_JAR]
47
50
  end
48
51
  task :clean => :more_clean
49
52
 
50
- File.open("Manifest.txt", "w") {|f| MANIFEST.each {|n| f.puts n } }
51
-
52
- begin
53
- # easiest way to configure ruby_flags for Hoe.
54
- ENV['RUBY_FLAGS'] ||= [
55
- (RUBY_VERSION >= '1.9.0' ? '--1.9' : '--1.8'),
56
- '-w',
57
- '-I../../build_lib:lib/shared:lib:test',
58
- '-J-ea',
59
- ENV['RUBY_DEBUG']
60
- ].compact.join(' ')
61
- require 'hoe'
62
- Hoe.plugin :gemcutter
63
- hoe = Hoe.spec("jruby-openssl") do |p|
64
- load File.dirname(__FILE__) + "/lib/shared/jopenssl/version.rb"
65
- p.version = Jopenssl::Version::VERSION
66
- p.rubyforge_name = "jruby-extras"
67
- p.urls = ["https://github.com/jruby/jruby-ossl"]
68
- p.author = "Ola Bini and JRuby contributors"
69
- p.email = "ola.bini@gmail.com"
70
- p.summary = "OpenSSL add-on for JRuby"
71
- p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
72
- p.description = p.paragraphs_of('README.txt', 3...4).join("\n\n")
73
- p.test_globs = ENV["TEST"] || ["test/test_all.rb"]
74
- p.extra_deps << ['bouncy-castle-java', '>= 1.5.0146.1']
75
- end
76
- hoe.spec.dependencies.delete_if { |dep| dep.name == "hoe" }
77
- # Either lib/1.8 or lib/1.9 is added to $LOAD_PATH dynamically.
78
- hoe.spec.require_paths = ['lib/shared']
79
-
80
- task :gemspec do
81
- File.open("#{hoe.name}.gemspec", "w") {|f| f << hoe.spec.to_ruby }
82
- end
83
- task :package => :gemspec
84
- rescue LoadError
85
- puts "You really need Hoe installed to be able to package this gem"
86
- rescue => e
87
- puts "ignoring error while loading hoe: #{e.to_s}"
53
+ file GEM_FILE => [GEM_SPEC_FILE, JOPENSSL_JAR] do
54
+ puts "Generating #{GEM_FILE}"
55
+ `gem build #{GEM_SPEC_FILE}`
56
+ FileUtils.mv "jruby-openssl-#{Jopenssl::Version::VERSION}.gem", GEM_FILE
88
57
  end
58
+ task :package => GEM_FILE
@@ -0,0 +1,23 @@
1
+ TODO for 1.9 support
2
+
3
+ * Implement some mehotds properly
4
+ * ASN1 (fix lots of failing tests)
5
+ * OpenSSL::ASN1::ObjectId.new for SHA-2 ids such as SHA224
6
+ * X509Name#cmp
7
+ * ASN.1 handling
8
+
9
+ * Implement some methods
10
+ * PKey.read
11
+ * PKey::DH#public_key
12
+ * SSLSocket#sysread_nonblock
13
+ * SSLSocket#syswrite_nonblock
14
+ * OCSP
15
+ * config file
16
+ * SSLSocket#client_ca - can we get CertificateRequest* in ServerHello?
17
+ * SSL::Session - can we?
18
+ * @crlDisPts of tX509Extension
19
+
20
+ * Fixes needed for JRuby
21
+ * Implement BasicSocket#connect_address for test_pair.rb
22
+ * Stop Socket#accept by Socket#shutdown, not by Socket#close
23
+ * busy loop for SSLSocket#read_nonblock (and revert net/protocol.rb)
@@ -1,5 +1,5 @@
1
1
  module Jopenssl
2
2
  module Version
3
- VERSION = "0.8.2"
3
+ VERSION = "0.8.4"
4
4
  end
5
5
  end
@@ -385,8 +385,8 @@ module PKCS7Test
385
385
 
386
386
  def create_signer_info_with_algo(algo)
387
387
  md5 = AlgorithmIdentifier.new(ASN1Registry.nid2obj(4))
388
- SignerInfoWithPkey.new(DERInteger.new(BigInteger::ONE),
389
- IssuerAndSerialNumber.new(X509Name.new("C=SE"), DERInteger.new(BigInteger::ONE)),
388
+ SignerInfoWithPkey.new(ASN1Integer.new(BigInteger::ONE),
389
+ IssuerAndSerialNumber.new(X500Name.new("C=SE"), BigInteger::ONE),
390
390
  algo,
391
391
  DERSet.new,
392
392
  md5,
data/test/test_java.rb CHANGED
@@ -44,10 +44,10 @@ if defined?(JRUBY_VERSION)
44
44
  BigInteger = java.math.BigInteger unless defined?(BigInteger)
45
45
  Cipher = javax.crypto.Cipher unless defined?(Cipher)
46
46
 
47
- DERInteger = org.bouncycastle.asn1.DERInteger
47
+ ASN1Integer = org.bouncycastle.asn1.ASN1Integer
48
48
  DERSet = org.bouncycastle.asn1.DERSet
49
49
  DEROctetString = org.bouncycastle.asn1.DEROctetString
50
- X509Name = org.bouncycastle.asn1.x509.X509Name
50
+ X500Name = org.bouncycastle.asn1.x500.X500Name
51
51
 
52
52
 
53
53
  MimeEnvelopedString = File::read(File.join(File.dirname(__FILE__), 'java', 'pkcs7_mime_enveloped.message'))
metadata CHANGED
@@ -2,14 +2,15 @@
2
2
  name: jruby-openssl
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.8.2
5
+ version: 0.8.4
6
6
  platform: ruby
7
7
  authors:
8
- - Ola Bini and JRuby contributors
8
+ - Ola Bini
9
+ - JRuby contributors
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2012-12-11 00:00:00.000000000 Z
13
+ date: 2013-03-10 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: bouncy-castle-java
@@ -17,48 +18,27 @@ dependencies:
17
18
  requirements:
18
19
  - - ">="
19
20
  - !ruby/object:Gem::Version
20
- version: 1.5.0146.1
21
+ version: 1.5.0147
21
22
  none: false
22
23
  requirement: !ruby/object:Gem::Requirement
23
24
  requirements:
24
25
  - - ">="
25
26
  - !ruby/object:Gem::Version
26
- version: 1.5.0146.1
27
+ version: 1.5.0147
27
28
  none: false
28
29
  prerelease: false
29
30
  type: :runtime
30
- - !ruby/object:Gem::Dependency
31
- name: rdoc
32
- version_requirements: !ruby/object:Gem::Requirement
33
- requirements:
34
- - - "~>"
35
- - !ruby/object:Gem::Version
36
- version: '3.10'
37
- none: false
38
- requirement: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - "~>"
41
- - !ruby/object:Gem::Version
42
- version: '3.10'
43
- none: false
44
- prerelease: false
45
- type: :development
46
31
  description: JRuby-OpenSSL is an add-on gem for JRuby that emulates the Ruby OpenSSL native library.
47
32
  email: ola.bini@gmail.com
48
33
  executables: []
49
34
  extensions: []
50
- extra_rdoc_files:
51
- - History.txt
52
- - Manifest.txt
53
- - README.txt
54
- - License.txt
35
+ extra_rdoc_files: []
55
36
  files:
56
- - Rakefile
57
37
  - History.txt
58
- - Manifest.txt
59
- - README.txt
60
38
  - License.txt
61
- - lib/shared/jopenssl.jar
39
+ - README.txt
40
+ - Rakefile
41
+ - TODO-1_9-support.txt
62
42
  - lib/1.8/openssl.rb
63
43
  - lib/1.8/openssl/bn.rb
64
44
  - lib/1.8/openssl/buffering.rb
@@ -80,7 +60,6 @@ files:
80
60
  - lib/1.9/openssl/ssl.rb
81
61
  - lib/1.9/openssl/x509-internal.rb
82
62
  - lib/1.9/openssl/x509.rb
83
- - lib/ruby/shared/jopenssl.jar
84
63
  - lib/shared/jruby-openssl.rb
85
64
  - lib/shared/openssl.rb
86
65
  - lib/shared/jopenssl/version.rb
@@ -95,13 +74,10 @@ files:
95
74
  - test/java/test_java_mime.rb
96
75
  - test/java/test_java_pkcs7.rb
97
76
  - test/java/test_java_smime.rb
98
- - ".gemtest"
99
- homepage: https://github.com/jruby/jruby-ossl
77
+ homepage: https://github.com/jruby/jruby
100
78
  licenses: []
101
79
  post_install_message:
102
- rdoc_options:
103
- - "--main"
104
- - README.txt
80
+ rdoc_options: []
105
81
  require_paths:
106
82
  - lib/shared
107
83
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -119,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
95
  MA==
120
96
  none: false
121
97
  requirements: []
122
- rubyforge_project: jruby-extras
98
+ rubyforge_project: jruby/jruby
123
99
  rubygems_version: 1.8.24
124
100
  signing_key:
125
101
  specification_version: 3
data/.gemtest DELETED
File without changes
data/Manifest.txt DELETED
@@ -1,53 +0,0 @@
1
- Rakefile
2
- History.txt
3
- Manifest.txt
4
- README.txt
5
- License.txt
6
- lib/shared/jopenssl.jar
7
- lib/1.8
8
- lib/1.9
9
- lib/ruby
10
- lib/shared
11
- lib/1.8/openssl
12
- lib/1.8/openssl.rb
13
- lib/1.8/openssl/bn.rb
14
- lib/1.8/openssl/buffering.rb
15
- lib/1.8/openssl/cipher.rb
16
- lib/1.8/openssl/config.rb
17
- lib/1.8/openssl/digest.rb
18
- lib/1.8/openssl/pkcs7.rb
19
- lib/1.8/openssl/ssl-internal.rb
20
- lib/1.8/openssl/ssl.rb
21
- lib/1.8/openssl/x509-internal.rb
22
- lib/1.8/openssl/x509.rb
23
- lib/1.9/openssl
24
- lib/1.9/openssl.rb
25
- lib/1.9/openssl/bn.rb
26
- lib/1.9/openssl/buffering.rb
27
- lib/1.9/openssl/cipher.rb
28
- lib/1.9/openssl/config.rb
29
- lib/1.9/openssl/digest.rb
30
- lib/1.9/openssl/ssl-internal.rb
31
- lib/1.9/openssl/ssl.rb
32
- lib/1.9/openssl/x509-internal.rb
33
- lib/1.9/openssl/x509.rb
34
- lib/ruby/shared
35
- lib/ruby/shared/jopenssl.jar
36
- lib/shared/jopenssl
37
- lib/shared/jopenssl.jar
38
- lib/shared/jruby-openssl.rb
39
- lib/shared/openssl
40
- lib/shared/openssl.rb
41
- lib/shared/jopenssl/version.rb
42
- lib/shared/openssl/pkcs12.rb
43
- test/java
44
- test/test_java.rb
45
- test/ut_eof.rb
46
- test/java/pkcs7_mime_enveloped.message
47
- test/java/pkcs7_mime_signed.message
48
- test/java/pkcs7_multipart_signed.message
49
- test/java/test_java_attribute.rb
50
- test/java/test_java_bio.rb
51
- test/java/test_java_mime.rb
52
- test/java/test_java_pkcs7.rb
53
- test/java/test_java_smime.rb
Binary file
Binary file