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

« back to all changes in this revision

Viewing changes to sm/certreqgen.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:
788
788
          gcry_sexp_release (s_pkey);
789
789
          bin2hex (grip, 20, hexgrip);
790
790
 
 
791
          log_info ("about to sign CSR for key: &%s\n", hexgrip); 
 
792
 
791
793
          if (carddirect)
792
794
            rc = gpgsm_scd_pksign (ctrl, carddirect, NULL,
793
795
                                     gcry_md_read(md, GCRY_MD_SHA1), 
795
797
                                     GCRY_MD_SHA1,
796
798
                                     &sigval, &siglen);
797
799
          else
798
 
            rc = gpgsm_agent_pksign (ctrl, hexgrip, NULL,
799
 
                                     gcry_md_read(md, GCRY_MD_SHA1), 
800
 
                                     gcry_md_get_algo_dlen (GCRY_MD_SHA1),
801
 
                                     GCRY_MD_SHA1,
802
 
                                     &sigval, &siglen);
 
800
            {
 
801
              char *orig_codeset;
 
802
              char *desc;
 
803
 
 
804
              orig_codeset = i18n_switchto_utf8 ();
 
805
              desc = percent_plus_escape 
 
806
                (_("To complete this certificate request please enter"
 
807
                   " the passphrase for the key you just created once"
 
808
                   " more.\n"));
 
809
              i18n_switchback (orig_codeset);
 
810
              rc = gpgsm_agent_pksign (ctrl, hexgrip, desc,
 
811
                                       gcry_md_read(md, GCRY_MD_SHA1), 
 
812
                                       gcry_md_get_algo_dlen (GCRY_MD_SHA1),
 
813
                                       GCRY_MD_SHA1,
 
814
                                       &sigval, &siglen);
 
815
              xfree (desc);
 
816
            }
803
817
          if (rc)
804
818
            {
805
819
              log_error ("signing failed: %s\n", gpg_strerror (rc));
818
832
        }
819
833
    }
820
834
  while (stopreason != KSBA_SR_READY);   
821
 
  
 
835
 
822
836
 
823
837
 leave:
824
838
  gcry_md_close (md);