GTlsClientConnection and STARTTLS
- From: Eric Gregory <eric yorba org>
- To: gtk-list gnome org
- Cc: jim <jim yorba org>
- Subject: GTlsClientConnection and STARTTLS
- Date: Mon, 27 Feb 2012 15:15:24 -0800
I'm running into some trouble trying to add STARTTLS support to an GLib-based SMTP client. (Hopefully I'm sending this to the right place.)
According to the docs for g_tls_connection_handshake(), a handshake will occur automatically after STARTTLS is issued. That doesn't make a whole lot of sense to me, since (as far as I can tell) you can't use a GTlsClientConnection for a plain, non-encrypted connection.
I would expect that I'd have to connect in the plain with a normal GSocketClient, issue a STARTTLS, and finally wrap the GSocketConnection with a GTlsClientConnection and do a handshake. But that isn't working for me either; according to Wireshark I'm getting an Encrypted Alert with an invalid message.
So my question is: is the doc correct? If so, how do I go about using GTlsClientConnection with STARTTLS? If not, is GLib capable of handling STARTTLS, or do I need to use GnuTLS directly?
Thanks,
- Eric
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]