Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

* Treat SSL NOT_HANDSHAKING as FINISHED. #1707

Closed
wants to merge 4 commits into from

3 participants

Uwe Kubosch Thomas E Enebo Chris Seaton
Uwe Kubosch
Collaborator

The code comment states that NOT_HANDSHAKING should be treated as FINISHED, but fails to reset the initialHandshake flag.

On Android, client connections complete OK in the NOT_HANDSHAKING state. This may be a bug on Android, but it has not changed since Android 2.3, and current source suggests it will stay that way ( https://android.googlesource.com/platform/libcore/+/master/luni/src/test/java/libcore/javax/net/ssl/SSLEngineTest.java )

The fix is to treat NOT_HANDSHAKING as FINISHED as per code comment. Tests run fine on OS X and travis as far as I can see.

Uwe Kubosch donv referenced this pull request in ruboto/ruboto
Closed

Add support for SSL #154

Uwe Kubosch
Collaborator

The travis failure is the same as for master.

Uwe Kubosch
Collaborator

Committed the change.

Uwe Kubosch donv closed this
Uwe Kubosch
Collaborator

The code comment stated that NOT_HANDSHAKING should be treated as FINISHED, but fails to reset the initialHandshake flag.

On Android, client connections complete OK in the NOT_HANDSHAKING state. This may be a bug on Android, but it has not changed since Android 2.3, and current source suggests it will stay that way ( https://android.googlesource.com/platform/libcore/+/master/luni/src/test/java/libcore/javax/net/ssl/SSLEngineTest.java )

The fix is to treat NOT_HANDSHAKING as FINISHED as per code comment. Tests run fine on OS X and travis as far as I can see.

Thomas E Enebo enebo added this to the JRuby 1.7.13 milestone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
25 bench/truffle/report/rbx.gnuplot
View
@@ -0,0 +1,25 @@
+set terminal pdf enhanced size 10,6
+set output 'rbx.pdf'
+
+set style data histogram
+set style histogram cluster gap 1
+
+set title "JRuby+Truffle vs Rubinius 2.2.6"
+set xlabel "Implementation" rotate by 270
+set ylabel "Speedup Relative to Rubinius 2.2.6"
+set key top left
+
+set style fill solid border rgb 'black'
+set auto x
+set xtics nomirror rotate by -45
+set yrange [0:*]
+
+plot 'rbx.data' using 2:xtic(1) title col, \
+ '' using 3:xtic(1) title col, \
+ '' using 4:xtic(1) title col, \
+ '' using 5:xtic(1) title col, \
+ '' using 6:xtic(1) title col, \
+ '' using 7:xtic(1) title col, \
+ '' using 8:xtic(1) title col, \
+ '' using 9:xtic(1) title col, \
+ '' using 10:xtic(1) title col
12 bench/truffle/report/report.rb
View
@@ -38,7 +38,7 @@
exit
end
else
- if ["topaz", "jruby", "jruby-master", "competition", "almost-all", "all", "interpreters", "summary", "other-vms", "head"].include? arg
+ if ["rbx", "topaz", "jruby", "jruby-master", "competition", "almost-all", "all", "interpreters", "summary", "other-vms", "head"].include? arg
reports.push(arg)
else
puts "unknown report " + arg
@@ -53,6 +53,7 @@
report_references = {
"topaz" => "topaz-dev",
+ "rbx" => "rbx-2.2.6",
"jruby" => "jruby-1.7.12-server-indy",
"jruby-master" => "jruby-master-server-indy",
"competition" => "jruby-1.7.12-server-indy",
@@ -90,7 +91,8 @@
relevant_reports.push("summary")
relevant_reports.push("competition")
relevant_reports.push("other-vms")
- rubies.push Ruby.new(name + "-interpreter", dir + "/bin/ruby -Xint", ["interpreters"])
+ relevant_reports.push("rbx")
+ rubies.push Ruby.new(name + "-interpreter", dir + "/bin/ruby -Xint", ["all", "interpreters"])
end
if name == "2.1.2"
@@ -125,11 +127,11 @@
if not ENV["JRUBY_DIR"].nil? and not ENV["GRAAL_RELEASE_DIR"].nil? and Dir.exists? File.expand_path(ENV["JRUBY_DIR"]) and Dir.exists? File.expand_path(ENV["GRAAL_RELEASE_DIR"])
rubies.push Ruby.new("jruby-master-server-interpreter", "$JRUBY_DIR/bin/jruby --server -Xcompile.mode=OFF", ["almost-all", "all", "jruby", "jruby-master", "interpreters"])
rubies.push Ruby.new("jruby-master-server", "$JRUBY_DIR/bin/jruby --server", ["almost-all", "all", "jruby", "jruby-master"])
- rubies.push Ruby.new("jruby-master-server-indy", "$JRUBY_DIR/bin/jruby --server -Xcompile.invokedynamic=true", ["almost-all", "all", "competition", "jruby", "jruby-master", "summary"])
+ rubies.push Ruby.new("jruby-master-server-indy", "$JRUBY_DIR/bin/jruby --server -Xcompile.invokedynamic=true", ["almost-all", "all", "jruby", "jruby-master", "summary"])
rubies.push Ruby.new("jruby-master-server-ir-interpreter", "$JRUBY_DIR/bin/jruby --server -X-CIR", ["all", "jruby", "jruby-master", "interpreters"])
rubies.push Ruby.new("jruby-master-server-ir-compiler", "$JRUBY_DIR/bin/jruby --server -X+CIR", ["all", "jruby", "jruby-master"])
- rubies.push Ruby.new("jruby-master+truffle-server-original", "JAVACMD=$GRAAL_RELEASE_DIR/bin/java $JRUBY_DIR/bin/jruby -J-original -X+T -Xtruffle.printRuntime=true", ["interpreters", "jruby", "jruby-master"])
- rubies.push Ruby.new("jruby-master+truffle-server", "JAVACMD=$GRAAL_RELEASE_DIR/bin/java $JRUBY_DIR/bin/jruby -J-server -X+T -Xtruffle.printRuntime=true", ["almost-all", "all", "jruby", "jruby-master", "topaz", "competition", "other-vms", "head"])
+ rubies.push Ruby.new("jruby-master+truffle-server-original", "JAVACMD=$GRAAL_RELEASE_DIR/bin/java $JRUBY_DIR/bin/jruby -J-original -X+T -Xtruffle.printRuntime=true", ["all", "interpreters", "jruby", "jruby-master"])
+ rubies.push Ruby.new("jruby-master+truffle-server", "JAVACMD=$GRAAL_RELEASE_DIR/bin/java $JRUBY_DIR/bin/jruby -J-server -X+T -Xtruffle.printRuntime=true", ["almost-all", "all", "jruby", "jruby-master", "topaz", "rbx", "competition", "summary", "other-vms", "head"])
else
puts "warning: couldn't find $JRUBY_DIR or $GRAAL_RELEASE_DIR"
end
4 ext/openssl/src/main/java/org/jruby/ext/openssl/SSLSocket.java
View
@@ -418,6 +418,7 @@ private void doHandshake(boolean blocking) throws IOException {
switch (hsStatus) {
case FINISHED:
+ case NOT_HANDSHAKING:
if ( initialHandshake ) finishInitialHandshake();
return;
case NEED_TASK:
@@ -444,9 +445,6 @@ private void doHandshake(boolean blocking) throws IOException {
netData.flip();
flushData(blocking);
break;
- case NOT_HANDSHAKING:
- // Opposite side could close while unwrapping. Handle this as same as FINISHED
- return;
default:
throw new IllegalStateException("Unknown handshaking status: " + hsStatus);
}
Something went wrong with that request. Please try again.