gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_3_0_7-52-g6402455


From: Simon Josefsson
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_0_7-52-g6402455
Date: Thu, 10 Nov 2011 11:33:18 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=6402455d8a63ecc5822504adb0ee9c5741ff8a4c

The branch, master has been updated
       via  6402455d8a63ecc5822504adb0ee9c5741ff8a4c (commit)
       via  7beb6da7f22390d36bf72a012ee7ff4bdcc647be (commit)
      from  66074b4117f2569d795f50e20de7e469bfcea7be (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6402455d8a63ecc5822504adb0ee9c5741ff8a4c
Author: Simon Josefsson <address@hidden>
Date:   Thu Nov 10 12:31:00 2011 +0100

    Make more functions available internally (for OCSP).

commit 7beb6da7f22390d36bf72a012ee7ff4bdcc647be
Author: Simon Josefsson <address@hidden>
Date:   Thu Nov 10 12:30:10 2011 +0100

    Make asciiprint a globally available function.

-----------------------------------------------------------------------

Summary of changes:
 lib/gnutls_str.c      |   22 ++++++++++++++++++----
 lib/gnutls_str.h      |    9 ++++++---
 lib/x509/common.c     |    5 ++---
 lib/x509/common.h     |   10 ++++++++++
 lib/x509/extensions.c |    7 +++----
 lib/x509/output.c     |   23 +++++------------------
 6 files changed, 44 insertions(+), 32 deletions(-)

diff --git a/lib/gnutls_str.c b/lib/gnutls_str.c
index 9e8ed61..c668b08 100644
--- a/lib/gnutls_str.c
+++ b/lib/gnutls_str.c
@@ -1,6 +1,5 @@
 /*
- * Copyright (C) 2002, 2004, 2005, 2007, 2008, 2009, 2010 Free Software
- * Foundation, Inc.
+ * Copyright (C) 2002-2011 Free Software Foundation, Inc.
  *
  * Author: Nikos Mavrogiannopoulos
  *
@@ -731,7 +730,9 @@ _gnutls_buffer_pop_data_prefix (gnutls_buffer_st * buf, 
void *data,
   return 0;
 }
 
-void _gnutls_buffer_hexprint (gnutls_buffer_st * str, const char *data, size_t 
len)
+void
+_gnutls_buffer_hexprint (gnutls_buffer_st * str,
+                        const char *data, size_t len)
 {
   size_t j;
 
@@ -746,7 +747,7 @@ void _gnutls_buffer_hexprint (gnutls_buffer_st * str, const 
char *data, size_t l
 
 void
 _gnutls_buffer_hexdump (gnutls_buffer_st * str, const char *data, size_t len,
-         const char *spc)
+                       const char *spc)
 {
   size_t j;
 
@@ -768,3 +769,16 @@ _gnutls_buffer_hexdump (gnutls_buffer_st * str, const char 
*data, size_t len,
   if ((j % 16) != 0)
     _gnutls_buffer_append_str (str, "\n");
 }
+
+void
+_gnutls_buffer_asciiprint (gnutls_buffer_st * str,
+                          const char *data, size_t len)
+{
+  size_t j;
+
+  for (j = 0; j < len; j++)
+    if (c_isprint (data[j]))
+      _gnutls_buffer_append_printf (str, "%c", (unsigned char) data[j]);
+    else
+      _gnutls_buffer_append_printf (str, ".");
+}
diff --git a/lib/gnutls_str.h b/lib/gnutls_str.h
index 3d1de00..770a7b7 100644
--- a/lib/gnutls_str.h
+++ b/lib/gnutls_str.h
@@ -92,9 +92,12 @@ int _gnutls_buffer_append_printf (gnutls_buffer_st * dest, 
const char *fmt,
                                   ...)
   __attribute__ ((format (printf, 2, 3)));
 
-void _gnutls_buffer_hexprint (gnutls_buffer_st * str, const char *data, size_t 
len);
-void _gnutls_buffer_hexdump (gnutls_buffer_st * str, const char *data, size_t 
len,
-         const char *spc);
+void _gnutls_buffer_hexprint (gnutls_buffer_st * str,
+                             const char *data, size_t len);
+void _gnutls_buffer_hexdump (gnutls_buffer_st * str, const char *data,
+                            size_t len, const char *spc);
+void _gnutls_buffer_asciiprint (gnutls_buffer_st * str,
+                               const char *data, size_t len);
 
 char *_gnutls_bin2hex (const void *old, size_t oldlen, char *buffer,
                        size_t buffer_size, const char *separator);
diff --git a/lib/x509/common.c b/lib/x509/common.c
index cfbcdff..69db11d 100644
--- a/lib/x509/common.c
+++ b/lib/x509/common.c
@@ -1,6 +1,5 @@
 /*
- * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
- * Software Foundation, Inc.
+ * Copyright (C) 2003-2011 Free Software Foundation, Inc.
  *
  * Author: Nikos Mavrogiannopoulos
  *
@@ -599,7 +598,7 @@ _gnutls_x509_gtime2utcTime (time_t gtime, char *str_time, 
int str_time_size)
  * The given time is expressed as:
  * YEAR(4)|MONTH(2)|DAY(2)|HOUR(2)|MIN(2)|SEC(2)*
  */
-static time_t
+time_t
 _gnutls_x509_generalTime2gtime (const char *ttime)
 {
   char xx[5];
diff --git a/lib/x509/common.h b/lib/x509/common.h
index d6cafda..1d6caaf 100644
--- a/lib/x509/common.h
+++ b/lib/x509/common.h
@@ -156,4 +156,14 @@ void _asnstr_append_name (char *name, size_t name_size, 
const char *part1,
 int
 check_if_same_cert (gnutls_x509_crt_t cert1, gnutls_x509_crt_t cert2);
 
+time_t _gnutls_x509_generalTime2gtime (const char *ttime);
+
+int get_extension (ASN1_TYPE asn, const char *root,
+                  const char *extension_id, int indx,
+                  gnutls_datum_t * ret, unsigned int *_critical);
+
+int set_extension (ASN1_TYPE asn, const char *root,
+                  const char *ext_id,
+                  const gnutls_datum_t * ext_data, unsigned int critical);
+
 #endif
diff --git a/lib/x509/extensions.c b/lib/x509/extensions.c
index 025c38c..4e73fd9 100644
--- a/lib/x509/extensions.c
+++ b/lib/x509/extensions.c
@@ -1,6 +1,5 @@
 /*
- * Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software
- * Foundation, Inc.
+ * Copyright (C) 2003-2011 Free Software Foundation, Inc.
  *
  * Author: Nikos Mavrogiannopoulos
  *
@@ -32,7 +31,7 @@
 #include <x509_int.h>
 #include <gnutls_datum.h>
 
-static int
+int
 get_extension (ASN1_TYPE asn, const char *root,
                const char *extension_id, int indx,
                gnutls_datum_t * ret, unsigned int *_critical)
@@ -408,7 +407,7 @@ overwrite_extension (ASN1_TYPE asn, const char *root, 
unsigned int indx,
   return 0;
 }
 
-static int
+int
 set_extension (ASN1_TYPE asn, const char *root,
                const char *ext_id,
                const gnutls_datum_t * ext_data, unsigned int critical)
diff --git a/lib/x509/output.c b/lib/x509/output.c
index 0f326a6..b0e8640 100644
--- a/lib/x509/output.c
+++ b/lib/x509/output.c
@@ -29,7 +29,6 @@
 #include <x509_int.h>
 #include <gnutls_num.h>
 #include <gnutls_errors.h>
-#include <c-ctype.h>
 
 /* I18n of error codes. */
 #include "gettext.h"
@@ -40,18 +39,6 @@
 
 #define ERROR_STR (char*) "(error)"
 
-static void
-asciiprint (gnutls_buffer_st * str, const char *data, size_t len)
-{
-  size_t j;
-
-  for (j = 0; j < len; j++)
-    if (c_isprint (data[j]))
-      addf (str, "%c", (unsigned char) data[j]);
-    else
-      addf (str, ".");
-}
-
 static char *
 ip_to_string (void *_ip, int ip_size, char *string, int string_size)
 {
@@ -123,7 +110,7 @@ print_proxy (gnutls_buffer_st * str, gnutls_x509_crt_t cert)
   if (npolicy)
     {
       adds (str, _("\t\t\tPolicy:\n\t\t\t\tASCII: "));
-      asciiprint (str, policy, npolicy);
+      _gnutls_buffer_asciiprint (str, policy, npolicy);
       adds (str, _("\n\t\t\t\tHexdump: "));
       _gnutls_buffer_hexprint (str, policy, npolicy);
       adds (str, "\n");
@@ -706,7 +693,7 @@ print_altname (gnutls_buffer_st * str, const char *prefix, 
int altname_type,
                 addf (str, _("%s\t\t\totherName DER: "), prefix);
                 _gnutls_buffer_hexprint (str, buffer, size);
                 addf (str, _("\n%s\t\t\totherName ASCII: "), prefix);
-                asciiprint (str, buffer, size);
+                _gnutls_buffer_asciiprint (str, buffer, size);
                 addf (str, "\n");
               }
             gnutls_free (oid);
@@ -1037,7 +1024,7 @@ print_extensions (gnutls_buffer_st * str, const char 
*prefix, int type,
             }
 
           addf (str, _("%s\t\t\tASCII: "), prefix);
-          asciiprint (str, buffer, extlen);
+          _gnutls_buffer_asciiprint (str, buffer, extlen);
           addf (str, "\n");
 
           addf (str, _("%s\t\t\tHexdump: "), prefix);
@@ -1824,7 +1811,7 @@ print_crl (gnutls_buffer_st * str, gnutls_x509_crl_t crl, 
int notsigned)
                 }
 
               adds (str, _("\t\t\tASCII: "));
-              asciiprint (str, buffer, extlen);
+              _gnutls_buffer_asciiprint (str, buffer, extlen);
               adds (str, "\n");
 
               adds (str, _("\t\t\tHexdump: "));
@@ -2194,7 +2181,7 @@ print_crq (gnutls_buffer_st * str, gnutls_x509_crq_t cert)
               }
 
             adds (str, _("\t\t\tASCII: "));
-            asciiprint (str, buffer, extlen);
+            _gnutls_buffer_asciiprint (str, buffer, extlen);
             adds (str, "\n");
 
             adds (str, _("\t\t\tHexdump: "));


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]