Project

General

Profile

How we can set "SSL_CERTIFICATE_VALIDATOR" and "SEE_OTHER_HOST_KEY" ?

Cyrus Akbarpour
Added over 1 year ago

Hi Team,

We just tried to create a connection to Tigase server.Hostname and Port number added in the code, but "SSL_CERTIFICATE_VALIDATOR" and "SEE_OTHER_HOST_KEY" are the two fields not available for us.Currently, we are not able to create a connection. These two fields are mandatory or not? Normally we create a connection using Hostname and Port.From where i can get this "SSL_CERTIFICATE_VALIDATOR" and "SEE_OTHER_HOST_KEY"? Please help..

Regards,

Naveen.


Replies (1)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 1 year ago

I do not understand why you would need to use SSL_CERTIFICATE_VALIDATOR or SEE_OTHER_HOST_KEY for the creation of a simple connection to Tigase XMPP Server. In a typical use all you need to do is to write code similar to this one:

var client = XMPPClient();

// register required modules

let jid = BareJID(userJID);
client.connectionConfiguration.setUserJID(jid);
client.connectionConfiguration.setUserPassword(password);

// start connection establishment
client.login();

Examples like the one above are part of a TigaseSwift documentation available at http://docs.tigase.org/tigase-swift/snapshot/Tigase_Swift_Guide/html/

SSL_CERTIFICATE_VALIDATOR property needs to be set only if SSL certificate server by your XMPP server is not valid or not accepted by default SSL certificate validator.

SEE_OTHER_HOST_KEY property needs to be set to false only if you want to disable this feature in a client library. In the typical use case, it should be left unset.

From your questions, I assume that you are trying to use SocketConnector class directly to establish a connection to XMPP server. I would suggest using XMPPClient class as it was created as a base class for the establishment of client connections to XMPP server.

    (1-1/1)