The change to contrib/smime.rc is based on the Debian patch authored
by Antonio Radici.  Thanks to Todd Zullinger for pointing the patch
out to me.

The list of paths was derived from curl's acinclude.m4 file.  Thanks
to Dan Fandrich for the link to curl's file, and to Todd Zullinger for
some additions to the list.
---

I'm just tossing this out quickly for feedback.  I removed the 4000+
deletion lines of contrib-ca-bundle.crt from the diff below.

My time has been a bit short this weekend, but I'll try to finish this
up later this week after a round of feedback.

I'll also work on the ssl_ca_certificates_file autoconf changes, but
probably not til later in the week or next weekend.

 contrib/Makefile.am   |    2 +-
 contrib/ca-bundle.crt | 4599 -----------------------------------------
 contrib/smime.rc      |   12 +-
 doc/smime-notes.txt   |   11 +-
 4 files changed, 18 insertions(+), 4606 deletions(-)
 delete mode 100644 contrib/ca-bundle.crt

diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index cf8656b4..5fffae7d 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -6,7 +6,7 @@ SAMPLES = Mush.rc Pine.rc gpg.rc pgp2.rc pgp5.rc pgp6.rc Tin.rc 
\
        sample.mailcap sample.muttrc sample.muttrc-sidebar sample.muttrc-tlr \
        sample.muttrc-compress sample.muttrc-starter \
        sample.vimrc-sidebar colors.default colors.linux smime.rc \
-       ca-bundle.crt smime_keys_test.pl mutt_xtitle markdown2html \
+       smime_keys_test.pl mutt_xtitle markdown2html \
        bgedit-detectgui.sh bgedit-screen-tmux.sh \
        mutt_oauth2.py mutt_oauth2.py.README
 
diff --git a/contrib/ca-bundle.crt b/contrib/ca-bundle.crt
deleted file mode 100644
index 12b997d6..00000000
--- a/contrib/ca-bundle.crt
+++ /dev/null
[Removed from email for easier diff perusal]

diff --git a/contrib/smime.rc b/contrib/smime.rc
index ea2df0ce..67798eab 100644
--- a/contrib/smime.rc
+++ b/contrib/smime.rc
@@ -47,7 +47,17 @@
 # unset smime_decrypt_use_default_key
 
 # Path to a file or directory with trusted certificates
-set smime_ca_location="~/.smime/ca-bundle.crt"
+set smime_ca_location=\
+  `for f in \
+  $HOME/.smime/ca-certificates.crt $HOME/.smime/ca-bundle.crt \
+  /etc/ssl/certs/ca-certificates.crt \
+  /etc/pki/tls/certs/ca-bundle.crt \
+  /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem \
+  /usr/share/ssl/certs/ca-bundle.crt \
+  /usr/local/share/certs/ca-root-nss.crt \
+  /etc/ssl/cert.pem \
+  /etc/ssl/certs \
+  ; do if [ -f $f ] ; then echo $f ; exit ; fi ; done`
 
 # Path to where all known certificates go. (must exist!)
 set smime_certificates="~/.smime/certificates"
diff --git a/doc/smime-notes.txt b/doc/smime-notes.txt
index 25ead497..8939af83 100644
--- a/doc/smime-notes.txt
+++ b/doc/smime-notes.txt
@@ -40,11 +40,12 @@ How to add use mutt's S/MIME capabilities
 - Edit the smime_sign_as line in your muttrc, replacing the keyid with your
   own.
 
-- You probably want to import the trusted roots in
-  contrib/ca-bundle.crt. This makes you trust anything that was ultimately
-  signed by one of them. You can use "smime_keys add_root" to do so, or
-  just copy ca-bundle.crt into the place you point mutt's smime_ca_location
-  variable to.
+- The contrib/smime.rc file sets $smime_ca_location to the first
+  ca-bundle.crt or ca-certificates.crt file found in a list of common
+  system locations, starting with ~/.smime.  You can source that file
+  and confirm its value by running ":set ?smime_ca_location" inside
+  Mutt.  If you have a particular set of trusted roots you can to use,
+  then copy that inside ~/.smime.
 
 
 
-- 
2.56.1

Reply via email to