Changeset - 08103482cfb6
[Not reviewed]
0 3 0
Jan Kaluza - 13 years ago 2012-09-05 15:20:29
hanzz.k@gmail.com
Added purple.cacerts variable to set path to certificates, default it ./ca-certs
3 files changed with 20 insertions and 2 deletions:
0 comments (0 inline, 0 general)
backends/libpurple/main.cpp
Show inline comments
 
@@ -1533,9 +1533,18 @@ static bool initPurple() {
 
		return false;
 
	}
 

	
 
	purple_plugins_add_search_path_wrapped("./plugins");
 
	std::string pluginsDir = CONFIG_STRING_DEFAULTED(config, "purple.plugins_dir", "./plugins");
 
	LOG4CXX_INFO(logger, "Setting libpurple plugins directory to: " << pluginsDir);
 
	purple_plugins_add_search_path_wrapped(pluginsDir.c_str());
 

	
 
	purple_util_set_user_dir_wrapped("./");
 
	std::string cacertsDir = CONFIG_STRING_DEFAULTED(config, "purple.cacerts_dir", "./ca-certs");
 
	LOG4CXX_INFO(logger, "Setting libpurple plugins directory to: " << cacertsDir);
 
	purple_certificate_add_ca_search_path_wrapped(cacertsDir.c_str());
 
 
 
	std::string userDir = CONFIG_STRING_DEFAULTED(config, "service.working_dir", "./");
 
	LOG4CXX_INFO(logger, "Setting libpurple user directory to: " << userDir);
 

	
 
	purple_util_set_user_dir_wrapped(userDir.c_str());
 
	remove("./accounts.xml");
 
	remove("./blist.xml");
 

	
backends/libpurple/purple_defs.cpp
Show inline comments
 
@@ -44,6 +44,7 @@ purple_blist_get_handle_wrapped_fnc purple_blist_get_handle_wrapped = NULL;
 
purple_xfer_ui_ready_wrapped_fnc purple_xfer_ui_ready_wrapped = NULL;
 
purple_xfer_request_accepted_wrapped_fnc purple_xfer_request_accepted_wrapped = NULL;
 
purple_xfer_request_denied_wrapped_fnc purple_xfer_request_denied_wrapped = NULL;
 
purple_certificate_add_ca_search_path_wrapped_fnc purple_certificate_add_ca_search_path_wrapped = NULL;
 
purple_xfer_get_account_wrapped_fnc purple_xfer_get_account_wrapped = NULL;
 
purple_xfer_get_filename_wrapped_fnc purple_xfer_get_filename_wrapped = NULL;
 
purple_xfer_get_size_wrapped_fnc purple_xfer_get_size_wrapped = NULL;
 
@@ -194,6 +195,10 @@ bool resolvePurpleFunctions() {
 
	if (!purple_util_set_user_dir_wrapped)
 
		return false;
 

	
 
	purple_certificate_add_ca_search_path_wrapped = (purple_util_set_user_dir_wrapped_fnc)GetProcAddress(f_hPurple, "purple_certificate_add_ca_search_path");
 
	if (!purple_certificate_add_ca_search_path_wrapped)
 
		return false;
 

	
 
	purple_blist_node_get_type_wrapped = (purple_blist_node_get_type_wrapped_fnc)GetProcAddress(f_hPurple, "purple_blist_node_get_type");
 
	if (!purple_blist_node_get_type_wrapped)
 
		return false;
backends/libpurple/purple_defs.h
Show inline comments
 
@@ -353,6 +353,9 @@ extern purple_plugin_action_free_wrapped_fnc purple_plugin_action_free_wrapped;
 
typedef void  (_cdecl * purple_plugins_add_search_path_wrapped_fnc)(const char *path);
 
extern purple_plugins_add_search_path_wrapped_fnc purple_plugins_add_search_path_wrapped;
 

	
 
typedef void  (_cdecl * purple_certificate_add_ca_search_path_wrapped_fnc)(const char *path);
 
extern purple_certificate_add_ca_search_path_wrapped_fnc purple_certificate_add_ca_search_path_wrapped;
 

	
 
typedef PurpleConnectionState  (_cdecl * purple_connection_get_state_wrapped_fnc)(const PurpleConnection *gc);
 
extern purple_connection_get_state_wrapped_fnc purple_connection_get_state_wrapped;
 

	
 
@@ -542,6 +545,7 @@ extern wpurple_g_io_channel_win32_new_socket_wrapped_fnc wpurple_g_io_channel_wi
 
#define purple_conversations_set_ui_ops_wrapped purple_conversations_set_ui_ops
 
#define purple_conversations_get_handle_wrapped purple_conversations_get_handle
 
#define purple_plugin_action_free_wrapped purple_plugin_action_free
 
#define purple_certificate_add_ca_search_path_wrapped purple_certificate_add_ca_search_path
 
#define purple_plugins_add_search_path_wrapped purple_plugins_add_search_path
 
#define purple_connection_get_state_wrapped purple_connection_get_state
 
#define purple_connection_get_account_wrapped purple_connection_get_account
0 comments (0 inline, 0 general)