For the latest news and information visit
The GNU Crypto project

gnu.crypto.sasl.srp
Class SRPServer

java.lang.Object
  |
  +--gnu.crypto.sasl.ServerMechanism
        |
        +--gnu.crypto.sasl.srp.SRPServer
All Implemented Interfaces:
SaslServer

public class SRPServer
extends ServerMechanism
implements SaslServer

The SASL-SRP server-side mechanism.


Field Summary
 
Fields inherited from class gnu.crypto.sasl.ServerMechanism
authenticator, authorizationID, channelBinding, complete, handler, mechanism, properties, protocol, serverName, state
 
Constructor Summary
SRPServer()
           
 
Method Summary
protected  byte[] engineUnwrap(byte[] incoming, int offset, int len)
           
protected  byte[] engineWrap(byte[] outgoing, int offset, int len)
           
 byte[] evaluateResponse(byte[] response)
          Evaluates the response data and generates a challenge.
protected  java.lang.String getNegotiatedQOP()
           
protected  java.lang.String getNegotiatedRawSendSize()
           
protected  java.lang.String getNegotiatedStrength()
           
protected  java.lang.String getReuse()
           
protected  void initMechanism()
           
protected  void resetMechanism()
           
 
Methods inherited from class gnu.crypto.sasl.ServerMechanism
dispose, getAuthorizationID, getMechanismName, getNegotiatedMaxBuffer, getNegotiatedPolicyForwardSecrecy, getNegotiatedPolicyNoActive, getNegotiatedPolicyNoAnonymous, getNegotiatedPolicyNoDictionary, getNegotiatedPolicyNoPlainText, getNegotiatedPolicyPassCredentials, getNegotiatedProperty, getNegotiatedServerAuth, init, isComplete, reset, unwrap, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.security.sasl.SaslServer
dispose, getAuthorizationID, getMechanismName, getNegotiatedProperty, isComplete, unwrap, wrap
 

Constructor Detail

SRPServer

public SRPServer()
Method Detail

initMechanism

protected void initMechanism()
                      throws SaslException
Specified by:
initMechanism in class ServerMechanism
SaslException

resetMechanism

protected void resetMechanism()
                       throws SaslException
Specified by:
resetMechanism in class ServerMechanism
SaslException

evaluateResponse

public byte[] evaluateResponse(byte[] response)
                        throws SaslException
Description copied from interface: SaslServer
Evaluates the response data and generates a challenge. If a response is received from the client during the authentication process, this method is called to prepare an appropriate next challenge to submit to the client. The challenge is null if the authentication has succeeded and no more challenge data is to be sent to the client. It is non-null if the authentication must be continued by sending a challenge to the client, or if the authentication has succeeded but challenge data needs to be processed by the client. SaslServer.isComplete() should be called after each call to evaluateResponse(),to determine if any further response is needed from the client.

Specified by:
evaluateResponse in interface SaslServer
Specified by:
evaluateResponse in class ServerMechanism
Parameters:
response - the non-null (but possibly empty) response sent by the client.
Returns:
the possibly null challenge to send to the client. It is null if the authentication has succeeded and there is no more challenge data to be sent to the client.
Throws:
SaslException - if an error occurred while processing the response or generating a challenge.

engineUnwrap

protected byte[] engineUnwrap(byte[] incoming,
                              int offset,
                              int len)
                       throws SaslException
Overrides:
engineUnwrap in class ServerMechanism
SaslException

engineWrap

protected byte[] engineWrap(byte[] outgoing,
                            int offset,
                            int len)
                     throws SaslException
Overrides:
engineWrap in class ServerMechanism
SaslException

getNegotiatedQOP

protected java.lang.String getNegotiatedQOP()
Overrides:
getNegotiatedQOP in class ServerMechanism

getNegotiatedStrength

protected java.lang.String getNegotiatedStrength()
Overrides:
getNegotiatedStrength in class ServerMechanism

getNegotiatedRawSendSize

protected java.lang.String getNegotiatedRawSendSize()
Overrides:
getNegotiatedRawSendSize in class ServerMechanism

getReuse

protected java.lang.String getReuse()
Overrides:
getReuse in class ServerMechanism

For the latest news and information visit
The GNU Crypto project

Copyright © 2001, 2002, 2003, 2004 Free Software Foundation, Inc.