diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2021-02-13 10:36:38 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2021-02-13 11:22:04 +0000 |
commit | c7040ae3ada22c7a47253e59e8a354a0b1b18e00 (patch) | |
tree | 3d8ede2bb031c0ac51a26039abe98c8ac3dd246c /acinclude.m4 | |
parent | Doc fix (diff) | |
download | w3m-c7040ae3ada22c7a47253e59e8a354a0b1b18e00.tar.gz w3m-c7040ae3ada22c7a47253e59e8a354a0b1b18e00.zip |
Add auto-detection of ssl_ca_file by configure
cf. gnutls-trustfiles in Emacs 27.1
<https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/net/gnutls.el?h=emacs-27.1#n106>
Diffstat (limited to '')
-rw-r--r-- | acinclude.m4 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index b09f4e6..7a63260 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -510,6 +510,26 @@ if test x"$with_ssl" != xno; then AC_MSG_RESULT($enable_sslverify) fi fi +AC_SUBST(DEF_CAFILE) +w3m_cafile="" +if test x"$enable_sslverify" = xyes; then + AC_MSG_CHECKING(for CA bundle location) + AC_ARG_WITH(cafile, + [ --with-cafile=CAFILE CA file to verify SSL certificate], + [w3m_cafile="$with_cafile"],[ + for f in /etc/ssl/certs/ca-certificates.crt \ + /etc/pki/tls/certs/ca-bundle.crt \ + /etc/ssl/ca-bundle.pem \ + /usr/ssl/certs/ca-bundle.crt \ + /usr/local/share/certs/ca-root-nss.crt \ + /etc/ssl/cert.pem \ + /etc/certs/ca-certificates.crt; do + if test -f "$f" -a -r "$f"; then w3m_cafile="$f"; break; fi + done + ]) + AC_MSG_RESULT($w3m_cafile) +fi +AC_DEFINE_UNQUOTED(DEF_CAFILE, "$w3m_cafile") AC_SUBST(USE_DIGEST_AUTH) AC_MSG_CHECKING(if digest auth is enabled) AC_ARG_ENABLE(digest_auth, |