summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Bouthenot <kolter@openics.org>2010-01-29 00:21:02 +0100
committerEmmanuel Bouthenot <kolter@openics.org>2010-01-29 00:21:02 +0100
commit2f176dc3473b5c21acedd4f1ccb54d8a9c3013f2 (patch)
treee40aee16fd4d3524e6a3b2b133aad9063657fc0c
parentc8920da899514575c754971b14aefc265ecdf26a (diff)
downloadweechat-2f176dc3473b5c21acedd4f1ccb54d8a9c3013f2.zip
Fix a build failure with: 1.7.6 < gnutls <= 2.4.6
-rw-r--r--src/plugins/irc/irc-server.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c
index 45c82e9a7..06f6ddf99 100644
--- a/src/plugins/irc/irc-server.c
+++ b/src/plugins/irc/irc-server.c
@@ -2316,7 +2316,11 @@ irc_server_gnutls_callback (void *data, gnutls_session_t tls_session,
}
#if LIBGNUTLS_VERSION_NUMBER >= 0x010706
/* displaying infos about certificate */
+#if LIBGNUTLS_VERSION_NUMBER < 0x020400
+ rinfo = gnutls_x509_crt_print (cert_temp, GNUTLS_X509_CRT_ONELINE, &cinfo);
+#else
rinfo = gnutls_x509_crt_print (cert_temp, GNUTLS_CRT_PRINT_ONELINE, &cinfo);
+#endif
if (rinfo == 0)
{
weechat_printf (server->buffer,
@@ -2393,7 +2397,11 @@ irc_server_gnutls_callback (void *data, gnutls_session_t tls_session,
tls_struct.key.x509 = tls_cert_key;
#if LIBGNUTLS_VERSION_NUMBER >= 0x010706
/* client certificate info */
- rinfo = gnutls_x509_crt_print (tls_cert, GNUTLS_CRT_PRINT_ONELINE, &cinfo);
+#if LIBGNUTLS_VERSION_NUMBER < 0x020400
+ rinfo = gnutls_x509_crt_print (cert_temp, GNUTLS_X509_CRT_ONELINE, &cinfo);
+#else
+ rinfo = gnutls_x509_crt_print (cert_temp, GNUTLS_CRT_PRINT_ONELINE, &cinfo);
+#endif
if (rinfo == 0)
{
weechat_printf (server->buffer,