[MlMt] GPG passphrase issues

list at felix-kling.de list at felix-kling.de
Sat Sep 7 17:29:41 EDT 2013



On 7 Sep 2013, at 22:13, Benny Kjær Nielsen wrote:

> You can enable some related debug output from MailMate like this:
>
> 	defaults write com.freron.MailMate MmDebugSecurity -bool YES
>
> Then launch MailMate from the Terminal to see the output when MailMate 
> tries to sign a message:
>
> 	/Applications/MailMate.app/Contents/MacOS/MailMate
>
> Most importantly, MailMate outputs the `gpg2` command with arguments. 
> Based on that you might be able to reproduce the problem in a Terminal 
> window without using MailMate.

Ok, that helped! At least I know now what the problem is.

The command that MailMate executes is:

     gpg2 --no-verbose --batch --no-tty --openpgp --status-fd 2 
--digest-algo SHA1 --textmode --armor --detach-sign --local-user "<…>"

and the full error message is:

     Result: Failure
     Output string (0): ""
     Detail: [GNUPG:] USERID_HINT 9C791B1A2ADC63E5 Felix Kling <…>
     Detail: [GNUPG:] NEED_PASSPHRASE 9C791B1A2ADC63E5 9C791B1A2ADC63E5 
17 0
     Detail: [GNUPG:] GOOD_PASSPHRASE
     Detail: [GNUPG:] BEGIN_SIGNING H2
     Detail: gpg: DSA key 2ADC63E5 requires a 224 bit or larger hash
     Detail: gpg: signing failed: General error

So, the problem seems to be the option `--digest-algo SHA1` (sha1 
generates a 160 bit hash). If I remove it, I can sign a file 
successfully. This might be because my key is 2048 bit, I don't really 
know though. The gpg2 documentation says about the `--digest-algo` 
option:

> Use  name  as the message digest algorithm. Running the program with 
> the command `--version` yields a list of supported algorithms. In 
> general, you do not want to use this option as it allows you to 
> violate the OpenPGP standard. `--personal-digest-preferences` is the 
> safe way to accomplish the same thing.

I don't have enough knowledge about gpg2 to say which option really is 
required and which isn't. Maybe you can make it possible (somehow) to 
let the user modify the options that are passed to gpg2? (as hidden 
preference or something like that).


But regardless this issue, I wanted to tell you that you did a really 
great job with MailMate. It's exactly what I was looking for :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20130907/1424abbe/attachment.html>


More information about the mailmate mailing list