commit de8928a72852692540a376e1a3c956c88b3672ec Author: Nicolas Dufresne Date: Wed Aug 25 16:18:30 2010 -0400 Make CA certificates path configurable This patch allow configuring the CA certificates path variable. It create a new variable in config.h name CA_CERTIFICATES_PATH that can be configured by passing CA_CERTIFICATES_PATH= to configure script. diff --git a/configure.ac b/configure.ac index ff61171..df750f3 100644 --- a/configure.ac +++ b/configure.ac @@ -93,6 +93,12 @@ TP_COMPILER_WARNINGS([ERROR_CFLAGS], [test "x$official_release" = xno], unused-parameter]) AC_SUBST([ERROR_CFLAGS]) +AC_ARG_VAR(CA_CERTIFICATES_PATH,[path to CA certificates @<:@default=/etc/ssl/certs/ca-certificates.crt@:>@]) +if test "x${CA_CERTIFICATES_PATH}" = "x"; then + CA_CERTIFICATES_PATH="/etc/ssl/certs/ca-certificates.crt" +fi +AC_DEFINE_UNQUOTED(CA_CERTIFICATES_PATH, ["${CA_CERTIFICATES_PATH}"], [Path to CA certificates]) + AC_ARG_ENABLE(debug, AC_HELP_STRING([--disable-debug],[compile without debug code]), enable_debug=$enableval, enable_debug=yes ) diff --git a/src/connection.c b/src/connection.c index 1a4c736..93f2296 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1974,8 +1974,7 @@ _gabble_connection_connect (TpBaseConnection *base, g_free (jid); /* system certs */ - wocky_tls_handler_add_ca (tls_handler, - "/etc/ssl/certs/ca-certificates.crt"); + wocky_tls_handler_add_ca (tls_handler, CA_CERTIFICATES_PATH); /* user certs */ user_certs_dir = g_build_filename (g_get_user_config_dir (),