On Sun, Nov 15, 2026 at 10:20:44AM -0500, Todd Zullinger wrote:
Kevin J. McCarthy wrote:
+- 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.

I don't know the S/MIME stuff enough to test this, but I
wonder if simply not specifying `smime_ca_location` results
in using the system OpenSSL cert store -- on distributions
which set a default store?

In openssl-smime(1ossl), the -CAfile/-CApath options refer
to openssl-verification-options(1ossl) which has this in the
"Trusted Certificate Options" section:

  Note that OpenSSL does not provide a default set of trust
  anchors.  Many Linux distributions include a system
  default and configure OpenSSL to point to that.

If someone familiar with S/MIME could test that (and/or
explain how to do so easily), maybe the docs could note that
as an option which might be more suitable for many users?
(It's just a bonus if it mean less future adjustment to the
path list.)

I think this would require updating the sample smime.rc too, to make %C optional:

# Verify a signature of type multipart/signed
- set smime_verify_command="openssl smime -verify -inform DER -in %s %C -content 
%f"
+ set smime_verify_command="openssl smime -verify -inform DER -in %s %?C?%C? 
-content %f"

# Verify a signature of type application/pkcs7-mime
set smime_verify_opaque_command="\
- openssl smime -verify -inform DER -in %s %C || \
+ openssl smime -verify -inform DER -in %s %?C?%C? || \
openssl smime -verify -inform DER -in %s -noverify 2>/dev/null"

I haven't had the proper system setup to test s/mime in a while, but perhaps this is a better approach than the scan in the previous patch.

If so, I'll change that patch to simply remove the contrib/ca-bundle.crt instead, and we can try changing the smime.rc instead in a separate patch.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to