comparison mcabber/src/main.c @ 1167:9726c78a91f3

Allow '~' (HOME directory) in config options
author Mikael Berthe <mikael@lilotux.net>
date Sun, 18 Feb 2007 11:03:49 +0100
parents 910e2cce49b3
children 960f34ec22a2
comparison
equal deleted inserted replaced
1166:c4da23bf8958 1167:9726c78a91f3
69 const char *proxy_host; 69 const char *proxy_host;
70 char *bjid; 70 char *bjid;
71 int ssl; 71 int ssl;
72 int sslverify = -1; 72 int sslverify = -1;
73 const char *sslvopt = NULL, *cafile = NULL, *capath = NULL, *ciphers = NULL; 73 const char *sslvopt = NULL, *cafile = NULL, *capath = NULL, *ciphers = NULL;
74 char *cafile_xp = NULL, *capath_xp = NULL;
74 unsigned int port; 75 unsigned int port;
75 76
76 servername = settings_opt_get("server"); 77 servername = settings_opt_get("server");
77 username = settings_opt_get("username"); 78 username = settings_opt_get("username");
78 password = settings_opt_get("password"); 79 password = settings_opt_get("password");
110 "** Warning: SSL is NOT available, ignoring ssl-related setting"); 111 "** Warning: SSL is NOT available, ignoring ssl-related setting");
111 ssl = sslverify = 0; 112 ssl = sslverify = 0;
112 cafile = capath = ciphers = NULL; 113 cafile = capath = ciphers = NULL;
113 } 114 }
114 #endif 115 #endif
115 cw_set_ssl_options(sslverify, cafile, capath, ciphers, servername); 116 if (cafile) cafile_xp = expand_filename(cafile);
117 if (capath) capath_xp = expand_filename(capath);
118 cw_set_ssl_options(sslverify, cafile_xp, capath_xp, ciphers, servername);
119 g_free(cafile_xp);
120 g_free(capath_xp);
116 121
117 /* Connect to server */ 122 /* Connect to server */
118 scr_LogPrint(LPRINT_NORMAL|LPRINT_DEBUG, "Connecting to server: %s", 123 scr_LogPrint(LPRINT_NORMAL|LPRINT_DEBUG, "Connecting to server: %s",
119 servername); 124 servername);
120 if (port) 125 if (port)