Page MenuHome GnuPG

GnuPG in batch mode fails to sign keys which expire
Closed, ResolvedPublic

Description

Release: 1.4.0

Environment

All

Description

in g10/keyedit.c:813 (of 1.4..0 tarball) the follow occurs:

answer=cpr_get("sign_uid.expire",
             _("Do you want your signature to "
               "expire at the same time? (Y/n) "));
if(answer_is_yes_no_default(answer,1))

In batch mode this causes gpg to fail, even with --yes:

This key is due to expire on 2005-06-17.
gpg: Sorry, we are in batchmode - can't get input

Fix

--sign-key is a limited shortcut for --edit-key, sign. It can handle only the most common things. Obviously there is no way to do this in unattended mode (--batch). If you are writing a wrapper, you should make use of --status-fd and --command-fd. Ask on gnupg-users@gnupg.org for more advise.