1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 22:06:38 +02:00

Added certificate management in SSL (connection now ok with SSL server)

This commit is contained in:
Sebastien Helleu
2005-06-21 08:05:58 +00:00
parent abe7e08147
commit f4abd0bf59
10 changed files with 24 additions and 26 deletions
+4 -3
View File
@@ -75,7 +75,7 @@ char *local_charset = NULL; /* local charset, for example: ISO-8859-1 */
int server_cmd_line; /* at least one server on WeeChat command line */
gnutls_anon_client_credentials gnutls_anoncred; /* gnutls client credentials */
gnutls_certificate_credentials gnutls_xcred; /* gnutls client credentials */
/*
@@ -522,7 +522,8 @@ wee_init_vars ()
/* init gnutls */
gnutls_global_init ();
gnutls_anon_allocate_client_credentials (&gnutls_anoncred);
gnutls_certificate_allocate_credentials (&gnutls_xcred);
gnutls_certificate_set_x509_trust_file (gnutls_xcred, "ca.pem", GNUTLS_X509_FMT_PEM);
}
/*
@@ -616,7 +617,7 @@ wee_shutdown (int return_code)
if (local_charset)
free (local_charset);
alias_free_all ();
gnutls_anon_free_client_credentials (gnutls_anoncred);
gnutls_certificate_free_credentials (gnutls_xcred);
gnutls_global_deinit();
exit (return_code);
}
+1 -1
View File
@@ -108,7 +108,7 @@
extern int quit_weechat;
extern char *weechat_home;
extern char *local_charset;
extern gnutls_anon_client_credentials gnutls_anoncred;
extern gnutls_certificate_credentials gnutls_xcred;
extern void wee_log_printf (char *, ...);
extern void wee_dump (int);