~ubuntu-branches/ubuntu/precise/gnupg2/precise-proposed

« back to all changes in this revision

Viewing changes to agent/trustlist.c

  • Committer: Bazaar Package Importer
  • Author(s): Eric Dorland
  • Date: 2009-03-08 22:46:47 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090308224647-gq17gatcl71lrc2k
Tags: 2.0.11-1
* New upstream release. (Closes: #496663)
* debian/control: Make the description a little more distinctive than
  gnupg v1's. Thanks Jari Aalto. (Closes: #496323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
463
463
{
464
464
  char *buffer, *p;
465
465
  size_t n = strlen (string);
 
466
  size_t nnew = n + (n+1)/2;
466
467
 
467
 
  p = buffer = xtrymalloc ( n + (n+2)/3 + 1 );
 
468
  p = buffer = xtrymalloc ( nnew + 1 );
468
469
  if (!buffer)
469
470
    return NULL;
470
471
  while (*string)
478
479
        }
479
480
    }
480
481
  *p = 0;
 
482
  assert (strlen (buffer) <= nnew);
481
483
 
482
484
  return buffer;
483
485
}
526
528
  fprformatted = insert_colons (fpr);
527
529
  if (!fprformatted)
528
530
    return out_of_core ();
529
 
  if (asprintf (&desc,
 
531
  desc = xtryasprintf (
530
532
                /* TRANSLATORS: This prompt is shown by the Pinentry
531
533
                   and has one special property: A "%%0A" is used by
532
534
                   Pinentry to insert a line break.  The double
539
541
                _("Please verify that the certificate identified as:%%0A"
540
542
                  "  \"%s\"%%0A"
541
543
                  "has the fingerprint:%%0A"
542
 
                  "  %s"), name, fprformatted) < 0 )
 
544
                  "  %s"), name, fprformatted);
 
545
  if (!desc)
543
546
    {
544
547
      xfree (fprformatted);
545
548
      return out_of_core ();
549
552
     be hit if the fingerprint matches the one of the CA.  The other
550
553
     button is "the default "Cancel" of the Pinentry. */
551
554
  err = agent_get_confirmation (ctrl, desc, _("Correct"), NULL);
552
 
  free (desc);
 
555
  xfree (desc);
553
556
  /* If the user did not confirmed this, we return cancel here so that
554
557
     gpgsm may stop asking further questions.  We won't do this for
555
558
     the second question of course. */
562
565
 
563
566
 
564
567
 
565
 
  if (asprintf (&desc,
 
568
  desc = xtryasprintf (
566
569
                /* TRANSLATORS: This prompt is shown by the Pinentry
567
570
                   and has one special property: A "%%0A" is used by
568
571
                   Pinentry to insert a line break.  The double
574
577
                _("Do you ultimately trust%%0A"
575
578
                  "  \"%s\"%%0A"
576
579
                  "to correctly certify user certificates?"),
577
 
                name) < 0 )
 
580
                name);
 
581
  if (!desc)
578
582
    {
579
583
      xfree (fprformatted);
580
584
      return out_of_core ();
581
585
    }
582
586
 
583
587
  err = agent_get_confirmation (ctrl, desc, _("Yes"), _("No"));
584
 
  free (desc);
 
588
  xfree (desc);
585
589
  if (err)
586
590
    {
587
591
      xfree (fprformatted);