Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby-openssl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: af07873c74c1
Choose a base ref
...
head repository: jruby/jruby-openssl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 68bc5cb4c450
Choose a head ref
  • 8 commits
  • 7 files changed
  • 1 contributor

Commits on Jan 11, 2016

  1. Copy the full SHA
    bf459cc View commit details
  2. Copy the full SHA
    a3572ec View commit details
  3. Copy the full SHA
    ef7a170 View commit details
  4. Copy the full SHA
    34ca695 View commit details
  5. Copy the full SHA
    07f40b4 View commit details
  6. prepare for 0.9.14

    kares committed Jan 11, 2016
    Copy the full SHA
    0f4f501 View commit details

Commits on Jan 12, 2016

  1. Copy the full SHA
    642ed1f View commit details
  2. update for next dev snapshot

    kares committed Jan 12, 2016
    Copy the full SHA
    68bc5cb View commit details
Showing with 45 additions and 29 deletions.
  1. +2 −0 .travis.yml
  2. +10 −0 History.md
  3. +4 −2 Mavenfile
  4. +3 −3 README.md
  5. +2 −2 lib/jopenssl/version.rb
  6. +19 −19 pom.xml
  7. +5 −3 src/test/ruby/pkcs7/test_pkcs7.rb
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -12,6 +12,8 @@ env:
- TEST_PROFILE=test-1.7.13
- TEST_PROFILE=test-1.7.18
- TEST_PROFILE=test-1.7.22
# fails just like 1.7.22 :
#- TEST_PROFILE=test-1.7.23
- TEST_PROFILE=test-9.0.1.0
- TEST_PROFILE=test-9.0.4.0

10 changes: 10 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 0.9.14

