| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS |
| | | */ |
| | | package org.opends.server.extensions; |
| | | |
| | |
| | | if (clientConnection == null) |
| | | { |
| | | operation.setResultCode(ResultCode.UNAVAILABLE); |
| | | |
| | | |
| | | operation.appendErrorMessage(ERR_STARTTLS_NO_CLIENT_CONNECTION.get()); |
| | | return; |
| | | } |
| | |
| | | else |
| | | { |
| | | operation.setResultCode(ResultCode.UNAVAILABLE); |
| | | |
| | | |
| | | operation.appendErrorMessage(ERR_STARTTLS_NOT_TLS_CAPABLE.get()); |
| | | return; |
| | | } |
| | | |
| | | MessageBuilder unavailableReason = new MessageBuilder(); |
| | | if (! tlsCapableConnection.isTLSAvailable(unavailableReason)) |
| | | if (! tlsCapableConnection.isStartTLSAvailable(unavailableReason)) |
| | | { |
| | | operation.setResultCode(ResultCode.UNAVAILABLE); |
| | | operation.setErrorMessage(unavailableReason); |