gnutls-commit
[Top][All Lists]
Advanced

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

[SCM] GNU gnutls branch, gnutls_2_12_x, updated. gnutls_2_12_1-5-gdf6bda


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, gnutls_2_12_x, updated. gnutls_2_12_1-5-gdf6bda0
Date: Sun, 03 Apr 2011 08:54:19 +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=df6bda03100b4a1a4b00083e67b1b0b1aae0db6b

The branch, gnutls_2_12_x has been updated
       via  df6bda03100b4a1a4b00083e67b1b0b1aae0db6b (commit)
       via  b9d0bb0e37455e2550c4f79631e4bbe203bfe6d3 (commit)
       via  e4b020bc60cd96ed269d5ae3fdb7a8c416b4c90d (commit)
      from  47c59524d14dc2a892255b5d3002adb0df1c915d (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 df6bda03100b4a1a4b00083e67b1b0b1aae0db6b
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Apr 3 10:54:13 2011 +0200

    documented fix.

commit b9d0bb0e37455e2550c4f79631e4bbe203bfe6d3
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Apr 3 10:52:21 2011 +0200

    Corrected bug in gnutls_srp_verifier() that prevented the allocation of a 
verifier. Reported by Andrew Wiseman.

commit e4b020bc60cd96ed269d5ae3fdb7a8c416b4c90d
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Apr 3 10:50:54 2011 +0200

    Added debug option to srptool.

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

Summary of changes:
 NEWS             |   10 ++++++++-
 configure.ac     |    2 +-
 lib/gnutls_srp.c |    2 +-
 src/crypt-gaa.c  |   61 +++++++++++++++++++++++++++++++++++++----------------
 src/crypt-gaa.h  |   16 ++++++++------
 src/crypt.c      |   12 ++++++++-
 src/crypt.gaa    |    5 +++-
 7 files changed, 76 insertions(+), 32 deletions(-)

diff --git a/NEWS b/NEWS
index 955639f..315e81e 100644
--- a/NEWS
+++ b/NEWS
@@ -3,7 +3,15 @@ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005,
               2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 See the end for copying conditions.
 
-* Version 2.12.0 (released 2011-04-02)
+* Version 2.12.2 (unreleased)
+
+** srptool: Accepts the -d option to enable debugging.
+
+** libgnutls: Corrected bug in gnutls_srp_verifier() that prevented
+the allocation of a verifier. Reported by Andrew Wiseman.
+
+
+* Version 2.12.1 (released 2011-04-02)
 
 ** certtool: Generated certificate request with stricter permissions.
 Reported by Luca Capello.
diff --git a/configure.ac b/configure.ac
index 0980f42..0e42b28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@ dnl Process this file with autoconf to produce a configure 
script.
 # USA
 
 AC_PREREQ(2.61)
-AC_INIT([GnuTLS], [2.12.1], address@hidden)
+AC_INIT([GnuTLS], [2.12.2], address@hidden)
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 
diff --git a/lib/gnutls_srp.c b/lib/gnutls_srp.c
index df4e55e..6e07854 100644
--- a/lib/gnutls_srp.c
+++ b/lib/gnutls_srp.c
@@ -69,7 +69,7 @@ _gnutls_srp_gx (opaque * text, size_t textsize, opaque ** 
result,
   _gnutls_mpi_release (&x);
 
   ret = _gnutls_mpi_print (e, NULL, &result_size);
-  if (ret != GNUTLS_E_SHORT_MEMORY_BUFFER)
+  if (ret == GNUTLS_E_SHORT_MEMORY_BUFFER)
     {
       *result = galloc_func (result_size);
       if ((*result) == NULL)
diff --git a/src/crypt-gaa.c b/src/crypt-gaa.c
index 3375cf9..f83cf9d 100644
--- a/src/crypt-gaa.c
+++ b/src/crypt-gaa.c
@@ -129,6 +129,7 @@ static void __gaa_helpsingle(char short_name, char *name,
 void gaa_help(void)
 {
        printf("Srptool help\nUsage : srptool [options]\n");
+       __gaa_helpsingle('d', "debug", "integer ", "Enable debugging");
        __gaa_helpsingle('u', "username", "username ", "specify username.");
        __gaa_helpsingle('p', "passwd", "FILE ", "specify a password file.");
        __gaa_helpsingle('i', "index", "INDEX ", "specify the index of the 
group parameters in tpasswd.conf to use.");
@@ -152,20 +153,22 @@ typedef struct _gaainfo gaainfo;
 
 struct _gaainfo
 {
-#line 34 "crypt.gaa"
+#line 37 "crypt.gaa"
        char *create_conf;
-#line 31 "crypt.gaa"
+#line 34 "crypt.gaa"
        char *passwd_conf;
-#line 28 "crypt.gaa"
+#line 31 "crypt.gaa"
        int verify;
-#line 25 "crypt.gaa"
+#line 28 "crypt.gaa"
        int salt;
-#line 22 "crypt.gaa"
+#line 25 "crypt.gaa"
        int index;
-#line 19 "crypt.gaa"
+#line 22 "crypt.gaa"
        char *passwd;
-#line 16 "crypt.gaa"
+#line 19 "crypt.gaa"
        char *username;
+#line 16 "crypt.gaa"
+       int debug;
 
 #line 114 "gaa.skel"
 };
@@ -220,7 +223,7 @@ static int gaa_error = 0;
 #define GAA_MULTIPLE_OPTION     3
 
 #define GAA_REST                0
-#define GAA_NB_OPTION           9
+#define GAA_NB_OPTION           10
 #define GAAOPTID_help  1
 #define GAAOPTID_version       2
 #define GAAOPTID_create_conf   3
@@ -230,6 +233,7 @@ static int gaa_error = 0;
 #define GAAOPTID_index 7
 #define GAAOPTID_passwd        8
 #define GAAOPTID_username      9
+#define GAAOPTID_debug 10
 
 #line 168 "gaa.skel"
 
@@ -451,6 +455,12 @@ struct GAAOPTION_username
        char* arg1;
        int size1;
 };
+
+struct GAAOPTION_debug 
+{
+       int arg1;
+       int size1;
+};
          
 #line 349 "gaa.skel"
 static int gaa_is_an_argument(char *str)
@@ -487,6 +497,7 @@ static int gaa_get_option_num(char *str, int status)
                        GAA_CHECK1STR("i", GAAOPTID_index);
                        GAA_CHECK1STR("p", GAAOPTID_passwd);
                        GAA_CHECK1STR("u", GAAOPTID_username);
+                       GAA_CHECK1STR("d", GAAOPTID_debug);
         case GAA_MULTIPLE_OPTION:
 #line 375 "gaa.skel"
                        GAA_CHECK1STR("h", GAAOPTID_help);
@@ -505,6 +516,7 @@ static int gaa_get_option_num(char *str, int status)
                        GAA_CHECKSTR("index", GAAOPTID_index);
                        GAA_CHECKSTR("passwd", GAAOPTID_passwd);
                        GAA_CHECKSTR("username", GAAOPTID_username);
+                       GAA_CHECKSTR("debug", GAAOPTID_debug);
 
 #line 281 "gaa.skel"
        break;
@@ -523,6 +535,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo 
*gaaval, char *opt_list)
        struct GAAOPTION_index GAATMP_index;
        struct GAAOPTION_passwd GAATMP_passwd;
        struct GAAOPTION_username GAATMP_username;
+       struct GAAOPTION_debug GAATMP_debug;
 
 #line 393 "gaa.skel"
 #ifdef GAA_REST_EXISTS
@@ -545,14 +558,14 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo 
*gaaval, char *opt_list)
     {
        case GAAOPTID_help:
        OK = 0;
-#line 38 "crypt.gaa"
+#line 41 "crypt.gaa"
 { gaa_help(); exit(0); ;};
 
                return GAA_OK;
                break;
        case GAAOPTID_version:
        OK = 0;
-#line 37 "crypt.gaa"
+#line 40 "crypt.gaa"
 { srptool_version(); exit(0); ;};
 
                return GAA_OK;
@@ -562,7 +575,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo 
*gaaval, char *opt_list)
                GAA_TESTMOREARGS;
                GAA_FILL(GAATMP_create_conf.arg1, gaa_getstr, 
GAATMP_create_conf.size1);
                gaa_index++;
-#line 35 "crypt.gaa"
+#line 38 "crypt.gaa"
 { gaaval->create_conf = GAATMP_create_conf.arg1 ;};
 
                return GAA_OK;
@@ -572,14 +585,14 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo 
*gaaval, char *opt_list)
                GAA_TESTMOREARGS;
                GAA_FILL(GAATMP_passwd_conf.arg1, gaa_getstr, 
GAATMP_passwd_conf.size1);
                gaa_index++;
-#line 32 "crypt.gaa"
+#line 35 "crypt.gaa"
 { gaaval->passwd_conf = GAATMP_passwd_conf.arg1 ;};
 
                return GAA_OK;
                break;
        case GAAOPTID_verify:
        OK = 0;
-#line 29 "crypt.gaa"
+#line 32 "crypt.gaa"
 { gaaval->verify = 1 ;};
 
                return GAA_OK;
@@ -589,7 +602,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo 
*gaaval, char *opt_list)
                GAA_TESTMOREARGS;
                GAA_FILL(GAATMP_salt.arg1, gaa_getint, GAATMP_salt.size1);
                gaa_index++;
-#line 26 "crypt.gaa"
+#line 29 "crypt.gaa"
 { gaaval->salt = GAATMP_salt.arg1 ;};
 
                return GAA_OK;
@@ -599,7 +612,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo 
*gaaval, char *opt_list)
                GAA_TESTMOREARGS;
                GAA_FILL(GAATMP_index.arg1, gaa_getint, GAATMP_index.size1);
                gaa_index++;
