~ubuntu-branches/ubuntu/feisty/gnupg2/feisty

« back to all changes in this revision

Viewing changes to g10/mainproc.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-11-24 18:48:23 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20061124184823-17ir9m46tl09n9k4
Tags: 2.0.0-4ubuntu1
* Synchronize to Debian, reapply remaining Ubuntu changes to pristine Debian
  version:
  - Remove libpcsclite-dev, libopensc2-dev build dependencies (they are in
    universe).

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
  md_filter_context_t mfx;
66
66
  int sigs_only;    /* Process only signatures and reject all other stuff. */
67
67
  int encrypt_only; /* Process only encryption messages. */
68
 
  STRLIST signed_data;
 
68
  strlist_t signed_data;
69
69
  const char *sigfilename;
70
70
  DEK *dek;
71
71
  int last_was_session_key;
445
445
                      nbits_from_pk( pk ), algstr, keystr_from_pk(pk),
446
446
                      strtimestamp(pk->timestamp) );
447
447
            p=get_user_id_native(list->kid);
448
 
            fprintf(log_get_stream(),_("      \"%s\"\n"),p);
 
448
            log_printf (_("      \"%s\"\n"),p);
449
449
            xfree(p);
450
450
          }
451
451
        else
508
508
          }
509
509
        else
510
510
          {
511
 
            /* assume this is old style conventional encrypted data */
512
 
            if ( (algo = opt.def_cipher_algo))
 
511
            /* Assume this is old style conventional encrypted data. */
 
512
            algo = opt.def_cipher_algo;
 
513
            if ( algo )
513
514
              log_info (_("assuming %s encrypted data\n"),
514
515
                        gcry_cipher_algo_name (algo));
515
516
            else if ( gcry_cipher_test_algo (CIPHER_ALGO_IDEA) )
680
681
    }
681
682
 
682
683
    rc = handle_plaintext( pt, &c->mfx, c->sigs_only, clearsig );
683
 
    if( gpg_err_code (rc) == GPG_ERR_ENOENT && !c->sigs_only) 
 
684
    if ( gpg_err_code (rc) == GPG_ERR_EACCES && !c->sigs_only ) 
684
685
      {
685
 
#warning We need to change the test for the error code
686
 
        /* Can't write output but we hash it anyway to
687
 
         * Check the signature. */
 
686
        /* Can't write output but we hash it anyway to check the
 
687
           signature. */
688
688
        rc = handle_plaintext( pt, &c->mfx, 1, clearsig );
689
689
      }
690
690
 
1132
1132
 
1133
1133
int
1134
1134
proc_signature_packets( void *anchor, IOBUF a,
1135
 
                        STRLIST signedfiles, const char *sigfilename )
 
1135
                        strlist_t signedfiles, const char *sigfilename )
1136
1136
{
1137
1137
    CTX c = xmalloc_clear( sizeof *c );
1138
1138
    int rc;
1527
1527
               not going to even try to make two strings here :) */
1528
1528
            log_info(_("Key available at: ") );
1529
1529
            print_utf8_string( log_get_stream(), p, n );
1530
 
            putc( '\n', log_get_stream() );
 
1530
            log_printf ("\n");
1531
1531
 
1532
1532
            if(opt.keyserver_options.options&KEYSERVER_AUTO_KEY_RETRIEVE
1533
1533
               && opt.keyserver_options.options&KEYSERVER_HONOR_KEYSERVER_URL)
1667
1667
            xfree(p);
1668
1668
 
1669
1669
            if(opt.verify_options&VERIFY_SHOW_UID_VALIDITY)
1670
 
              fprintf(log_get_stream()," [%s]\n",trust_value_to_string(valid));
 
1670
              log_printf (" [%s]\n",trust_value_to_string(valid));
1671
1671
            else
1672
 
              fputs("\n", log_get_stream() );
 
1672
              log_printf ("\n");
1673
1673
            count++;
1674
1674
        }
1675
1675
        if( !count ) {  /* just in case that we have no valid textual
1712
1712
            else
1713
1713
              log_info(_("Good signature from \"%s\""),p);
1714
1714
            if (opt.trust_model!=TM_ALWAYS && un)
1715
 
              {
1716
 
                putc(' ', log_get_stream() );
1717
 
                fputs(_("[uncertain]"), log_get_stream() );
1718
 
              }
1719
 
            fputs("\n", log_get_stream() );
 
1715
              log_printf (" %s",_("[uncertain]") );
 
1716
            log_printf ("\n");
1720
1717
        }
1721
1718
 
1722
1719
        /* If we have a good signature and already printed 
1760
1757
                      valid=trust_value_to_string(get_validity(pk,
1761
1758
                                                               un->pkt->
1762
1759
                                                               pkt.user_id));
1763
 
                    fprintf(log_get_stream()," [%s]\n",valid);
 
1760
                    log_printf (" [%s]\n",valid);
1764
1761
                  }
1765
1762
                else
1766
 
                  fputs("\n", log_get_stream() );
 
1763
                  log_printf ("\n");
1767
1764
            }
1768
1765
        }
1769
1766
        release_kbnode( keyblock );