/[weechat]/weechat/src/common/weechat.c
ViewVC logotype

Diff of /weechat/src/common/weechat.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.47 by flashcode, Tue Jun 21 08:05:58 2005 UTC revision 1.48 by flashcode, Wed Jun 22 21:08:21 2005 UTC
# Line 47  Line 47 
47  #include <sys/stat.h>  #include <sys/stat.h>
48  #include <time.h>  #include <time.h>
49  #include <signal.h>  #include <signal.h>
50    
51    #ifdef HAVE_GNUTLS
52  #include <gnutls/gnutls.h>  #include <gnutls/gnutls.h>
53    #endif
54    
55  #ifdef HAVE_ICONV  #ifdef HAVE_ICONV
56  #include <iconv.h>  #include <iconv.h>
# Line 75  char *local_charset = NULL;     /* local Line 78  char *local_charset = NULL;     /* local
78    
79  int server_cmd_line;    /* at least one server on WeeChat command line      */  int server_cmd_line;    /* at least one server on WeeChat command line      */
80    
81    #ifdef HAVE_GNUTLS
82  gnutls_certificate_credentials gnutls_xcred;   /* gnutls client credentials */  gnutls_certificate_credentials gnutls_xcred;   /* gnutls client credentials */
83    #endif
84    
85    
86  /*  /*
# Line 521  wee_init_vars () Line 526  wee_init_vars ()
526      msgq_last_msg = NULL;      msgq_last_msg = NULL;
527            
528      /* init gnutls */      /* init gnutls */
529        #ifdef HAVE_GNUTLS
530      gnutls_global_init ();      gnutls_global_init ();
531      gnutls_certificate_allocate_credentials (&gnutls_xcred);      gnutls_certificate_allocate_credentials (&gnutls_xcred);
532      gnutls_certificate_set_x509_trust_file (gnutls_xcred, "ca.pem", GNUTLS_X509_FMT_PEM);      gnutls_certificate_set_x509_trust_file (gnutls_xcred, "ca.pem", GNUTLS_X509_FMT_PEM);
533        #endif
534  }  }
535    
536  /*  /*
# Line 617  wee_shutdown (int return_code) Line 624  wee_shutdown (int return_code)
624      if (local_charset)      if (local_charset)
625          free (local_charset);          free (local_charset);
626      alias_free_all ();      alias_free_all ();
627        
628        #ifdef HAVE_GNUTLS
629      gnutls_certificate_free_credentials (gnutls_xcred);      gnutls_certificate_free_credentials (gnutls_xcred);
630      gnutls_global_deinit();      gnutls_global_deinit();
631        #endif
632        
633      exit (return_code);      exit (return_code);
634  }  }
635    

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.48

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26