jruby-openssl 0.4 → 0.5

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.

Potentially problematic release.


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

data/History.txt CHANGED
@@ -1,3 +1,12 @@
1
+ == 0.5
2
+
3
+ * Fixed JRUBY-3614: Unsupported HMAC algorithm (HMACSHA-256)
4
+ * Fixed JRUBY-3570: ActiveMerchant's AuthorizeNet Gateway throws OpenSSL Cert Validation Error, when there should be no error
5
+ * Fixed JRUBY-3557 Class cast exception in PKeyRSA.java
6
+ * Fixed JRUBY-3468 X.509 certificates: subjectKeyIdentifier corrupted
7
+ * Fixed JRUBY-3285 Unsupported HMAC algorithm (HMACSHA1) error when generating digest
8
+ * Misc code cleanup
9
+
1
10
  == 0.2
2
11
 
3
12
  - Enable remaining tests; fix a nil string issue in SSLSocket.sysread (JRUBY-1888)
@@ -22,4 +31,4 @@
22
31
 
23
32
  == 0.0.5 and prior
24
33
 
25
- - Initial versions with maintenance updates
34
+ - Initial versions with maintenance updates
data/lib/jopenssl.jar CHANGED
Binary file
@@ -1,5 +1,5 @@
1
1
  module Jopenssl
2
2
  module Version
3
- VERSION = "0.4"
3
+ VERSION = "0.5"
4
4
  end
5
5
  end
data/lib/openssl/ssl.rb CHANGED
@@ -53,7 +53,7 @@ module OpenSSL
53
53
  module Nonblock
54
54
  def initialize(*args)
55
55
  flag = File::NONBLOCK
56
- flag |= @io.fcntl(Fcntl::F_GETFL) if defined?(Fcntl::F_GETFL)
56
+ flag |= @io.fcntl(Fcntl::F_GETFL, nil) if defined?(Fcntl::F_GETFL)
57
57
  @io.fcntl(Fcntl::F_SETFL, flag)
58
58
  super
59
59
  end
@@ -29,6 +29,16 @@ class OpenSSL::TestHMAC < Test::Unit::TestCase
29
29
  h = @h1.dup
30
30
  assert_equal(@h1.digest, h.digest, "dup digest")
31
31
  end
32
+
33
+ def test_sha256
34
+ digest256 = OpenSSL::Digest::Digest.new("sha256")
35
+ assert_equal(
36
+ "\210\236-\3270\331Yq\265\177sE\266\231hXa\332\250\026\235O&c*\307\001\227~\260n\362",
37
+ OpenSSL::HMAC.digest(digest256, 'blah', "blah"))
38
+ assert_equal(
39
+ "889e2dd730d95971b57f7345b699685861daa8169d4f26632ac701977eb06ef2",
40
+ OpenSSL::HMAC.hexdigest(digest256, 'blah', "blah"))
41
+ end
32
42
  end
33
43
 
34
44
  end
@@ -0,0 +1,34 @@
1
+ require 'openssl'
2
+ require 'test/unit'
3
+
4
+ # JRUBY-3468
5
+ class TestOpensslX509 < Test::Unit::TestCase
6
+ def test_jruby3468
7
+ pem_cert = <<END
8
+ -----BEGIN CERTIFICATE-----
9
+ MIIC/jCCAmegAwIBAgIBATANBgkqhkiG9w0BAQUFADBNMQswCQYDVQQGEwJKUDER
10
+ MA8GA1UECgwIY3Rvci5vcmcxFDASBgNVBAsMC0RldmVsb3BtZW50MRUwEwYDVQQD
11
+ DAxodHRwLWFjY2VzczIwHhcNMDcwOTExMTM1ODMxWhcNMDkwOTEwMTM1ODMxWjBN
12
+ MQswCQYDVQQGEwJKUDERMA8GA1UECgwIY3Rvci5vcmcxFDASBgNVBAsMC0RldmVs
13
+ b3BtZW50MRUwEwYDVQQDDAxodHRwLWFjY2VzczIwgZ8wDQYJKoZIhvcNAQEBBQAD
14
+ gY0AMIGJAoGBALi66ujWtUCQm5HpMSyr/AAIFYVXC/dmn7C8TR/HMiUuW3waY4uX
15
+ LFqCDAGOX4gf177pX+b99t3mpaiAjJuqc858D9xEECzhDWgXdLbhRqWhUOble4RY
16
+ c1yWYC990IgXJDMKx7VAuZ3cBhdBxtlE9sb1ZCzmHQsvTy/OoRzcJCrTAgMBAAGj
17
+ ge0wgeowDwYDVR0TAQH/BAUwAwEB/zAxBglghkgBhvhCAQ0EJBYiUnVieS9PcGVu
18
+ U1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQUJNE0GGaRKmN2qhnO
19
+ FyBWVl4Qj6owDgYDVR0PAQH/BAQDAgEGMHUGA1UdIwRuMGyAFCTRNBhmkSpjdqoZ
20
+ zhcgVlZeEI+qoVGkTzBNMQswCQYDVQQGEwJKUDERMA8GA1UECgwIY3Rvci5vcmcx
21
+ FDASBgNVBAsMC0RldmVsb3BtZW50MRUwEwYDVQQDDAxodHRwLWFjY2VzczKCAQEw
22
+ DQYJKoZIhvcNAQEFBQADgYEAH11tstSUuqFpMqoh/vM5l3Nqb8ygblbqEYQs/iG/
23
+ UeQkOZk/P1TxB6Ozn2htJ1srqDpUsncFVZ/ecP19GkeOZ6BmIhppcHhE5WyLBcPX
24
+ It5q1BW0PiAzT9LlEGoaiW0nw39so0Pr1whJDfc1t4fjdk+kSiMIzRHbTDvHWfpV
25
+ nTA=
26
+ -----END CERTIFICATE-----
27
+ END
28
+
29
+ cert = OpenSSL::X509::Certificate.new(pem_cert)
30
+ key_id = cert.extensions[2]
31
+
32
+ assert_equal "24:D1:34:18:66:91:2A:63:76:AA:19:CE:17:20:56:56:5E:10:8F:AA", key_id.value
33
+ end
34
+ end
metadata CHANGED
@@ -5,9 +5,9 @@ homepage: http://jruby-extras.rubyforge.org/jruby-openssl
5
5
  executables: []
