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

« back to all changes in this revision

Viewing changes to g10/mdfilter.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>
25
24
#include <errno.h>
26
25
#include <assert.h>
27
26
 
28
 
#include "errors.h"
 
27
#include "gpg.h"
 
28
#include "status.h"
29
29
#include "iobuf.h"
30
 
#include "memory.h"
31
30
#include "util.h"
32
31
#include "filter.h"
33
32
 
38
37
 */
39
38
int
40
39
md_filter( void *opaque, int control,
41
 
               iobuf_t a, byte *buf, size_t *ret_len)
 
40
               IOBUF a, byte *buf, size_t *ret_len)
42
41
{
43
42
    size_t size = *ret_len;
44
43
    md_filter_context_t *mfx = opaque;
67
66
void
68
67
free_md_filter_context( md_filter_context_t *mfx )
69
68
{
70
 
    gcry_md_close (mfx->md);
71
 
    gcry_md_close (mfx->md2);
 
69
    gcry_md_close(mfx->md);
 
70
    gcry_md_close(mfx->md2);
72
71
    mfx->md = NULL;
73
72
    mfx->md2 = NULL;
74
73
    mfx->maxbuf_size = 0;