~ubuntu-branches/ubuntu/quantal/gnutls28/quantal

« back to all changes in this revision

Viewing changes to lib/x509/output.c

  • Committer: Package Import Robot
  • Author(s): Andreas Metzler
  • Date: 2011-11-12 17:05:25 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20111112170525-kja1ffsqi68s1kwk
Tags: 3.0.8-1
* Build gnutls with --disable-largefile on armel, armhf and mipsel to fix
  guile related FTBFS on these architectures.
  See http://lists.gnu.org/archive/html/gnutls-devel/2011-10/msg00075.html
* New upstream version.
  + Bump shlibs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <x509_int.h>
30
30
#include <gnutls_num.h>
31
31
#include <gnutls_errors.h>
32
 
#include <c-ctype.h>
33
32
 
34
33
/* I18n of error codes. */
35
34
#include "gettext.h"
40
39
 
41
40
#define ERROR_STR (char*) "(error)"
42
41
 
43
 
static void
44
 
asciiprint (gnutls_buffer_st * str, const char *data, size_t len)
45
 
{
46
 
  size_t j;
47
 
 
48
 
  for (j = 0; j < len; j++)
49
 
    if (c_isprint (data[j]))
50
 
      addf (str, "%c", (unsigned char) data[j]);
51
 
    else
52
 
      addf (str, ".");
53
 
}
54
 
 
55
42
static char *
56
43
ip_to_string (void *_ip, int ip_size, char *string, int string_size)
57
44
{
123
110
  if (npolicy)
124
111
    {
125
112
      adds (str, _("\t\t\tPolicy:\n\t\t\t\tASCII: "));
126
 
      asciiprint (str, policy, npolicy);
 
113
      _gnutls_buffer_asciiprint (str, policy, npolicy);
127
114
      adds (str, _("\n\t\t\t\tHexdump: "));
128
115
      _gnutls_buffer_hexprint (str, policy, npolicy);
129
116
      adds (str, "\n");
706
693
                addf (str, _("%s\t\t\totherName DER: "), prefix);
707
694
                _gnutls_buffer_hexprint (str, buffer, size);
708
695
                addf (str, _("\n%s\t\t\totherName ASCII: "), prefix);
709
 
                asciiprint (str, buffer, size);
 
696
                _gnutls_buffer_asciiprint (str, buffer, size);
710
697
                addf (str, "\n");
711
698
              }
712
699
            gnutls_free (oid);
1037
1024
            }
1038
1025
 
1039
1026
          addf (str, _("%s\t\t\tASCII: "), prefix);
1040
 
          asciiprint (str, buffer, extlen);
 
1027
          _gnutls_buffer_asciiprint (str, buffer, extlen);
1041
1028
          addf (str, "\n");
1042
1029
 
1043
1030
          addf (str, _("%s\t\t\tHexdump: "), prefix);
1824
1811
                }
1825
1812
 
1826
1813
              adds (str, _("\t\t\tASCII: "));
1827
 
              asciiprint (str, buffer, extlen);
 
1814
              _gnutls_buffer_asciiprint (str, buffer, extlen);
1828
1815
              adds (str, "\n");
1829
1816
 
1830
1817
              adds (str, _("\t\t\tHexdump: "));
2194
2181
              }
2195
2182
 
2196
2183
            adds (str, _("\t\t\tASCII: "));
2197
 
            asciiprint (str, buffer, extlen);
 
2184
            _gnutls_buffer_asciiprint (str, buffer, extlen);
2198
2185
            adds (str, "\n");
2199
2186
 
2200
2187
            adds (str, _("\t\t\tHexdump: "));