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

« back to all changes in this revision

Viewing changes to lib/debug.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:
28
28
#include <stdio.h>
29
29
#include <stdlib.h>
30
30
#include "debug.h"
 
31
#include <gnutls_mpi.h>
 
32
 
 
33
void
 
34
_gnutls_dump_mpi (const char *prefix, bigint_t a)
 
35
{
 
36
  char buf[400];
 
37
  char buf_hex[2 * sizeof (buf)];
 
38
  size_t n = sizeof buf;
 
39
 
 
40
  if (_gnutls_mpi_print (a, buf, &n))
 
41
    strcpy (buf, "[can't print value]");        /* Flawfinder: ignore */
 
42
  _gnutls_debug_log ("MPI: length: %d\n\t%s%s\n", (int) n, prefix,
 
43
                     _gnutls_bin2hex (buf, n, buf_hex, sizeof (buf_hex),
 
44
                                      NULL));
 
45
}
 
46
 
31
47
 
32
48
const char *
33
49
_gnutls_packet2str (content_type_t packet)