-#line 23 "crypt.gaa"
+#line 26 "crypt.gaa"
 { gaaval->index = GAATMP_index.arg1 ;};
 
                return GAA_OK;
@@ -609,7 +622,7 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo 
*gaaval, char *opt_list)
                GAA_TESTMOREARGS;
                GAA_FILL(GAATMP_passwd.arg1, gaa_getstr, GAATMP_passwd.size1);
                gaa_index++;
-#line 20 "crypt.gaa"
+#line 23 "crypt.gaa"
 { gaaval->passwd = GAATMP_passwd.arg1 ;};
 
                return GAA_OK;
@@ -619,11 +632,21 @@ static int gaa_try(int gaa_num, int gaa_index, gaainfo 
*gaaval, char *opt_list)
                GAA_TESTMOREARGS;
                GAA_FILL(GAATMP_username.arg1, gaa_getstr, 
GAATMP_username.size1);
                gaa_index++;
-#line 17 "crypt.gaa"
+#line 20 "crypt.gaa"
 { gaaval->username = GAATMP_username.arg1 ;};
 
                return GAA_OK;
                break;
+       case GAAOPTID_debug:
+       OK = 0;
+               GAA_TESTMOREARGS;
+               GAA_FILL(GAATMP_debug.arg1, gaa_getint, GAATMP_debug.size1);
+               gaa_index++;
+#line 17 "crypt.gaa"
+{ gaaval->debug = GAATMP_debug.arg1 ;};
+
+               return GAA_OK;
+               break;
 
 #line 413 "gaa.skel"
     default: break;
