summaryrefslogtreecommitdiff
path: root/src/irc/irc-server.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-06-21 08:05:58 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-06-21 08:05:58 +0000
commitf4abd0bf59fb8ec6eaded3fde4c52bbec293e388 (patch)
tree3c6c0c274932c54c7fd03846b97e1729d9e8fac6 /src/irc/irc-server.c
parentabe7e081478f3c22a0407d08b5a4d059dd7e44f3 (diff)
downloadweechat-f4abd0bf59fb8ec6eaded3fde4c52bbec293e388.zip
Added certificate management in SSL (connection now ok with SSL server)
Diffstat (limited to 'src/irc/irc-server.c')
-rw-r--r--src/irc/irc-server.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/irc/irc-server.c b/src/irc/irc-server.c
index 3497a724c..0e0c44b0b 100644
--- a/src/irc/irc-server.c
+++ b/src/irc/irc-server.c
@@ -878,8 +878,7 @@ server_connect (t_irc_server *server)
{
int child_pipe[2], set;
pid_t pid;
- const int proto_prio[] = { GNUTLS_TLS1, GNUTLS_SSL3, 0 };
- const int kx_prio[] = { GNUTLS_KX_ANON_DH, 0 };
+ const int cert_type_prio[] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 };
irc_display_prefix (server->buffer, PREFIX_INFO);
gui_printf (server->buffer,
@@ -904,9 +903,8 @@ server_connect (t_irc_server *server)
return 0;
}
gnutls_set_default_priority (server->gnutls_sess);
- gnutls_protocol_set_priority (server->gnutls_sess, proto_prio);
- gnutls_kx_set_priority (server->gnutls_sess, kx_prio);
- gnutls_credentials_set (server->gnutls_sess, GNUTLS_CRD_ANON, &gnutls_anoncred);
+ gnutls_certificate_type_set_priority (server->gnutls_sess, cert_type_prio);
+ gnutls_credentials_set (server->gnutls_sess, GNUTLS_CRD_CERTIFICATE, gnutls_xcred);
}
/* create pipe for child process */