~ubuntu-branches/ubuntu/trusty/gnutls26/trusty

« back to all changes in this revision

Viewing changes to lib/opencdk/hash.c

  • Committer: Package Import Robot
  • Author(s): Andreas Metzler
  • Date: 2011-10-01 15:28:13 UTC
  • mfrom: (12.1.20 sid)
  • Revision ID: package-import@ubuntu.com-20111001152813-yygm1c4cxonfxhzy
* New upstream version.
  + Allow CA importing of 0 certificates to succeed. Closes: #640639
* Add libp11-kit-dev to libgnutls-dev dependencies. (see #643811)
* [20_guiledocstring.diff] guile: Fix docstring extraction with CPP 4.5+.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 *
24
24
 */
25
25
#ifdef HAVE_CONFIG_H
26
 
# include <config.h>
 
26
#include <config.h>
27
27
#endif
28
28
#include <stdio.h>
29
29
#include <sys/stat.h>
52
52
    {
53
53
      err = _gnutls_hash_init (&mfx->md, mfx->digest_algo);
54
54
      if (err < 0)
55
 
        {
56
 
          gnutls_assert ();
57
 
          return map_gnutls_error (err);
58
 
        }
 
55
        {
 
56
          gnutls_assert ();
 
57
          return map_gnutls_error (err);
 
58
        }
59
59
 
60
60
      mfx->md_initialized = 1;
61
61
    }
64
64
    {
65
65
      nread = fread (buf, 1, BUFSIZE, in);
66
66
      if (!nread)
67
 
        break;
 
67
        break;
68
68
      _gnutls_hash (&mfx->md, buf, nread);
69
69
    }
70
70
 
81
81
    {
82
82
      md_filter_t *mfx = data;
83
83
      if (mfx)
84
 
        {
85
 
          _cdk_log_debug ("free hash filter\n");
86
 
          _gnutls_hash_deinit (&mfx->md, NULL);
87
 
          mfx->md_initialized = 0;
88
 
          return 0;
89
 
        }
 
84
        {
 
85
          _cdk_log_debug ("free hash filter\n");
 
86
          _gnutls_hash_deinit (&mfx->md, NULL);
 
87
          mfx->md_initialized = 0;
 
88
          return 0;
 
89
        }
90
90
    }
91
91
 
92
92
  gnutls_assert ();