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: dd4a6660d964
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: fe55d9979d6d
Choose a head ref
  • 4 commits
  • 6 files changed
  • 1 contributor

Commits on May 27, 2016

  1. Copy the full SHA
    bb85661 View commit details
  2. Copy the full SHA
    7d1290e View commit details
  3. un-used import

    kares committed May 27, 2016
    Copy the full SHA
    1d9473c View commit details
  4. Copy the full SHA
    fe55d99 View commit details
Showing with 170 additions and 9 deletions.
  1. +7 −0 .travis.yml
  2. +4 −1 Mavenfile
  3. +155 −3 pom.xml
  4. +2 −2 src/main/java/org/jruby/ext/openssl/BN.java
  5. +0 −1 src/main/java/org/jruby/ext/openssl/HMAC.java
  6. +2 −2 src/main/java/org/jruby/ext/openssl/PKeyRSA.java
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -13,8 +13,10 @@ env:
- TEST_PROFILE=test-1.7.18
- TEST_PROFILE=test-1.7.22
- TEST_PROFILE=test-1.7.24
- TEST_PROFILE=test-1.7.25
- TEST_PROFILE=test-9.0.1.0
- TEST_PROFILE=test-9.0.5.0
- TEST_PROFILE=test-9.1.1.0

install: echo 'no bundle install atm!'
# script: mvn verify -P $TEST_PROFILE
@@ -32,6 +34,8 @@ matrix:
env: TEST_PROFILE=test-9.0.1.0
- jdk: openjdk6
env: TEST_PROFILE=test-9.0.5.0
- jdk: openjdk6
env: TEST_PROFILE=test-9.1.1.0
include:
- jdk: oraclejdk8
env: TEST_COMMAND="jruby -S rake integration:install integration:test"
@@ -42,6 +46,9 @@ matrix:
- jdk: oraclejdk8
env: TEST_COMMAND="jruby -S rake integration:install integration:test"
rvm: jruby-9.0.5.0
- jdk: oraclejdk7
env: TEST_COMMAND="jruby -S rake integration:install integration:test"
rvm: jruby-9.1.1.0
notifications:
irc:
channels:
5 changes: 4 additions & 1 deletion Mavenfile
Original file line number Diff line number Diff line change
@@ -157,6 +157,7 @@ profile :id => 'test-1.7.4' do
end

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 += %w{ 1.7.24 1.7.25 }

jruby_1_7_versions.each { |version|

@@ -170,7 +171,9 @@ end

}

