# HG changeset patch # User William Ehlhardt # Date 1180131987 0 # Node ID fe571cfcf2258048358cd7f0e0a1f55b0e736cb6 # Parent ba768014f91f9495614b219ef2286f898792f0d9 - Made a big mess of stuff in the GnuTLS pluging to look at cert auth diff -r ba768014f91f -r fe571cfcf225 libpurple/plugins/ssl/ssl-gnutls.c --- a/libpurple/plugins/ssl/ssl-gnutls.c Fri May 25 20:52:31 2007 +0000 +++ b/libpurple/plugins/ssl/ssl-gnutls.c Fri May 25 22:26:27 2007 +0000 @@ -24,12 +24,14 @@ #include "plugin.h" #include "sslconn.h" #include "version.h" +#include "util.h" #define SSL_GNUTLS_PLUGIN_ID "ssl-gnutls" #ifdef HAVE_GNUTLS #include +#include typedef struct { @@ -94,6 +96,67 @@ } else { purple_debug_info("gnutls", "Handshake complete\n"); + { + const gnutls_datum_t *cert_list; + unsigned int cert_list_size = 0; + gnutls_session_t session=gnutls_data->session; + + cert_list = + gnutls_certificate_get_peers(session, &cert_list_size); + + purple_debug_info("gnutls", + "Peer provided %d certs\n", + cert_list_size); + int i; + for (i=0; iconnect_cb(gsc->connect_cb_data, gsc, cond); }