summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-03-10 21:42:49 +0100
committerStef Walter <stefw@gnome.org>2013-03-14 07:02:21 +0100
commit3177cbccb237bfef66721eeb773b574f1d8ba076 (patch)
treee808fcae18a87622ec32d0880b365c7a4c463234
parentdf29c0dcb6cce6a215dee9dc4e17aff59ae67c5b (diff)
Fix up the system anchors/certificates configure arguments
Double check various combinations, and make sure we don't fail needlessly when --disable-trust-module. Also check that actual paths are passed into the arguments.
-rw-r--r--configure.ac35
1 files changed, 20 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index 22bfbaf..66fcff9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -185,20 +185,21 @@ AC_ARG_WITH([system-anchors],
AC_MSG_CHECKING([location of system CA anchors])
-if test "$enable_trust_module" != "yes"; then
+# This option was disabled, no anchors
+if test "$with_system_anchors" = "no"; then
+ with_system_anchors=""
+ AC_MSG_RESULT([disabled])
+
+elif test "$enable_trust_module" != "yes"; then
if test "$with_system_anchors" != ""; then
AC_MSG_ERROR([need --enable-trust-module in order to use system anchors.])
fi
- with_system_anchors="no"
-fi
-
-# This option was disabled, no anchors
-if test "$with_system_anchors" = "no"; then
with_system_anchors=""
AC_MSG_RESULT([disabled])
# Option was not set, try to detect
-elif test "$with_system_anchors" = ""; then
+elif test "$with_system_anchors" = "" -o "$with_system_anchors" = "yes"; then
+ with_system_anchors=""
for f in /etc/pki/tls/certs/ca-bundle.crt \
/etc/ssl/certs/ca-certificates.crt \
/etc/ssl/ca-bundle.pem \
@@ -214,7 +215,9 @@ elif test "$with_system_anchors" = ""; then
fi
AC_MSG_RESULT($with_system_anchors)
+
else
+ # Anchors explicitly set
AC_MSG_RESULT($with_system_anchors)
fi
@@ -228,21 +231,23 @@ AC_ARG_WITH([system-certificates],
AC_MSG_CHECKING([location of additional system certificates])
-if test "$enable_trust_module" != "yes"; then
+# This option was disabled, no additional certificates
+if test "$with_system_certificates" = "no"; then
+ with_system_certificates=""
+ AC_MSG_RESULT([disabled])
+
+elif test "$enable_trust_module" != "yes"; then
if test "$with_system_certificates" != ""; then
AC_MSG_ERROR([need --enable-trust-module in order to use additional system certificates.])
fi
with_system_certificates=""
-fi
+ AC_MSG_RESULT([disabled])
-# This option was disabled, no additional certificates
-if test "$with_system_certificates" = "no"; then
- with_system_certificates=""
-fi
+elif test "$with_system_certificates" = "yes"; then
+ AC_MSG_ERROR([--with-system-certificates requires paths as an argument])
-if test "$with_system_certificates" = ""; then
- AC_MSG_RESULT([disabled])
else
+ # Anchors explicitly set
AC_MSG_RESULT($with_system_certificates)
fi