private static boolean isCertificateException(SslHandshakeCompletionEvent event) {
        return event.cause().getCause() instanceof CertificateException;
    }
Called when SSL Handshake has been completed.

If successful, attempts authentication via SASL, or dialback dependent on configuration and certificate validity.
If not successful, either attempts dialback on a plain un-encrypted connection, or throws an exception dependent
on configuration.

@param ctx ChannelHandlerContext for the Netty channel
@param evt Event that has been triggered - this implementation specifically identifies SslHandshakeCompletionEvent
@throws Exception
xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyOutboundConnectionHandler.java