%w{ 9.0.1.0 9.0.4.0 }.each { |version|
jruby_9_K_versions = %w{ 9.0.1.0 9.0.5.0 9.1.0.0 9.1.1.0 }

jruby_9_K_versions.each { |version|
profile :id => "test-#{version}" do
plugin :invoker, '1.8' do
execute_goals( :install, :run, invoker_run_options )
158 changes: 155 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -721,6 +721,82 @@ DO NOT MODIFIY - GENERATED CODE
<jruby.versions>1.7.23</jruby.versions>
</properties>
</profile>
<profile>
<id>test-1.7.24</id>
<build>
<plugins>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<goals>
<goal>install</goal>
<goal>run</goal>
</goals>
<configuration>
<projectsDirectory>integration</projectsDirectory>
<pomIncludes>
<pomInclude>*/pom.xml</pomInclude>
</pomIncludes>
<streamLogs>true</streamLogs>
<properties>
<jruby.versions>${jruby.versions}</jruby.versions>
<jruby.modes>${jruby.modes}</jruby.modes>
<jruby.openssl.version>${project.version}</jruby.openssl.version>
<bc.versions>${bc.versions}</bc.versions>
<runit.dir>${runit.dir}</runit.dir>
</properties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<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.24</jruby.versions>
</properties>
</profile>
<profile>
<id>test-1.7.25</id>
<build>
<plugins>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<goals>
<goal>install</goal>
<goal>run</goal>
</goals>
<configuration>
<projectsDirectory>integration</projectsDirectory>
<pomIncludes>
<pomInclude>*/pom.xml</pomInclude>
</pomIncludes>
<streamLogs>true</streamLogs>
<properties>
<jruby.versions>${jruby.versions}</jruby.versions>
<jruby.modes>${jruby.modes}</jruby.modes>
<jruby.openssl.version>${project.version}</jruby.openssl.version>
<bc.versions>${bc.versions}</bc.versions>
<runit.dir>${runit.dir}</runit.dir>
</properties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<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.25</jruby.versions>
</properties>
</profile>
<profile>
<id>test-9.0.1.0</id>
<build>
@@ -760,7 +836,83 @@ DO NOT MODIFIY - GENERATED CODE
</properties>
</profile>
<profile>
<id>test-9.0.4.0</id>
<id>test-9.0.5.0</id>
<build>
<plugins>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<goals>
<goal>install</goal>
<goal>run</goal>
</goals>
<configuration>
<projectsDirectory>integration</projectsDirectory>
<pomIncludes>
<pomInclude>*/pom.xml</pomInclude>
</pomIncludes>
<streamLogs>true</streamLogs>
<properties>
<jruby.versions>${jruby.versions}</jruby.versions>
<jruby.modes>${jruby.modes}</jruby.modes>
<jruby.openssl.version>${project.version}</jruby.openssl.version>
<bc.versions>${bc.versions}</bc.versions>
<runit.dir>${runit.dir}</runit.dir>
</properties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<bc.versions>1.49,1.50,1.51,1.52,1.53,1.54</bc.versions>
<jruby.version>9.0.5.0</jruby.version>
<jruby.versions>9.0.5.0</jruby.versions>
</properties>
</profile>
<profile>
<id>test-9.1.0.0</id>
<build>
<plugins>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<goals>
<goal>install</goal>
<goal>run</goal>
</goals>
<configuration>
<projectsDirectory>integration</projectsDirectory>
<pomIncludes>
<pomInclude>*/pom.xml</pomInclude>
</pomIncludes>
<streamLogs>true</streamLogs>
<properties>
<jruby.versions>${jruby.versions}</jruby.versions>
<jruby.modes>${jruby.modes}</jruby.modes>
<jruby.openssl.version>${project.version}</jruby.openssl.version>
<bc.versions>${bc.versions}</bc.versions>
<runit.dir>${runit.dir}</runit.dir>
</properties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<bc.versions>1.49,1.50,1.51,1.52,1.53,1.54</bc.versions>
<jruby.version>9.1.0.0</jruby.version>
<jruby.versions>9.1.0.0</jruby.versions>
</properties>
</profile>
<profile>
<id>test-9.1.1.0</id>
<build>
<plugins>
<plugin>
@@ -793,8 +945,8 @@ DO NOT MODIFIY - GENERATED CODE
</build>
<properties>
<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>
<jruby.version>9.1.1.0</jruby.version>
<jruby.versions>9.1.1.0</jruby.versions>
</properties>
</profile>
<profile>
4 changes: 2 additions & 2 deletions src/main/java/org/jruby/ext/openssl/BN.java
Original file line number Diff line number Diff line change
@@ -119,7 +119,7 @@ public final BigInteger getValue() {
}

@JRubyMethod(name="initialize", required=1, optional=1, visibility = Visibility.PRIVATE)
public synchronized IRubyObject initialize(final ThreadContext context,
public IRubyObject initialize(final ThreadContext context,
final IRubyObject[] args) {
final Ruby runtime = context.runtime;
if (this.value != BigInteger.ZERO) { // already initialized
@@ -171,7 +171,7 @@ public synchronized IRubyObject initialize_copy(final IRubyObject that) {
}

@JRubyMethod(name = "copy")
public synchronized IRubyObject copy(IRubyObject other) {
public IRubyObject copy(IRubyObject other) {
if (this != other) {
this.value = getBigInteger(other);
}
1 change: 0 additions & 1 deletion src/main/java/org/jruby/ext/openssl/HMAC.java
Original file line number Diff line number Diff line change
@@ -30,7 +30,6 @@
import java.security.GeneralSecurityException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;

import org.jruby.Ruby;
import org.jruby.RubyClass;
4 changes: 2 additions & 2 deletions src/main/java/org/jruby/ext/openssl/PKeyRSA.java
Original file line number Diff line number Diff line change
@@ -379,7 +379,7 @@ public RubyString to_text() {
StringBuilder result = new StringBuilder();
if (privateKey != null) {
int len = privateKey.getModulus().bitLength();
result.append("Private-Key: (").append(len).append(" bit)").append("\n");
result.append("Private-Key: (").append(len).append(" bit)").append('\n');
result.append("modulus:");
addSplittedAndFormatted(result, privateKey.getModulus());
result.append("publicExponent: ").append(privateKey.getPublicExponent()).append(" (0x").append(privateKey.getPublicExponent().toString(16)).append(")\n");
@@ -401,7 +401,7 @@ public RubyString to_text() {
addSplittedAndFormatted(result, publicKey.getModulus());
result.append("Exponent: ").append(publicKey.getPublicExponent()).append(" (0x").append(publicKey.getPublicExponent().toString(16)).append(")\n");
}
return getRuntime().newString(result.toString());
return RubyString.newString(getRuntime(), result);
}

@Override