On Sat, Feb 23, 2013 at 1:58 PM, C K Kashyap <ckkashyap@gmail.com> wrote:
What I am really looking for is a small sample code that demonstrates how TLS package can be used to connect to a webserver or imapserver.

TLS isn't actually SSL, despite SSL getting blessed as "TLS 0.9". Various attempts at TLS-enabled web protocols have foundered, so you won't find much code to speak TLS to web servers. (SSL is negotiated at socket connect time and involves no protocol commands.) In short, sample code that can do https would be completely useless for comparing to TLS-enabled code.

IMAP is somewhat harder than SMTP; I suggest you read up on the protocol. I've done a fair amount of work with it, and still would have to refer to the RFC to establish a connection without the help of an existing IMAP library.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net