Your best bet by far is to go with an existing client library that will allow you to focus on writing your client, rather than trying to figure out the protocol details that have already been solved and neatly wrapped up for your use.

 

There are a number of Java client libraries out there you can use, all of which are listed at:

http://www.jabber.org/software/libraries.shtml

 

--

Chris Mullins

http://www.coversant.net/blogs/cmullins

 

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hussam Shalaby
Sent: Wednesday, August 09, 2006 1:41 PM
To: Jabber software development list
Subject: Re: [jdev] steps to complete tls negotiation

 

Ali,

   I am a newbi to jabber and in the process to build my own client in java, I spent a couple of days until I figured the TLS part, the code is in java and I hope you can apply same to .net

 

 

//might need to build your trustAllCerts

   SSLContext sc = SSLContext.getInstance("SSL");
            sc.init(null, trustAllCerts, new java.security.SecureRandom());

            System.out.println("*** Start sslSocket............................");
            SSLSocketFactory sslFactory = sc.getSocketFactory();
            sslSocket = (SSLSocket) sslFactory.createSocket (JABBER_SERVER_ADDRESS, JABBER_SERVER_SPORT);
            sslSocket.setSoTimeout(10000); //10 sec
            sslSocket.setKeepAlive(true);
            sslSocket.setUseClientMode(true);
            sslSocket.startHandshake ();
            System.out.println("// 2- -------------------- Completed\n\n\n");
// -----------------------------   TLS negotiation is ended.



 

 

Reply via email to