* upgrade to using BC **1.54** as default (all versions >= 1.49 are supported)
for Bouncy-Castle release notes see http://bouncycastle.org/releasenotes.html
* basic support for prompting for PEM password (working for RSA/DSA priv.key)
* avoid NPE due version field in X509Cert - make sure it's treated as 0 (#78)
and fix settting ceritificate.serial = number
* default WairReadable/Writable backtraces to JRuby's -Xerrno.backtrace
* use hardcoded jks type for loading cacerts - for Java 9 compatibility (#79)

## 0.9.13

JRuby-OpenSSL is the first release that aims to be Ruby **2.3** compatible.
6 changes: 4 additions & 2 deletions Mavenfile
Original file line number Diff line number Diff line change
@@ -100,7 +100,7 @@ plugin :deploy, '2.8.1' do
execute_goals( :deploy, :skip => false )
end

supported_bc_versions = %w{ 1.47 1.48 1.49 1.50 1.51 }
supported_bc_versions = %w{ 1.49 1.50 1.51 1.52 1.53 1.54 }

default_bc_version = File.read('lib/jopenssl/version.rb')[/BOUNCY_CASTLE_VERSION\s?=\s?'(.*?)'/, 1]

@@ -156,7 +156,9 @@ profile :id => 'test-1.7.4' do
'bc.versions' => supported_bc_versions.join(',')
end

%w{ 1.7.13 1.7.15 1.7.16 1.7.18 1.7.20 1.7.21 1.7.22 }.each { |version|
jruby_1_7_versions = %w{ 1.7.13 1.7.15 1.7.16 1.7.18 1.7.20 1.7.22 1.7.23 }

jruby_1_7_versions.each { |version|

profile :id => "test-#{version}" do
plugin :invoker, '1.8' do
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -10,11 +10,11 @@ the JRuby [mailing list][1] or the [bug tracker][2].

## Compatibility

Since version **0.9.5** jruby-openssl aims to be compatible with all JRuby versions
Since version **0.9.6** jruby-openssl aims to be compatible with all JRuby versions
**>= 1.6.8** (including 1.7 and 9k), if it's not we consider that a bug, report.

We currently (for 0.9.x) require the Bouncy Castle Java APIs to be **>= 1.47**,
for JRuby-OpenSSL gem <= 0.9.6 you also need to make sure BC jars **<= 1.50** !
We currently (for 0.9.x) require the Bouncy Castle Java APIs to be **>= 1.49**,
for JRuby-OpenSSL **gem <= 0.9.6** you also need to make sure BC jars <= 1.50 !

## Testing

4 changes: 2 additions & 2 deletions lib/jopenssl/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Jopenssl
VERSION = '0.9.14.dev'
BOUNCY_CASTLE_VERSION = '1.50'
VERSION = '0.9.15.dev'
BOUNCY_CASTLE_VERSION = '1.54'
# @deprecated
module Version
# @private
38 changes: 19 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ DO NOT MODIFIY - GENERATED CODE
<modelVersion>4.0.0</modelVersion>
<groupId>rubygems</groupId>
<artifactId>jruby-openssl</artifactId>
<version>0.9.14.dev-SNAPSHOT</version>
<version>0.9.14</version>
<packaging>gem</packaging>
<name>JRuby OpenSSL</name>
<description>JRuby-OpenSSL is an add-on gem for JRuby that emulates the Ruby OpenSSL native library.</description>
@@ -57,7 +57,7 @@ DO NOT MODIFIY - GENERATED CODE
</snapshotRepository>
</distributionManagement>
<properties>
<bc.versions>1.50</bc.versions>
<bc.versions>1.54</bc.versions>
<jruby.plugins.version>1.0.10</jruby.plugins.version>
<invoker.skip>${maven.test.skip}</invoker.skip>
<jruby.version>1.7.18</jruby.version>
@@ -94,12 +94,12 @@ DO NOT MODIFIY - GENERATED CODE
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.50</version>
<version>1.54</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.50</version>
<version>1.54</version>
</dependency>
<dependency>
<groupId>org.jruby</groupId>
@@ -406,7 +406,7 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
<bc.versions>1.47,1.48,1.49,1.50,1.51</bc.versions>
<bc.versions>1.49,1.50,1.51,1.52,1.53,1.54</bc.versions>
<jruby.modes>1.8,1.9</jruby.modes>
<jruby.versions>1.6.8</jruby.versions>
</properties>
@@ -444,7 +444,7 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
<bc.versions>1.47,1.48,1.49,1.50,1.51</bc.versions>
<bc.versions>1.49,1.50,1.51,1.52,1.53,1.54</bc.versions>
<jruby.modes>1.8,1.9</jruby.modes>
<jruby.versions>1.7.4</jruby.versions>
</properties>
@@ -482,7 +482,7 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
<bc.versions>1.47,1.48,1.49,1.50,1.51</bc.versions>
<bc.versions>1.49,1.50,1.51,1.52,1.53,1.54</bc.versions>
<jruby.modes>1.8,1.9,2.0</jruby.modes>
<jruby.versions>1.7.13</jruby.versions>
</properties>
@@ -520,7 +520,7 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
<bc.versions>1.47,1.48,1.49,1.50,1.51</bc.versions>
<bc.versions>1.49,1.50,1.51,1.52,1.53,1.54</bc.versions>
<jruby.modes>1.8,1.9,2.0</jruby.modes>
<jruby.versions>1.7.15</jruby.versions>
</properties>
@@ -558,7 +558,7 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
<bc.versions>1.47,1.48,1.49,1.50,1.51</bc.versions>
<bc.versions>1.49,1.50,1.51,1.52,1.53,1.54</bc.versions>
<jruby.modes>1.8,1.9,2.0</jruby.modes>
<jruby.versions>1.7.16</jruby.versions>
</properties>
@@ -596,7 +596,7 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
<bc.versions>1.47,1.48,1.49,1.50,1.51</bc.versions>
<bc.versions>1.49,1.50,1.51,1.52,1.53,1.54</bc.versions>
<jruby.modes>1.8,1.9,2.0</jruby.modes>
<jruby.versions>1.7.18</jruby.versions>
</properties>
@@ -634,13 +634,13 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
<bc.versions>1.47,1.48,1.49,1.50,1.51</bc.versions>
<bc.versions>1.49,1.50,1.51,1.52,1.53,1.54</bc.versions>
<jruby.modes>1.8,1.9,2.0</jruby.modes>
<jruby.versions>1.7.20</jruby.versions>
</properties>
</profile>
<profile>
<id>test-1.7.21</id>
<id>test-1.7.22</id>
<build>
<plugins>
<plugin>
@@ -672,13 +672,13 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
<bc.versions>1.47,1.48,1.49,1.50,1.51</bc.versions>
<bc.versions>1.49,1.50,1.51,1.52,1.53,1.54</bc.versions>
<jruby.modes>1.8,1.9,2.0</jruby.modes>
<jruby.versions>1.7.21</jruby.versions>
<jruby.versions>1.7.22</jruby.versions>
</properties>
</profile>
<profile>
<id>test-1.7.22</id>
<id>test-1.7.23</id>
<build>
<plugins>
<plugin>
@@ -710,9 +710,9 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
<bc.versions>1.47,1.48,1.49,1.50,1.51</bc.versions>
<bc.versions>1.49,1.50,1.51,1.52,1.53,1.54</bc.versions>
<jruby.modes>1.8,1.9,2.0</jruby.modes>
<jruby.versions>1.7.22</jruby.versions>
<jruby.versions>1.7.23</jruby.versions>
</properties>
</profile>
<profile>
@@ -748,7 +748,7 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
<bc.versions>1.47,1.48,1.49,1.50,1.51</bc.versions>
<bc.versions>1.49,1.50,1.51,1.52,1.53,1.54</bc.versions>
<jruby.version>9.0.1.0</jruby.version>
<jruby.versions>9.0.1.0</jruby.versions>
</properties>
@@ -786,7 +786,7 @@ DO NOT MODIFIY - GENERATED CODE
</plugins>
</build>
<properties>
<bc.versions>1.47,1.48,1.49,1.50,1.51</bc.versions>
<bc.versions>1.49,1.50,1.51,1.52,1.53,1.54</bc.versions>
<jruby.version>9.0.4.0</jruby.version>
<jruby.versions>9.0.4.0</jruby.versions>
</properties>
8 changes: 5 additions & 3 deletions src/test/ruby/pkcs7/test_pkcs7.rb
Original file line number Diff line number Diff line change
@@ -739,7 +739,7 @@ def test_pem_read_pkcs7_bio
assert_equal 0, env.version
enc_data = env.enc_data
assert_equal ASN1Registry::NID_pkcs7_data, enc_data.content_type
assert_equal ASN1Registry::NID_aes_128_cbc, ASN1Registry::oid2nid(enc_data.algorithm.object_id)
assert_equal ASN1Registry::NID_aes_128_cbc, ASN1Registry::oid2nid(alg_oid(enc_data.algorithm))
assert_equal PKCS7_PEM_CONTENTS, String.from_java_bytes(enc_data.enc_data.octets)

ris = env.recipient_info
@@ -766,15 +766,17 @@ def test_pem_read_pkcs7_bio
assert_equal "DC=org,DC=ruby-lang,CN=CA", first.issuer_and_serial.name.to_s
assert_equal "DC=org,DC=ruby-lang,CN=CA", second.issuer_and_serial.name.to_s

assert_equal ASN1Registry::NID_rsaEncryption, ASN1Registry::oid2nid(first.key_enc_algor.object_id)
assert_equal ASN1Registry::NID_rsaEncryption, ASN1Registry::oid2nid(second.key_enc_algor.object_id)
assert_equal ASN1Registry::NID_rsaEncryption, ASN1Registry::oid2nid(alg_oid(first.key_enc_algor))
assert_equal ASN1Registry::NID_rsaEncryption, ASN1Registry::oid2nid(alg_oid(second.key_enc_algor))

assert_equal PKCS7_PEM_FIRST_KEY, String.from_java_bytes(first.enc_key.octets)
assert_equal PKCS7_PEM_SECOND_KEY, String.from_java_bytes(second.enc_key.octets)
end

private

def alg_oid(alg); return alg.getAlgorithm end

def assert_raise_pkcs7_exception
begin
yield