Mercurial > pidgin
comparison libpurple/plugins/ssl/ssl-gnutls.c @ 18938:f2ddc4b10d72
- Add debugging babble
author | William Ehlhardt <williamehlhardt@gmail.com> |
---|---|
date | Fri, 22 Jun 2007 03:58:35 +0000 |
parents | cb9d2b9ad6bc |
children | f393eddab077 |
comparison
equal
deleted
inserted
replaced
18937:eac58c6caae7 | 18938:f2ddc4b10d72 |
---|---|
111 | 111 |
112 purple_ssl_close(gsc); | 112 purple_ssl_close(gsc); |
113 } else { | 113 } else { |
114 purple_debug_info("gnutls", "Handshake complete\n"); | 114 purple_debug_info("gnutls", "Handshake complete\n"); |
115 | 115 |
116 /* TODO: Remove all this debugging babble */ | |
117 /* Now we are cooking with gas! */ | |
118 PurpleSslOps *ops = purple_ssl_get_ops(); | |
119 GList * peers = ops->get_peer_certificates(gsc); | |
120 | |
121 PurpleCertificateScheme *x509 = | |
122 purple_certificate_find_scheme("x509"); | |
123 | |
124 GList * l; | |
125 for (l=peers; l; l = l->next) { | |
126 PurpleCertificate *crt = l->data; | |
127 GByteArray *z = | |
128 x509->get_fingerprint_sha1(crt); | |
129 gchar * fpr = | |
130 purple_base16_encode_chunked(z->data, | |
131 z->len); | |
132 | |
133 purple_debug_info("gnutls/x509", | |
134 "Key print: %s\n", | |
135 fpr); | |
136 | |
137 /* Kill the cert! */ | |
138 x509->destroy_certificate(crt); | |
139 | |
140 g_free(fpr); | |
141 g_byte_array_free(z, TRUE); | |
142 } | |
143 g_list_free(peers); | |
144 | |
116 { | 145 { |
117 const gnutls_datum_t *cert_list; | 146 const gnutls_datum_t *cert_list; |
118 unsigned int cert_list_size = 0; | 147 unsigned int cert_list_size = 0; |
119 gnutls_session_t session=gnutls_data->session; | 148 gnutls_session_t session=gnutls_data->session; |
120 | 149 |