| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.extensions; |
| | | |
| | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.ResultCode; |
| | | |
| | |
| | | // TLS was successfully enabled on the client connection, but we need to |
| | | // send the response in the clear. |
| | | operation.setResultCode(ResultCode.SUCCESS); |
| | | |
| | | try |
| | | { |
| | | tlsCapableConnection.sendClearResponse(operation); |
| | | operation.setResponseSent(); |
| | | tlsCapableConnection.enableTLS(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | logError(ERR_STARTTLS_ERROR_SENDING_CLEAR_RESPONSE.get( |
| | | getExceptionMessage(e))); |
| | | |
| | | clientConnection.disconnect(DisconnectReason.SECURITY_PROBLEM, false, |
| | | ERR_STARTTLS_ERROR_SENDING_CLEAR_RESPONSE.get( |
| | | getExceptionMessage(e))); |
| | | } |
| | | } |
| | | } |
| | | |