PinentrySecure

Aus Wiki CCC Göttingen
Zur Navigation springen Zur Suche springen

Who hasn't faced the problem, about an annoying ``gpg-agent``, that neddles you for hours to enter phassphrase for an GPG key. This Problem is history with pinentry-secure, just enter your passphrase in the script and save it to ~/bin/pinentry-secure:

<highlightSyntax language="bash">

  1. !/bin/bash

echo "OK Your orders please" while : do

       read cmd
       [ "$cmd" == "GETPIN" ] && echo "D theverysecurephassphrase OK"
       [ "$cmd" == "BYE" ] && break
       ["$cmd" != "GETPIN" ] && echo "OK"

done </highlightSyntax>

Now we have to use it ~/.gnupg/gpg-agent.conf:

  pinentry-program ~/bin/pinentry-secure
  [...]

relogin and gpg-agent will never asks you again for a passphrase.