XMPP Module

We are trying to connect the xmpp module that is provide with the engine with an EJabberd xmpp server without allowing self signed certificates

Could you provide some guidelines on how to avoid this?

Here is the the libstrophe flag Im referring to

/** @def XMPP_CONN_FLAG_TRUST_TLS
 *  Trust servers certificate even if it is invalid.
 */
#define XMPP_CONN_FLAG_TRUST_TLS     (1UL << 3)

And here is how we are enabling it

void FStropheConnection::SetAcceptSelfSignedCertificates(bool bAccept)
{
	const long flags = xmpp_conn_get_flags(XmppConnectionPtr);
	if (bAccept)
	{
		xmpp_conn_set_flags(XmppConnectionPtr, flags | XMPP_CONN_FLAG_TRUST_TLS);
	}
	else
	{
		xmpp_conn_set_flags(XmppConnectionPtr, flags & (~XMPP_CONN_FLAG_TRUST_TLS));
	}
}