@@ -648,10 +671,10 @@ int gaa(int argc, char **argv, gaainfo *gaaval)
     if(inited == 0)
     {
 
-#line 40 "crypt.gaa"
+#line 43 "crypt.gaa"
 { gaaval->username=NULL; gaaval->passwd=NULL; gaaval->salt=0;
        gaaval->create_conf=NULL; gaaval->passwd_conf=NULL; gaaval->verify = 0; 
-       gaaval->index = 1; ;};
+       gaaval->index = 1; gaaval->debug = 0; ;};
 
     }
     inited = 1;
diff --git a/src/crypt-gaa.h b/src/crypt-gaa.h
index 42eac7d..18ea3bb 100644
--- a/src/crypt-gaa.h
+++ b/src/crypt-gaa.h
@@ -8,20 +8,22 @@ typedef struct _gaainfo gaainfo;
 
 struct _gaainfo
 {
-#line 34 "crypt.gaa"
+#line 37 "crypt.gaa"
        char *create_conf;
-#line 31 "crypt.gaa"
+#line 34 "crypt.gaa"
        char *passwd_conf;
-#line 28 "crypt.gaa"
+#line 31 "crypt.gaa"
        int verify;
-#line 25 "crypt.gaa"
+#line 28 "crypt.gaa"
        int salt;
-#line 22 "crypt.gaa"
+#line 25 "crypt.gaa"
        int index;
-#line 19 "crypt.gaa"
+#line 22 "crypt.gaa"
        char *passwd;
-#line 16 "crypt.gaa"
+#line 19 "crypt.gaa"
        char *username;
+#line 16 "crypt.gaa"
+       int debug;
 
 #line 114 "gaa.skel"
 };
diff --git a/src/crypt.c b/src/crypt.c
index 2673683..1878424 100644
--- a/src/crypt.c
+++ b/src/crypt.c
@@ -389,8 +389,13 @@ verify_passwd (char *conffile, char *tpasswd, char 
*username,
 #define KPASSWD "/etc/tpasswd"
 #define KPASSWD_CONF "/etc/tpasswd.conf"
 
-int
-main (int argc, char **argv)
+static void
+tls_log_func (int level, const char *str)
+{
+  fprintf (stderr, "|<%d>| %s", level, str);
+}
+
+int main (int argc, char **argv)
 {
   gaainfo info;
   const char *passwd;
@@ -413,6 +418,9 @@ main (int argc, char **argv)
       return -1;
     }
 
+  gnutls_global_set_log_function (tls_log_func);
+  gnutls_global_set_log_level (info.debug);
+
   if (info.create_conf != NULL)
     {
       return generate_create_conf (info.create_conf);
diff --git a/src/crypt.gaa b/src/crypt.gaa
index 516b257..0026b0a 100644
--- a/src/crypt.gaa
+++ b/src/crypt.gaa
@@ -13,6 +13,9 @@ void srptool_version(void);
 
 helpnode "Srptool help\nUsage : srptool [options]"
 
+#int debug;
+option (d, debug) INT "integer" { $debug = $1 } "Enable debugging" 
+
 #char *username;
 option (u,username) STR "username" { $username = $1 } "specify username."
 
@@ -39,4 +42,4 @@ option (h, help) { gaa_help(); exit(0); } "shows this help 
text"
 
 init { $username=NULL; $passwd=NULL; $salt=0;
        $create_conf=NULL; $passwd_conf=NULL; $verify = 0; 
-       $index = 1; }
+       $index = 1; $debug = 0; }


hooks/post-receive
-- 
GNU gnutls



reply via email to

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