[jdev] steps to complete tls negotiation

Chris Mullins chris.mullins at coversant.net
Wed Aug 9 16:48:58 CDT 2006

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:




Chris Mullins




From: jdev-bounces at jabber.org [mailto:jdev-bounces at jabber.org] 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



   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

            System.out.println("*** Start
            SSLSocketFactory sslFactory = sc.getSocketFactory();
            sslSocket = (SSLSocket) sslFactory.createSocket
            sslSocket.setSoTimeout(10000); //10 sec
            sslSocket.startHandshake ();
            System.out.println("// 2- --------------------
// -----------------------------   TLS negotiation is ended.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20060809/66252924/attachment-0002.htm>

More information about the JDev mailing list