Is it possible to use self-signed SMIME certs with Mutt?

1

I'm trying to use a self-signed SMIME key that my company has issued me with Mutt. However, when I try to import it with smime_keys I get the following.

Couldn't identify root certificate!
No root and no intermediate certificates. Can't continue. at /usr/bin/smime_keys line 708.

I'm using Mutt on OSX recently installed using Homebrew. Does anyone know a way to force smime_keys to accept my self-signed certificate? Can I add the signing certificate my company uses to some authoritative Root CA file somewhere?

##########
# UPDATE #
##########

OK, so I was able to get smime_keys to accept my self-signed certificate by first adding my company's root CA via smime_keys add_root root-ca.cer. Now, however, when I try to decrypt an encrypted email to me Mutt asks me for my encryption certificate's password and once I enter it I get a message saying Could not copy message. When I try to send a signed or encrypted email from Mutt, after entering in my certificate's password I get a message saying Can't open OpenSSL subprocess!: No such file or directory (errno = 2).

Some additional info - when I run Mutt in debug mode mutt -d 3 and try to decrypt an encrypted email to me, I see the following in .muttdebug0.

Failed on attachment of type application/pkcs7-mime.
Bailing on attachment of type application/pkcs7-mime.
Could not copy message

Any ideas?

Bryan

Posted 2014-06-10T00:04:57.170

Reputation: 513

Answers

2

Alright, so I was able to figure out what the heck I was doing wrong here. It comes down to me not having sourced the smime.rc file such that Mutt knew what OpenSSL commands to use when trying to sign/verify and encrypt/decrypt messages.

As an aside, just in case this is useful to anyone, I also figured out how to ensure I can read encrypted emails that I've sent to others when I look at them in my sent folder.

In smime.rc, update the smime_encrypt_command to tack your public encryption certificate onto the end of the openssl command. For example:

set smime_encrypt_command="openssl smime -encrypt -%a -outform DER -in %f %c ~/.smime/certificates/123456789.0"

Where certificate 123456789.0 is your public certificate for S/MIME encryption. Just for completion, %a is the variable for which method of encryption to use, %f is the variable for the email text being encrypted, and %c is the variable for the recipient(s) of the email.

Bryan

Posted 2014-06-10T00:04:57.170

Reputation: 513

Specifically, %f is the path to a text file containing the plaintext, and %c is the path to the recipients' certificates – Michael Mrozek – 2015-10-20T20:47:07.253