playing with ecc in batch mode
Werner Koch
wk at gnupg.org
Fri Feb 4 06:50:58 CET 2011
On Thu, 3 Feb 2011 22:53, sergi at calcurco.cat said:
> Also I have tried with '--passphrase' parameter, the
> '--passphrase-file', and the batch command 'Passphrase'. Without
> success, always the popup.
You can't use that. The regression tests use this to seed the
passphrase cache:
gpg-preset-passphrase --preset -P def 50B2D4FA4122C212611048BC5FC31BD44393626E
You also need to use the --allow-preset-passphrase in gpg-agent.conf.
Obviously it does not work while generating keys.
Another, more flexible way, is to write your own pinentry which loops
back to your test script. gpg passes the envvar PINENTRY_USER_DATA all
the way up to the pinentry; this can be used to convey a context.
For testing we have the %no-protection batch parameter:
$GPG --quiet --batch --gen-key <<EOF
Key-Type: DSA
Key-Length: 1024
Subkey-Type: ELG
Subkey-Length: 1024
Name-Real: Harry H.
Name-Comment: test key
Name-Email: hh@@ddorf.de
Expire-Date: 1
%no-protection
%transient-key
%commit
EOF
Salam-Shalom,
Werner
--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
More information about the Gnupg-devel
mailing list