[02/50] [abbrv] ignite git commit: IGNITE-8153 Nodes fail to connect each other when SSL is enabled - Fixes #3773.

2018-04-16 Thread agoncharuk
IGNITE-8153 Nodes fail to connect each other when SSL is enabled - Fixes #3773.

Signed-off-by: Valentin Kulichenko 


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f4de6df7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f4de6df7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f4de6df7

Branch: refs/heads/ignite-7708
Commit: f4de6df71b256506ce36c1c4e16533bb063782a0
Parents: a96ac04
Author: mcherkasov 
Authored: Tue Apr 10 17:23:29 2018 -0700
Committer: Valentin Kulichenko 
Committed: Tue Apr 10 17:23:29 2018 -0700

--
 .../ignite/internal/util/nio/ssl/BlockingSslHandler.java  | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/f4de6df7/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
index 638106f..0099c46 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
@@ -373,9 +373,10 @@ public class BlockingSslHandler {
  * @throws GridNioException If failed to pass event to the next filter.
  */
 private Status unwrapHandshake() throws SSLException, 
IgniteCheckedException {
-// Flip input buffer so we can read the collected data.
-readFromNet();
+if(!inNetBuf.hasRemaining())
+readFromNet();
 
+// Flip input buffer so we can read the collected data.
 inNetBuf.flip();
 
 SSLEngineResult res = unwrap0();
@@ -399,7 +400,10 @@ public class BlockingSslHandler {
 else if (res.getStatus() == BUFFER_UNDERFLOW) {
 inNetBuf.compact();
 
-inNetBuf = expandBuffer(inNetBuf, inNetBuf.capacity() * 2);
+if(inNetBuf.capacity() == inNetBuf.limit())
+inNetBuf = expandBuffer(inNetBuf, inNetBuf.capacity() * 2);
+
+readFromNet();
 }
 else
 // prepare to be written again



[25/54] [abbrv] ignite git commit: IGNITE-8153 Nodes fail to connect each other when SSL is enabled - Fixes #3773.

2018-04-13 Thread agoncharuk
IGNITE-8153 Nodes fail to connect each other when SSL is enabled - Fixes #3773.

Signed-off-by: Valentin Kulichenko 


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f4de6df7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f4de6df7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f4de6df7

Branch: refs/heads/ignite-6083
Commit: f4de6df71b256506ce36c1c4e16533bb063782a0
Parents: a96ac04
Author: mcherkasov 
Authored: Tue Apr 10 17:23:29 2018 -0700
Committer: Valentin Kulichenko 
Committed: Tue Apr 10 17:23:29 2018 -0700

--
 .../ignite/internal/util/nio/ssl/BlockingSslHandler.java  | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/f4de6df7/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
index 638106f..0099c46 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
@@ -373,9 +373,10 @@ public class BlockingSslHandler {
  * @throws GridNioException If failed to pass event to the next filter.
  */
 private Status unwrapHandshake() throws SSLException, 
IgniteCheckedException {
-// Flip input buffer so we can read the collected data.
-readFromNet();
+if(!inNetBuf.hasRemaining())
+readFromNet();
 
+// Flip input buffer so we can read the collected data.
 inNetBuf.flip();
 
 SSLEngineResult res = unwrap0();
@@ -399,7 +400,10 @@ public class BlockingSslHandler {
 else if (res.getStatus() == BUFFER_UNDERFLOW) {
 inNetBuf.compact();
 
-inNetBuf = expandBuffer(inNetBuf, inNetBuf.capacity() * 2);
+if(inNetBuf.capacity() == inNetBuf.limit())
+inNetBuf = expandBuffer(inNetBuf, inNetBuf.capacity() * 2);
+
+readFromNet();
 }
 else
 // prepare to be written again



[13/14] ignite git commit: IGNITE-8153 Nodes fail to connect each other when SSL is enabled - Fixes #3773.

2018-04-11 Thread akuznetsov
IGNITE-8153 Nodes fail to connect each other when SSL is enabled - Fixes #3773.

Signed-off-by: Valentin Kulichenko 


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f4de6df7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f4de6df7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f4de6df7

Branch: refs/heads/ignite-8201
Commit: f4de6df71b256506ce36c1c4e16533bb063782a0
Parents: a96ac04
Author: mcherkasov 
Authored: Tue Apr 10 17:23:29 2018 -0700
Committer: Valentin Kulichenko 
Committed: Tue Apr 10 17:23:29 2018 -0700

--
 .../ignite/internal/util/nio/ssl/BlockingSslHandler.java  | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/f4de6df7/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
index 638106f..0099c46 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
@@ -373,9 +373,10 @@ public class BlockingSslHandler {
  * @throws GridNioException If failed to pass event to the next filter.
  */
 private Status unwrapHandshake() throws SSLException, 
IgniteCheckedException {
-// Flip input buffer so we can read the collected data.
-readFromNet();
+if(!inNetBuf.hasRemaining())
+readFromNet();
 
+// Flip input buffer so we can read the collected data.
 inNetBuf.flip();
 
 SSLEngineResult res = unwrap0();
@@ -399,7 +400,10 @@ public class BlockingSslHandler {
 else if (res.getStatus() == BUFFER_UNDERFLOW) {
 inNetBuf.compact();
 
-inNetBuf = expandBuffer(inNetBuf, inNetBuf.capacity() * 2);
+if(inNetBuf.capacity() == inNetBuf.limit())
+inNetBuf = expandBuffer(inNetBuf, inNetBuf.capacity() * 2);
+
+readFromNet();
 }
 else
 // prepare to be written again



ignite git commit: IGNITE-8153 Nodes fail to connect each other when SSL is enabled - Fixes #3773.

2018-04-10 Thread vkulichenko
Repository: ignite
Updated Branches:
  refs/heads/ignite-2.5 526fb0ee6 -> b4cb2f0df


IGNITE-8153 Nodes fail to connect each other when SSL is enabled - Fixes #3773.

Signed-off-by: Valentin Kulichenko 


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/b4cb2f0d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/b4cb2f0d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/b4cb2f0d

Branch: refs/heads/ignite-2.5
Commit: b4cb2f0df944534743a9d73811e047eda572258c
Parents: 526fb0e
Author: mcherkasov 
Authored: Tue Apr 10 17:27:20 2018 -0700
Committer: Valentin Kulichenko 
Committed: Tue Apr 10 17:27:20 2018 -0700

--
 .../ignite/internal/util/nio/ssl/BlockingSslHandler.java  | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/b4cb2f0d/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
index 638106f..0099c46 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
@@ -373,9 +373,10 @@ public class BlockingSslHandler {
  * @throws GridNioException If failed to pass event to the next filter.
  */
 private Status unwrapHandshake() throws SSLException, 
IgniteCheckedException {
-// Flip input buffer so we can read the collected data.
-readFromNet();
+if(!inNetBuf.hasRemaining())
+readFromNet();
 
+// Flip input buffer so we can read the collected data.
 inNetBuf.flip();
 
 SSLEngineResult res = unwrap0();
@@ -399,7 +400,10 @@ public class BlockingSslHandler {
 else if (res.getStatus() == BUFFER_UNDERFLOW) {
 inNetBuf.compact();
 
-inNetBuf = expandBuffer(inNetBuf, inNetBuf.capacity() * 2);
+if(inNetBuf.capacity() == inNetBuf.limit())
+inNetBuf = expandBuffer(inNetBuf, inNetBuf.capacity() * 2);
+
+readFromNet();
 }
 else
 // prepare to be written again



ignite git commit: IGNITE-8153 Nodes fail to connect each other when SSL is enabled - Fixes #3773.

2018-04-10 Thread vkulichenko
Repository: ignite
Updated Branches:
  refs/heads/master a96ac0475 -> f4de6df71


IGNITE-8153 Nodes fail to connect each other when SSL is enabled - Fixes #3773.

Signed-off-by: Valentin Kulichenko 


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f4de6df7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f4de6df7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f4de6df7

Branch: refs/heads/master
Commit: f4de6df71b256506ce36c1c4e16533bb063782a0
Parents: a96ac04
Author: mcherkasov 
Authored: Tue Apr 10 17:23:29 2018 -0700
Committer: Valentin Kulichenko 
Committed: Tue Apr 10 17:23:29 2018 -0700

--
 .../ignite/internal/util/nio/ssl/BlockingSslHandler.java  | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ignite/blob/f4de6df7/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
--
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
index 638106f..0099c46 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/BlockingSslHandler.java
@@ -373,9 +373,10 @@ public class BlockingSslHandler {
  * @throws GridNioException If failed to pass event to the next filter.
  */
 private Status unwrapHandshake() throws SSLException, 
IgniteCheckedException {
-// Flip input buffer so we can read the collected data.
-readFromNet();
+if(!inNetBuf.hasRemaining())
+readFromNet();
 
+// Flip input buffer so we can read the collected data.
 inNetBuf.flip();
 
 SSLEngineResult res = unwrap0();
@@ -399,7 +400,10 @@ public class BlockingSslHandler {
 else if (res.getStatus() == BUFFER_UNDERFLOW) {
 inNetBuf.compact();
 
-inNetBuf = expandBuffer(inNetBuf, inNetBuf.capacity() * 2);
+if(inNetBuf.capacity() == inNetBuf.limit())
+inNetBuf = expandBuffer(inNetBuf, inNetBuf.capacity() * 2);
+
+readFromNet();
 }
 else
 // prepare to be written again