* keyedit.c (sign_uids): Don't prompt for setting signature expiry to
authorDavid Shaw <dshaw@jabberwocky.com>
Fri, 22 Jul 2005 16:42:48 +0000 (16:42 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Fri, 22 Jul 2005 16:42:48 +0000 (16:42 +0000)
match key expiry unless --ask-cert-expire is set.  Suggested by Peter
Palfrader.

g10/ChangeLog
g10/keyedit.c

index 74142c9..a27c709 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-22  David Shaw  <dshaw@jabberwocky.com>
+
+       * keyedit.c (sign_uids): Don't prompt for setting signature expiry
+       to match key expiry unless --ask-cert-expire is set.  Suggested by
+       Peter Palfrader.
+
 2005-07-22  Werner Koch  <wk@g10code.com>
 
        * g10.c, options.h: New option --exit-on-status-write-error.
index c058747..c62e2e3 100644 (file)
@@ -835,28 +835,30 @@ sign_uids( KBNODE keyblock, STRLIST locusr, int *ret_modified,
              }
            else
              {
-               char *answer;
-
                tty_printf(_("This key is due to expire on %s.\n"),
                           expirestr_from_pk(primary_pk));
 
-               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))
+               if(opt.ask_cert_expire)
                  {
-                   /* This fixes the signature timestamp we're going
-                      to make as now.  This is so the expiration date
-                      is exactly correct, and not a few seconds off
-                      (due to the time it takes to answer the
-                      questions, enter the passphrase, etc). */
-                   timestamp=now;
-                   duration=primary_pk->expiredate-now;
-                   force_v4=1;
-                 }
+                   char *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))
+                     {
+                       /* This fixes the signature timestamp we're
+                          going to make as now.  This is so the
+                          expiration date is exactly correct, and not
+                          a few seconds off (due to the time it takes
+                          to answer the questions, enter the
+                          passphrase, etc). */
+                       timestamp=now;
+                       duration=primary_pk->expiredate-now;
+                       force_v4=1;
+                     }
 
-               cpr_kill_prompt();
-               m_free(answer);
+                   cpr_kill_prompt();
+                   m_free(answer);
+                 }
              }
          }