org.globus.mds.gsi.netscape
Class GSIMech

java.lang.Object
  extended by org.globus.mds.gsi.common.GSIMechanism
      extended by org.globus.mds.gsi.netscape.GSIMech
All Implemented Interfaces:
com.netscape.sasl.SaslClient

public class GSIMech
extends GSIMechanism
implements com.netscape.sasl.SaslClient


Field Summary
 
Fields inherited from class org.globus.mds.gsi.common.GSIMechanism
allQop, completed, context, HIGH_STRENGTH, integrity, INTEGRITY_ONLY_PROTECTION, LOW_STRENGTH, MAX_BUFFER, MAX_SEND_BUF, MEDIUM_STRENGTH, NAME, NAME2, NO_PROTECTION, privacy, PRIVACY_PROTECTION, PROXY, qop, QOP, recvMaxBufSize, SECURITY_CREDENTIALS, sendMaxBufSize, strength, STRENGTH
 
Constructor Summary
GSIMech(String authzID, String protocol, String serverName, Map props, CallbackHandler cbh)
           
 
Method Summary
 byte[] createInitialResponse()
          Netscape specific function.
 byte[] evaluateChallenge(byte[] challengeData)
          Processes the challenge data.
 
Methods inherited from class org.globus.mds.gsi.common.GSIMechanism
combineMasks, exchangeData, findPreferredMask, getInputStream, getMechanismName, getOutputStream, getRecvMaxBufSize, getSendMaxBufSize, init, intToNetworkByteOrder, isComplete, isIntegrityQop, isNotProtected, isPrivacyQop, negotiateProtections, networkByteOrderToInt, parseProp, parseQop, parseQop, parseStrength, setQOP
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.netscape.sasl.SaslClient
getInputStream, getMechanismName, getOutputStream, isComplete
 

Constructor Detail

GSIMech

public GSIMech(String authzID,
               String protocol,
               String serverName,
               Map props,
               CallbackHandler cbh)
        throws com.netscape.sasl.SaslException
Throws:
com.netscape.sasl.SaslException
Method Detail

createInitialResponse

public byte[] createInitialResponse()
                             throws com.netscape.sasl.SaslException
Netscape specific function.

Specified by:
createInitialResponse in interface com.netscape.sasl.SaslClient
Throws:
com.netscape.sasl.SaslException

evaluateChallenge

public byte[] evaluateChallenge(byte[] challengeData)
                         throws com.netscape.sasl.SaslException
Processes the challenge data. The server sends a challenge data using which the client must process using GSS_Init_sec_context. As per RFC 2222, when GSS_S_COMPLETE is returned, we do an extra handshake to determine the negotiated security protection and buffer sizes.

Specified by:
evaluateChallenge in interface com.netscape.sasl.SaslClient
Parameters:
challengeData - A non-null byte array containing the challenge data from the server.
Returns:
A non-null byte array containing the response to be sent to the server.
Throws:
com.netscape.sasl.SaslException