summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-04 06:59:33 (EDT)
committerEike Stepper2007-10-04 06:59:33 (EDT)
commit0af114e6cc16acebe2df1e68af838afbbe1bcf6b (patch)
treeb475f2273b428cbebb326df0976c669e8bb287f7
parent9fd1d2acef1f41a29efcb848f9ae0f3a82b58f88 (diff)
downloadcdo-0af114e6cc16acebe2df1e68af838afbbe1bcf6b.zip
cdo-0af114e6cc16acebe2df1e68af838afbbe1bcf6b.tar.gz
cdo-0af114e6cc16acebe2df1e68af838afbbe1bcf6b.tar.bz2
[205027] Implement challenge/response based negotiator
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205027
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SecurityTest.java4
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/security/Negotiator.java2
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/security/IBufferReceiver.java2
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/security/INegotiationContext.java8
4 files changed, 12 insertions, 4 deletions
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SecurityTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SecurityTest.java
index adef1c6..b2f1919 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SecurityTest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/SecurityTest.java
@@ -49,7 +49,7 @@ public class SecurityTest extends AbstractOMTest
public void transmitBuffer(ByteBuffer buffer)
{
buffer.flip();
- responseContext.getBufferReceiver().receiveBuffer(buffer);
+ responseContext.getBufferReceiver().receiveBuffer(responseContext, buffer);
}
};
@@ -58,7 +58,7 @@ public class SecurityTest extends AbstractOMTest
public void transmitBuffer(ByteBuffer buffer)
{
buffer.flip();
- challengeContext.getBufferReceiver().receiveBuffer(buffer);
+ challengeContext.getBufferReceiver().receiveBuffer(challengeContext, buffer);
}
};
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/security/Negotiator.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/security/Negotiator.java
index 68cfe01..64733b0 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/security/Negotiator.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/security/Negotiator.java
@@ -61,7 +61,7 @@ public abstract class Negotiator extends Lifecycle implements INegotiator, IBuff
}
}
- public void receiveBuffer(ByteBuffer buffer)
+ public void receiveBuffer(INegotiationContext context, ByteBuffer buffer)
{
checkContext();
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/security/IBufferReceiver.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/security/IBufferReceiver.java
index b2b95bb..06113dc 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/security/IBufferReceiver.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/security/IBufferReceiver.java
@@ -17,5 +17,5 @@ import java.nio.ByteBuffer;
*/
public interface IBufferReceiver
{
- public void receiveBuffer(ByteBuffer buffer);
+ public void receiveBuffer(INegotiationContext context, ByteBuffer buffer);
}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/security/INegotiationContext.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/security/INegotiationContext.java
index 2f785bc..756544f 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/security/INegotiationContext.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/security/INegotiationContext.java
@@ -26,4 +26,12 @@ public interface INegotiationContext
public void negotiationSuccess();
public void negotiationFailure();
+
+ /**
+ * @author Eike Stepper
+ */
+ public interface Receiver
+ {
+ public void receiveBuffer(INegotiationContext context, ByteBuffer buffer);
+ }
}