help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gnutls] Re: STARTTLS example using GnuTLS C api


From: Simon Josefsson
Subject: [Help-gnutls] Re: STARTTLS example using GnuTLS C api
Date: Thu, 11 Jan 2007 15:05:58 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.92 (gnu/linux)

"Alexander Semyonov" <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]