commit 9a31459d00a34416119408bae44400e7b1b45d1e 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..6984e8d 100644 --- a/configure.ac +++ b/configure.ac @@ -93,6 +93,11 @@ TP_COMPILER_WARNINGS([ERROR_CFLAGS], [test "x$official_release" = xno], unused-parameter]) AC_SUBST([ERROR_CFLAGS]) +AC_ARG_WITH(ca-certificates, + AC_HELP_STRING([--with-ca-certificates],[path to CA certificates @<:@default=/etc/ssl/certs/ca-certificates.crt@:>@]), + ca_certificates_path="$withvalue", ca_certificates_path="/etc/ssl/certs/ca-certificates.crt") +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 (),