~ubuntu-branches/ubuntu/oneiric/gnupg2/oneiric-updates

« back to all changes in this revision

Viewing changes to sm/decrypt.c

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-10-04 10:25:53 UTC
  • mfrom: (5.1.15 intrepid)
  • Revision ID: james.westby@ubuntu.com-20081004102553-fv62pp8dsitxli47
Tags: 2.0.9-3.1
* Non-maintainer upload.
* agent/gpg-agent.c: Deinit the threading library before exec'ing
  the command to run in --daemon mode. And because that still doesn't
  restore the sigprocmask, do that manually. Closes: #499569

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *
6
6
 * GnuPG is free software; you can redistribute it and/or modify
7
7
 * it under the terms of the GNU General Public License as published by
8
 
 * the Free Software Foundation; either version 2 of the License, or
 
8
 * the Free Software Foundation; either version 3 of the License, or
9
9
 * (at your option) any later version.
10
10
 *
11
11
 * GnuPG is distributed in the hope that it will be useful,
14
14
 * GNU General Public License for more details.
15
15
 *
16
16
 * You should have received a copy of the GNU General Public License
17
 
 * along with this program; if not, write to the Free Software
18
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 
17
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
19
18
 */
20
19
 
21
20
#include <config.h>
147
146
   decrypt it and store it inoutbuf which has a maximum size of
148
147
   maxoutlen.  The valid bytes in outbuf should be return in outlen.
149
148
   Due to different buffer sizes or different length of input and
150
 
   output, it may happen that fewer bytes are process or fewer bytes
 
149
   output, it may happen that fewer bytes are processed or fewer bytes
151
150
   are written. */
152
151
static gpg_error_t
153
152
decrypt_filter (void *arg,
164
163
 
165
164
  if (maxoutlen < 2*parm->blklen)
166
165
    return gpg_error (GPG_ERR_BUG);
167
 
  /* make some space becuase we will later need an extra block at the end */
 
166
  /* Make some space because we will later need an extra block at the end.  */
168
167
  maxoutlen -= blklen;
169
168
 
170
169
  if (parm->helpblocklen)
278
277
      goto leave;
279
278
    }
280
279
 
281
 
  rc = gpgsm_create_writer (&b64writer, ctrl, out_fp, &writer);
 
280
  rc = gpgsm_create_writer (&b64writer, ctrl, out_fp, NULL, &writer);
282
281
  if (rc)
283
282
    {
284
283
      log_error ("can't create writer: %s\n", gpg_strerror (rc));
297
296
      goto leave;
298
297
    }
299
298
 
300
 
  /* parser loop */
 
299
  /* Parser loop. */
301
300
  do 
302
301
    {
303
302
      rc = ksba_cms_parse (cms, &stopreason);