~ubuntu-branches/ubuntu/karmic/gnupg2/karmic-security

« back to all changes in this revision

Viewing changes to sm/import.c

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2009-08-04 12:27:49 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20090804122749-q0j52zp6xmzvyall
Tags: 2.0.12-0ubuntu1
* New upstream release.
* Add 01-scd-pw2.patch, 03-opgp-writekey.patch, and 06-opgp-sign3072.patch
  from https://bugs.g10code.com/gnupg/issue1094 to make OpenPGP 2.0
  smartcards work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
463
463
popen_protect_tool (ctrl_t ctrl, const char *pgmname,
464
464
                    FILE *infile, FILE *outfile, FILE **statusfile, pid_t *pid)
465
465
{
466
 
  const char *argv[20];
 
466
  const char *argv[22];
467
467
  int i=0;
468
468
 
469
469
  /* Make sure that the agent is running so that the protect tool is
470
470
     able to ask for a passphrase.  This has only an effect under W32
471
471
     where the agent is started on demand; sending a NOP does not harm
472
 
     on other platforms. */
 
472
     on other platforms.  This is not really necessary anymore because
 
473
     the protect tool does this now by itself; it does not harm either. */
473
474
  gpgsm_agent_send_nop (ctrl);
474
475
 
475
476
  argv[i++] = "--homedir";
483
484
      argv[i++] = "--passphrase";
484
485
      argv[i++] = opt.fixed_passphrase;
485
486
    }
 
487
  if (opt.agent_program)
 
488
    {
 
489
      argv[i++] = "--agent-program";
 
490
      argv[i++] = opt.agent_program;
 
491
    }
486
492
  argv[i++] = "--",
487
493
  argv[i] = NULL;
488
494
  assert (i < sizeof argv);
489
495
 
490
496
  return gnupg_spawn_process (pgmname, argv, infile, outfile,
491
 
                              setup_pinentry_env, 128,
 
497
                              setup_pinentry_env, (128 | 64),
492
498
                              statusfile, pid);
493
499
}
494
500