mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

dugan
12.37.2009 ca4ac5dfbb6b2a6be56ee37c7568e4b17ba4f171
Add check for null SASL Context and fix error message in EXTERNAL Digest Handler.
3 files modified
18 ■■■■■ changed files
opends/src/messages/messages/extension.properties 8 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/extensions/ExternalSASLMechanismHandler.java 3 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/extensions/SASLContext.java 7 ●●●● patch | view | raw | blame | history
opends/src/messages/messages/extension.properties
@@ -363,9 +363,9 @@
MILD_ERR_SASLEXTERNAL_NO_CLIENT_CONNECTION_123=The SASL EXTERNAL bind request \
 could not be processed because the associated bind request does not have a \
 reference to the client connection
MILD_ERR_SASLEXTERNAL_NO_SECURITY_PROVIDER_124=The SASL EXTERNAL bind request \
 could not be processed because the associated client connection does not have \
 a security provider
MILD_ERR_SASLEXTERNAL_NOT_LDAP_CLIENT_INSTANCE_124=The SASL EXTERNAL bind \
request could not be processed because the associated client connection \
instance is not an instance of LDAPClientConnection
MILD_ERR_SASLEXTERNAL_CLIENT_NOT_USING_TLS_PROVIDER_125=The SASL EXTERNAL \
 bind request could not be processed because the client connection is not \
 using the TLS security provider (client security provider is %s).  The TLS \
@@ -1415,3 +1415,5 @@
SEVERE_ERR_SASLDIGESTMD5_PROTOCOL_ERROR_570=SASL DIGEST MD5 protocol error: %s
INFO_LOG_EXTENSION_INFORMATION_571=Loaded extension from file '%s' (build %s, \
 revision %s)
 SEVERE_ERR_SASL_CREATE_SASL_SERVER_FAILED_572=Failed to create a SASL server \
 for SASL mechanism %s using a server FQDN of %s
opends/src/server/org/opends/server/extensions/ExternalSASLMechanismHandler.java
@@ -176,9 +176,8 @@
    }
    if(!(clientConnection instanceof LDAPClientConnection)) {
        //TODO SASLPhase2 need better message
        bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
        Message message = ERR_SASLEXTERNAL_NO_SECURITY_PROVIDER.get();
        Message message = ERR_SASLEXTERNAL_NOT_LDAP_CLIENT_INSTANCE.get();
        bindOperation.setAuthFailureReason(message);
        return;
    }
opends/src/server/org/opends/server/extensions/SASLContext.java
@@ -160,8 +160,13 @@
     * constructor.
     */
    private void initSASLServer() throws SaslException {
       this.saslServer = Sasl.createSaslServer(mechanism, SASL_DEFAULT_PROTOCOL,
       saslServer = Sasl.createSaslServer(mechanism, SASL_DEFAULT_PROTOCOL,
                                               serverFQDN, saslProps, this);
       if(saslServer == null) {
         Message msg =
                 ERR_SASL_CREATE_SASL_SERVER_FAILED.get(mechanism, serverFQDN);
         throw new SaslException(Message.toString(msg));
       }
    }