From 38b29a676415540ddbcc00bb98194ab546246b32 Mon Sep 17 00:00:00 2001 From: "miodrag%netscape.com" Date: Mon, 10 Apr 2000 17:47:02 +0000 Subject: [PATCH] Pass className rather than mechanismName to DynamicInvoker (391585) --- .../ldapjdk/netscape/ldap/LDAPSaslBind.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSaslBind.java b/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSaslBind.java index acaa101bbc1f..22963f9c3722 100644 --- a/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSaslBind.java +++ b/directory/java-sdk/ldapjdk/netscape/ldap/LDAPSaslBind.java @@ -33,7 +33,10 @@ import java.net.*; /** * Authenticates to a server using SASL */ -public class LDAPSaslBind implements LDAPBind, Serializable { +public class LDAPSaslBind implements LDAPBind, java.io.Serializable { + + static final long serialVersionUID = -7615315715163655443L; + /** * Construct an object which can authenticate to an LDAP server * using the specified name and a specified SASL mechanism. @@ -181,8 +184,7 @@ public class LDAPSaslBind implements LDAPBind, Serializable { continue; } - String challenge = response.getCredentials(); - byte[] b = challenge.getBytes(); + byte[] b = response.getCredentials(); Object[] args = {b}; String[] argNames = {"[B"}; // class name for byte array @@ -190,7 +192,7 @@ public class LDAPSaslBind implements LDAPBind, Serializable { outVals = (byte[])DynamicInvoker.invokeMethod( _saslClient, - mechanismName, "evaluateChallenge", + className, "evaluateChallenge", args, argNames); } @@ -198,7 +200,7 @@ public class LDAPSaslBind implements LDAPBind, Serializable { Boolean bool = (Boolean)DynamicInvoker.invokeMethod( _saslClient, - mechanismName, "isComplete", null, null); + className, "isComplete", null, null); if (!bool.booleanValue()) { // Authentication session hijacked! throw new LDAPException("The server indicates that " + @@ -214,14 +216,14 @@ public class LDAPSaslBind implements LDAPBind, Serializable { InputStream is = (InputStream)DynamicInvoker.invokeMethod( _saslClient, - mechanismName, "getInputStream", args, argNames); + className, "getInputStream", args, argNames); ldc.setInputStream(is); args[0] = ldc.getOutputStream(); argNames[0] = "java.io.OutputStream"; OutputStream os = (OutputStream)DynamicInvoker.invokeMethod( _saslClient, - mechanismName, "getOutputStream", args, argNames); + className, "getOutputStream", args, argNames); ldc.setOutputStream(os); ldc.markConnAsBound(); } catch (LDAPException e) {