Mailinglist Archive: opensuse-commit (2092 mails)

< Previous Next >
commit gnutls
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Thu, 30 Aug 2007 22:52:13 +0200
  • Message-id: <20070830205213.B4CF367832C@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package gnutls
checked in at Thu Aug 30 22:52:13 CEST 2007.

--------
--- gnutls/gnutls.changes       2007-08-03 14:05:54.000000000 +0200
+++ /mounts/work_src_done/STABLE/gnutls/gnutls.changes  2007-08-30 12:36:31.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Aug 30 12:35:34 CEST 2007 - mkoenig@xxxxxxx
+
+- fix srptool [#208227] 
+- fix some compiler warnings
+
+-------------------------------------------------------------------

New:
----
  gnutls-1.6.1-compiler_warnings.patch
  gnutls-1.6.1-srptool.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnutls.spec ++++++
--- /var/tmp/diff_new_pack.e15869/_old  2007-08-30 22:51:20.000000000 +0200
+++ /var/tmp/diff_new_pack.e15869/_new  2007-08-30 22:51:20.000000000 +0200
@@ -13,7 +13,7 @@
 Name:           gnutls
 BuildRequires:  gcc-c++ libgcrypt-devel libopencdk-devel lzo-devel
 Version:        1.6.1
-Release:        25
+Release:        32
 License:        GPL v2 or later
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 URL:            http://www.gnutls.org/
@@ -21,6 +21,8 @@
 Patch0:         gnutls-char-signedness.patch
 Patch1:         gnutls-fix_size_t.patch
 Patch2:         gnutls-1.4.4-sign-callback.patch
+Patch3:         gnutls-1.6.1-compiler_warnings.patch
+Patch4:         gnutls-1.6.1-srptool.patch
 Summary:        The GNU Transport Layer Security Library
 Group:          Productivity/Networking/Security
 Autoreqprov:    on
@@ -62,6 +64,8 @@
 %patch0
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
+%patch4 -p1
 
 %build
 autoreconf -fi
@@ -124,6 +128,9 @@
 %doc doc/examples doc/gnutls.html doc/*.png doc/gnutls.pdf doc/reference/html/*
 
 %changelog
+* Thu Aug 30 2007 - mkoenig@xxxxxxx
+- fix srptool [#208227]
+- fix some compiler warnings
 * Fri Aug 03 2007 - hvogel@xxxxxxx
 - Some additions for evolution smart card support
 * Thu May 10 2007 - mkoenig@xxxxxxx

++++++ gnutls-1.6.1-compiler_warnings.patch ++++++
Index: gnutls-1.6.1/lib/gnutls_session_pack.c
===================================================================
--- gnutls-1.6.1.orig/lib/gnutls_session_pack.c
+++ gnutls-1.6.1/lib/gnutls_session_pack.c
@@ -342,7 +342,7 @@ unpack_certificate_auth_info (gnutls_ses
                              const gnutls_datum_t * packed_session)
 {
   int pos = 0, size, ret;
-  unsigned int i, j;
+  unsigned int i = 0, j;
   size_t pack_size;
   cert_auth_info_t info;
 
Index: gnutls-1.6.1/lib/gnutls_sig.c
===================================================================
--- gnutls-1.6.1.orig/lib/gnutls_sig.c
+++ gnutls-1.6.1/lib/gnutls_sig.c
@@ -36,6 +36,7 @@
 #include <gnutls_buffers.h>
 #include <gnutls_sig.h>
 #include <gnutls_kx.h>
+#include "gnutls_auth_int.h"
 
 static
   int _gnutls_tls_sign (gnutls_cert * cert, gnutls_privkey * pkey,
Index: gnutls-1.6.1/lib/gnutls_x509.c
===================================================================
--- gnutls-1.6.1.orig/lib/gnutls_x509.c
+++ gnutls-1.6.1/lib/gnutls_x509.c
@@ -1886,6 +1886,7 @@ int
   gnutls_x509_crt_t cert = NULL;
   gnutls_x509_crl_t crl = NULL;
   int ret;
+  size_t tmp_size;
 
   ret = gnutls_pkcs12_init (&p12);
   if (ret < 0)
@@ -1894,13 +1895,14 @@ int
       return ret;
     }
 
-  p12blob.data = read_binary_file (pkcs12file, &p12blob.size);
+  p12blob.data = read_binary_file (pkcs12file, &tmp_size);
   if (p12blob.data == NULL)
     {
       gnutls_assert ();
       gnutls_pkcs12_deinit (p12);
       return GNUTLS_E_FILE_ERROR;
     }
+  p12blob.size = (unsigned int)tmp_size; 
 
   ret = gnutls_pkcs12_import (p12, &p12blob, type, 0);
   free (p12blob.data);
Index: gnutls-1.6.1/lib/auth_srp.c
===================================================================
--- gnutls-1.6.1.orig/lib/auth_srp.c
+++ gnutls-1.6.1/lib/auth_srp.c
@@ -171,11 +171,13 @@ _gnutls_gen_srp_server_kx (gnutls_sessio
     }
 
   /* copy from pwd_entry to local variables (actually in session) */
-  if (_gnutls_mpi_scan_nz (&G, pwd_entry->g.data, &pwd_entry->g.size) < 0)
+  tmp_size = (size_t)pwd_entry->g.size;
+  if (_gnutls_mpi_scan_nz (&G, pwd_entry->g.data, &tmp_size) < 0)
     {
       gnutls_assert ();
       return GNUTLS_E_MPI_SCAN_FAILED;
     }
+  pwd_entry->g.size = (unsigned int)tmp_size;
 
   tmp_size = pwd_entry->n.size;
   if (_gnutls_mpi_scan_nz (&N, pwd_entry->n.data, &tmp_size) < 0)
Index: gnutls-1.6.1/lib/auth_psk_passwd.c
===================================================================
--- gnutls-1.6.1.orig/lib/auth_psk_passwd.c
+++ gnutls-1.6.1/lib/auth_psk_passwd.c
@@ -48,6 +48,7 @@ pwd_put_values (gnutls_datum * psk, char
 {
   char *p;
   int len, ret;
+  size_t tmp_size;
 
   p = strchr (str, ':');
   if (p == NULL)
@@ -76,7 +77,8 @@ pwd_put_values (gnutls_datum * psk, char
       return GNUTLS_E_MEMORY_ERROR;
     }
 
-  ret = _gnutls_hex2bin ((opaque *) p, len, psk->data, &psk->size);
+  tmp_size = (size_t)psk->size;
+  ret = _gnutls_hex2bin ((opaque *) p, len, psk->data, &tmp_size);
   if (ret < 0)
     {
       gnutls_assert ();
Index: gnutls-1.6.1/lib/gnutls_psk.c
===================================================================
--- gnutls-1.6.1.orig/lib/gnutls_psk.c
+++ gnutls-1.6.1/lib/gnutls_psk.c
@@ -95,6 +95,7 @@ gnutls_psk_set_client_credentials (gnutl
                                   unsigned int flags)
 {
   int ret;
+  size_t tmp_size;
 
   if (username == NULL || key == NULL || key->data == NULL)
     {
@@ -126,7 +127,8 @@ gnutls_psk_set_client_credentials (gnutl
          goto error;
        }
 
-      ret = gnutls_hex_decode (key, (char *) res->key.data, &res->key.size);
+      tmp_size = (size_t)res->key.size;
+      ret = gnutls_hex_decode (key, (char *) res->key.data, &tmp_size);
       if (ret < 0)
        {
          gnutls_assert ();
Index: gnutls-1.6.1/src/crypt.c
===================================================================
--- gnutls-1.6.1.orig/src/crypt.c
+++ gnutls-1.6.1/src/crypt.c
@@ -187,7 +187,7 @@ _verify_passwd_int (const char *username
 {
   char _salt[1024];
   gnutls_datum tmp, raw_salt, new_verifier;
-  int salt_size;
+  size_t salt_size;
   char *pos;
 
   if (salt == NULL || verifier == NULL)
Index: gnutls-1.6.1/libextra/gnutls_openpgp.c
===================================================================
--- gnutls-1.6.1.orig/libextra/gnutls_openpgp.c
+++ gnutls-1.6.1/libextra/gnutls_openpgp.c
@@ -528,7 +528,7 @@ stream_to_datum (cdk_stream_t inp, gnutl
   uint8_t buf[4096];
   int rc = 0, nread, nbytes = 0;
 
-  if (!buf || !raw)
+  if (!raw)
     {
       gnutls_assert ();
       return GNUTLS_E_INVALID_REQUEST;
@@ -728,6 +728,7 @@ gnutls_certificate_set_openpgp_key_file 
   struct stat statbuf;
   int rc = 0;
   gnutls_datum_t key, cert;
+  size_t tmp_size;
 
   if (!res || !keyfile || !certfile)
     {
@@ -741,20 +742,22 @@ gnutls_certificate_set_openpgp_key_file 
       return GNUTLS_E_FILE_ERROR;
     }
 
-  cert.data = read_binary_file (certfile, &cert.size);
+  cert.data = read_binary_file (certfile, &tmp_size);
   if (cert.data == NULL)
     {
       gnutls_assert ();
       return GNUTLS_E_FILE_ERROR;
     }
+  cert.size = (unsigned int)tmp_size;
 
-  key.data = read_binary_file (keyfile, &key.size);
+  key.data = read_binary_file (keyfile, &tmp_size);
   if (key.data == NULL)
     {
       gnutls_assert ();
       free (cert.data);
       return GNUTLS_E_FILE_ERROR;
     }
+  key.size = (unsigned int)tmp_size;
 
   rc = gnutls_certificate_set_openpgp_key_mem (res, &cert, &key);
 
Index: gnutls-1.6.1/libextra/openssl_compat.c
===================================================================
--- gnutls-1.6.1.orig/libextra/openssl_compat.c
+++ gnutls-1.6.1/libextra/openssl_compat.c
@@ -537,6 +537,7 @@ gnutls_x509_extract_certificate_dn_strin
 {
   gnutls_x509_crt_t xcert;
   int result;
+  size_t tmp_size = sizeof_buf;
 
   result = gnutls_x509_crt_init (&xcert);
   if (result < 0)
@@ -550,9 +551,9 @@ gnutls_x509_extract_certificate_dn_strin
     }
 
   if (!issuer)
-    result = gnutls_x509_crt_get_dn (xcert, buf, &sizeof_buf);
+    result = gnutls_x509_crt_get_dn (xcert, buf, &tmp_size);
   else
-    result = gnutls_x509_crt_get_issuer_dn (xcert, buf, &sizeof_buf);
+    result = gnutls_x509_crt_get_issuer_dn (xcert, buf, &tmp_size);
 
   gnutls_x509_crt_deinit (xcert);
 
Index: gnutls-1.6.1/src/common.c
===================================================================
--- gnutls-1.6.1.orig/src/common.c
+++ gnutls-1.6.1/src/common.c
@@ -101,8 +101,10 @@ print_x509_info (gnutls_session session,
   const char *cstr;
   unsigned int bits, algo;
   time_t expiret, activet;
+  unsigned int tmp_size;
 
-  cert_list = gnutls_certificate_get_peers (session, &cert_list_size);
+  cert_list = gnutls_certificate_get_peers (session, &tmp_size);
+  cert_list_size = tmp_size;
 
 
   if (cert_list_size == 0)
++++++ gnutls-1.6.1-srptool.patch ++++++
Index: gnutls-1.6.1/src/crypt.c
===================================================================
--- gnutls-1.6.1.orig/src/crypt.c
+++ gnutls-1.6.1/src/crypt.c
@@ -220,6 +220,7 @@ _verify_passwd_int (const char *username
 
   /* encode the verifier into _salt */
   salt_size = sizeof (_salt);
+  memset(_salt, '\0', salt_size);
   if (gnutls_srp_base64_encode (&new_verifier, _salt, &salt_size) < 0)
     {
       fprintf (stderr, "Encoding error\n");

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread