2 set smime_ca_location=`for f in $HOME/.smime/ca-certificates.crt $HOME/.smime/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt ; do if [ -f $f ] ; then echo $f ; exit ; fi ; done`
3 set smime_certificates="~/.smime/certificates"
4 set smime_keys="~/.smime/keys"
5 set smime_pk7out_command="openssl smime -verify -in %f -noverify -pk7out"
6 set smime_get_cert_command="openssl pkcs7 -print_certs -in %f"
7 set smime_get_signer_cert_command="openssl smime -verify -in %f -noverify -signer %c -out /dev/null"
8 set smime_get_cert_email_command="openssl x509 -in %f -noout -email"
9 set smime_import_cert_command="smime_keys add_cert %f"
10 set smime_encrypt_command="openssl smime -encrypt %a -outform DER -in %f %c"
11 set smime_sign_command="openssl smime -sign -signer %c -inkey %k -passin stdin -in %f -certfile %i -outform DER"
12 # This alternative command does not include the full certificates chain.
13 # Be sure to understand RFC 2315 section 9.1 before using it.
14 #set smime_sign_command="openssl smime -sign -signer %c -inkey %k -passin stdin -in %f -outform DER"
15 set smime_decrypt_command="openssl smime -decrypt -passin stdin -inform DER -in %f -inkey %k -recip %c"
16 set smime_verify_command="openssl smime -verify -inform DER -in %s %C -content %f"
17 set smime_verify_opaque_command="\
18 openssl smime -verify -inform DER -in %s %C || \
19 openssl smime -verify -inform DER -in %s -noverify 2>/dev/null"