6
6
 
7
7
  version: !ruby/object:Gem::Version
8
- version: "0.4"
8
+ version: "0.5"
9
9
  post_install_message:
10
- date: 2009-03-16 05:00:00 +00:00
10
+ date: 2009-05-12 05:00:00 +00:00
11
11
  files:
12
12
  - History.txt
13
13
  - README.txt
@@ -15,8 +15,6 @@ files:
15
15
  - lib/jopenssl.jar
16
16
  - lib/bcmail-jdk14-139.jar
17
17
  - lib/bcprov-jdk14-139.jar
18
- - lib/jopenssl
19
- - lib/openssl
20
18
  - lib/openssl.rb
21
19
  - lib/jopenssl/version.rb
22
20
  - lib/openssl/bn.rb
@@ -27,12 +25,9 @@ files:
27
25
  - lib/openssl/dummyssl.rb
28
26
  - lib/openssl/ssl.rb
29
27
  - lib/openssl/x509.rb
30
- - test/fixture
31
- - test/openssl
32
28
  - test/pkcs7_mime_enveloped.message
33
29
  - test/pkcs7_mime_signed.message
34
30
  - test/pkcs7_multipart_signed.message
35
- - test/ref
36
31
  - test/test_cipher.rb
37
32
  - test/test_integration.rb
38
33
  - test/test_java.rb
@@ -42,6 +37,7 @@ files:
42
37
  - test/test_java_pkcs7.rb
43
38
  - test/test_java_smime.rb
44
39
  - test/test_openssl.rb
40
+ - test/test_openssl_x509.rb
45
41
  - test/test_pkey.rb
46
42
  - test/ut_eof.rb
47
43
  - test/fixture/cacert.pem
@@ -68,7 +64,7 @@ files:
68
64
  - test/ref/compile.rb
69
65
  - test/ref/pkcs1
70
66
  - test/ref/pkcs1.c
71
- rubygems_version: 1.3.1
67
+ rubygems_version: 1.3.3
72
68
  rdoc_options:
73
69
  - --main
74
70
  - README.txt
@@ -81,6 +77,8 @@ platform: ruby
81
77
  summary: OpenSSL add-on for JRuby
82
78
  default_executable:
83
79
  bindir: bin
80
+ licenses: []
81
+
84
82
  required_rubygems_version: !ruby/object:Gem::Requirement
85
83
  version:
86
84
  requirements:
@@ -95,7 +93,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
93
  version: "0"
96
94
  require_paths:
97
95
  - lib
98
- specification_version: 2
96
+ specification_version: 3
99
97
  test_files:
100
98
  - test/test_cipher.rb
101
99
  - test/test_integration.rb
@@ -106,6 +104,7 @@ test_files:
106
104
  - test/test_java_pkcs7.rb
107
105
  - test/test_java_smime.rb
108
106
  - test/test_openssl.rb
107
+ - test/test_openssl_x509.rb
109
108
  - test/test_pkey.rb
110
109
  dependencies: []
111
110