"Alexander Semyonov" <[EMAIL PROTECTED]> writes:

> Hi. I am implementing Jabber (XMPP) protocol and I need an example about
> acompleting the starttls procedure with gnutls api (as I understood - switch
> to secure tcp connection on existing unsecure one). I tried Google but
> couldnt find any example. Can someone supply me with it? Thanx.

GNU SASL uses GnuTLS to do STARTTLS for IMAP and SMTP, look at
src/gsasl.c, although it is a rather complex example.  GnuTLS doesn't
care if you use starttls, the API you use are the same, so you could
take a look at the examples in the manual:

http://www.gnu.org/software/gnutls/manual/html_node/Simple-client-example-with-anonymous-authentication.html

Insert your read/write's to negotiate STARTTLS in the unprotected
protocol, right after the call to tcp_connect().

/Simon


_______________________________________________
Help-gnutls mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gnutls

Reply via email to