~ubuntu-branches/ubuntu/precise/mutt/precise

« back to all changes in this revision

Viewing changes to crypt-gpgme.c

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg, Adeodato Simó, Christoph Berg
  • Date: 2007-11-03 23:00:04 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071103230004-43e36pnhub87junc
Tags: 1.5.17-1
[ Adeodato Simó ]
* Move the packaging back to Bazaar, adjust X-VCS-* accordingly.

[ Christoph Berg ]
* Mention libsasl2-modules-gssapi-mit in README.Debian. (Closes: #433425)
* Call autoreconf at build time, drop the autotools-update patch.
* Update menu file, add lintian override file.
* Refresh patches.

* New upstream version:
  + fix segfaults with single byte 8-bit characters in index_format.
    (Closes: #420598, Mutt: #2882)
  + properly render subject headers with encoded linefeeds.
    (Closes: #264014, Mutt: #1810)
  + only calls gnutls_error_is_fatal when gnutls_record_recv returns a
    negative value. (Closes: #439775, Mutt: #2954)
  + Large file support for mutt_pretty_size().
    (Closes: #352478, #416555, Mutt: #2191)
  + Do not consider empty pipes for filtering in format strings.
    (Closes: #447340)

Show diffs side-by-side

added added

removed removed

Lines of Context:
760
760
{
761
761
  gpgme_sign_result_t result = NULL;
762
762
  const char *algorithm_name = NULL;
763
 
  char *bp;
764
763
 
765
764
  if (buflen < 5)
766
765
    return -1;
1525
1524
{
1526
1525
  struct stat info;
1527
1526
  BODY *tattach;
1528
 
  int err;
 
1527
  int err = 0;
1529
1528
  gpgme_ctx_t ctx;
1530
1529
  gpgme_data_t ciphertext, plaintext;
1531
1530
  int maybe_signed = 0;
1552
1551
      else if (maybe_signed)
1553
1552
        err = gpgme_op_verify (ctx, ciphertext, NULL, plaintext);
1554
1553
 
 
1554
      if (err == GPG_ERR_NO_ERROR)
1555
1555
      {
1556
 
        /* Check wether signatures have been verified.  */
 
1556
        /* Check whether signatures have been verified.  */
1557
1557
        gpgme_verify_result_t verify_result = gpgme_op_verify_result (ctx);
1558
1558
        if (verify_result->signatures)
1559
1559
          sig_stat = 1;
1858
1858
    if (!mutt_strncmp ("-----BEGIN PGP ", buf, 15))
1859
1859
    {
1860
1860
      if (!mutt_strcmp ("MESSAGE-----\n", buf + 15))
 
1861
      {
1861
1862
        enc = 1;
 
1863
        break;
 
1864
      }
1862
1865
      else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15))
 
1866
      {
1863
1867
        sgn = 1;
 
1868
        break;
 
1869
      }
1864
1870
    }
1865
1871
  }
1866
1872
  safe_fclose (&tfp);
2039
2045
                           || (clearsign && (s->flags & M_VERIFY)));
2040
2046
          
2041
2047
          /* Copy PGP material to an data container */
2042
 
          armored_data = create_gpgme_data ();
2043
 
          gpgme_data_write (armored_data, buf, strlen (buf));
2044
 
          while (bytes > 0 && fgets (buf, sizeof (buf) - 1, s->fpin) != NULL)
2045
 
            {
2046
 
              offset = ftello (s->fpin);
2047
 
              bytes -= (offset - last_pos); /* don't rely on mutt_strlen(buf)*/
2048
 
              last_pos = offset;
2049
 
              
2050
 
              gpgme_data_write (armored_data, buf, strlen (buf));
2051
 
              
2052
 
              if ((needpass
2053
 
                   && !mutt_strcmp ("-----END PGP MESSAGE-----\n", buf)) 
2054
 
                  || (!needpass 
2055
 
                      && (!mutt_strcmp ("-----END PGP SIGNATURE-----\n", buf)
2056
 
                          || !mutt_strcmp (
2057
 
                                "-----END PGP PUBLIC KEY BLOCK-----\n",buf))))
2058
 
                break;
2059
 
            }
2060
 
          
 
2048
          armored_data = file_to_data_object (s->fpin, m->offset, m->length);
2061
2049
          /* Invoke PGP if needed */
2062
2050
          if (!clearsign || (s->flags & M_VERIFY))
2063
2051
            {