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_2-22-gb2f2a


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, gnutls_2_12_x, updated. gnutls_2_12_2-22-gb2f2a13
Date: Sun, 17 Apr 2011 12:32:58 +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=b2f2a137003e8f0915fd7e04d333b208866e19e2

The branch, gnutls_2_12_x has been updated
       via  b2f2a137003e8f0915fd7e04d333b208866e19e2 (commit)
       via  054ea64c2f69c5a5486db55919077f64d0990390 (commit)
       via  b50f3185fd77fac95185fde1ca65172a40fe2c8c (commit)
      from  6fffdf51ce25f68c8b7fb370b222d6f923f650b3 (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 b2f2a137003e8f0915fd7e04d333b208866e19e2
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Apr 17 13:15:33 2011 +0200

    Several cleanups and fixes regarding the openpgp_keyid_t.

commit 054ea64c2f69c5a5486db55919077f64d0990390
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Apr 17 12:13:40 2011 +0200

    header fixes.

commit b50f3185fd77fac95185fde1ca65172a40fe2c8c
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sun Apr 17 12:11:09 2011 +0200

    pakchois is always included.

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

Summary of changes:
 lib/Makefile.am              |    5 ++---
 lib/auth_cert.c              |    3 +--
 lib/auth_cert.h              |    3 +--
 lib/gnutls_cert.h            |    2 +-
 lib/gnutls_privkey.c         |    4 ++--
 lib/gnutls_pubkey.c          |    3 +--
 lib/m4/hooks.m4              |   31 +------------------------------
 lib/openpgp/gnutls_openpgp.c |    4 ++--
 lib/openpgp/openpgp_int.h    |    2 +-
 lib/openpgp/pgp.c            |    8 ++++----
 lib/openpgp/pgpverify.c      |    2 +-
 lib/openpgp/privkey.c        |   12 ++++++------
 tests/cve-2009-1416.c        |    1 +
 tests/pkcs12_s2k_pem.c       |    1 +
 14 files changed, 25 insertions(+), 56 deletions(-)

diff --git a/lib/Makefile.am b/lib/Makefile.am
index 27e4478..10307a1 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -108,10 +108,8 @@ HFILES = abstract_int.h debug.h gnutls_compress.h 
gnutls_cipher.h  \
        ext_safe_renegotiation.h locks.h gnutls_mbuffers.h              \
        pkcs11_int.h
 
-if ENABLE_LOCAL_PAKCHOIS
 COBJECTS+=pakchois/pakchois.c pakchois/errors.c pakchois/dlopen.c
 HFILES+=pakchois/pakchois.h pakchois/pakchois11.h pakchois/dlopen.h
-endif
 
 # Separate so we can create the documentation
 
@@ -123,7 +121,8 @@ libgnutls_la_LDFLAGS = -no-undefined \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
 
 libgnutls_la_LIBADD = gl/liblgnu.la x509/libgnutls_x509.la \
-       $(LTLIBZ)  $(LTLIBINTL) $(LIBSOCKET) $(LTLIBDL)
+       $(LTLIBZ)  $(LTLIBINTL) $(LIBSOCKET) $(LTLIBDL) \
+       $(LTLIBPTHREAD)
 
 if ENABLE_OPENPGP
 libgnutls_la_LIBADD += openpgp/libgnutls_openpgp.la
diff --git a/lib/auth_cert.c b/lib/auth_cert.c
index 2ddbf46..40de22f 100644
--- a/lib/auth_cert.c
+++ b/lib/auth_cert.c
@@ -117,7 +117,6 @@ _gnutls_copy_certificate_auth_info (cert_auth_info_t info,
   info->ncerts = ncerts;
 
   info->cert_type = cert[0].cert_type;
-  info->sign_algo = cert[0].sign_algo;
 
 #ifdef ENABLE_OPENPGP
   if (cert[0].cert_type == GNUTLS_CRT_OPENPGP)
@@ -1170,7 +1169,7 @@ _gnutls_proc_openpgp_server_certificate (gnutls_session_t 
session,
   gnutls_cert *peer_certificate_list = NULL;
   int peer_certificate_list_size = 0;
   gnutls_datum_t tmp, akey = { NULL, 0 };
-  gnutls_openpgp_keyid_t subkey_id;
+  uint8_t subkey_id[GNUTLS_OPENPGP_KEYID_SIZE];
   unsigned int subkey_id_set = 0;
 
   cred = (gnutls_certificate_credentials_t)
diff --git a/lib/auth_cert.h b/lib/auth_cert.h
index 95ca2e0..0eb0093 100644
--- a/lib/auth_cert.h
+++ b/lib/auth_cert.h
@@ -123,10 +123,9 @@ typedef struct cert_auth_info_st
   unsigned int ncerts;          /* holds the size of the list above */
 
   gnutls_certificate_type_t cert_type;
-  gnutls_sign_algorithm_t sign_algo;
 #ifdef ENABLE_OPENPGP
   int use_subkey;
-  gnutls_openpgp_keyid_t subkey_id;
+  uint8_t subkey_id[GNUTLS_OPENPGP_KEYID_SIZE];
 #endif
 } *cert_auth_info_t;
 
diff --git a/lib/gnutls_cert.h b/lib/gnutls_cert.h
index a989b43..a4ae1bc 100644
--- a/lib/gnutls_cert.h
+++ b/lib/gnutls_cert.h
@@ -65,7 +65,7 @@ typedef struct gnutls_cert
 
 #ifdef ENABLE_OPENPGP
   int use_subkey;
-  gnutls_openpgp_keyid_t subkey_id;
+  uint8_t subkey_id[GNUTLS_OPENPGP_KEYID_SIZE];
 #endif
 } gnutls_cert;
 
diff --git a/lib/gnutls_privkey.c b/lib/gnutls_privkey.c
index 1996016..df604a3 100644
--- a/lib/gnutls_privkey.c
+++ b/lib/gnutls_privkey.c
@@ -188,7 +188,7 @@ _gnutls_privkey_get_public_mpis (gnutls_privkey_t key,
         bigint_t tmp_params[MAX_PRIV_PARAMS_SIZE];
         int tmp_params_size = MAX_PRIV_PARAMS_SIZE;
         uint32_t kid[2], i;
-        gnutls_openpgp_keyid_t keyid;
+        uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
 
         ret =
           gnutls_openpgp_privkey_get_preferred_key_id (key->key.openpgp,
@@ -390,7 +390,7 @@ gnutls_privkey_import_openpgp (gnutls_privkey_t pkey,
                                unsigned int flags)
 {
 int ret, idx;
-gnutls_openpgp_keyid_t keyid;
+uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
 
   ret = check_if_clean(pkey);
   if (ret < 0)
diff --git a/lib/gnutls_pubkey.c b/lib/gnutls_pubkey.c
index 1775a62..a8fc975 100644
--- a/lib/gnutls_pubkey.c
+++ b/lib/gnutls_pubkey.c
@@ -348,12 +348,11 @@ gnutls_pubkey_import_openpgp (gnutls_pubkey_t key,
   int ret, idx;
   uint32_t kid32[2];
   uint32_t *k;
-  gnutls_openpgp_keyid_t keyid;
+  uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
 
   ret = gnutls_openpgp_crt_get_preferred_key_id (crt, keyid);
   if (ret == GNUTLS_E_OPENPGP_PREFERRED_KEY_ERROR)
     {
-      key->pk_algorithm = gnutls_openpgp_crt_get_pk_algorithm(crt, NULL);
       key->pk_algorithm = gnutls_openpgp_crt_get_pk_algorithm (crt, 
&key->bits);
 
       ret = gnutls_openpgp_crt_get_key_usage (crt, &key->key_usage);
diff --git a/lib/m4/hooks.m4 b/lib/m4/hooks.m4
index 814844d..ba3677a 100644
--- a/lib/m4/hooks.m4
+++ b/lib/m4/hooks.m4
@@ -74,7 +74,7 @@ if test "$cryptolib" = "nettle";then
   *** Libnettle 2.1 was not found. 
   ]])
     fi
-    NETTLE_LIBS="-lgmp -lpthread -lhogweed"
+    NETTLE_LIBS="-lgmp -lhogweed"
 else
   AC_MSG_RESULT(no)
 fi
@@ -104,35 +104,6 @@ fi
     GNUTLS_REQUIRES_PRIVATE="Requires.private: libtasn1"
   fi
 
-  AC_ARG_WITH(included-pakchois,
-    AS_HELP_STRING([--with-included-pakchois], [use the included pakchois]),
-      included_pakchois=$withval,
-      included_pakchois=no)
-  if test "$included_pakchois" = "no"; then
-    AC_LIB_HAVE_LINKFLAGS(pakchois,, [#include <pakchois/pakchois.h>],
-                          [pakchois_module_load(0,0);])
-    if test "$ac_cv_pakchois" != yes; then
-      included_pakchois=yes
-      AC_MSG_WARN([[
-  *** 
-  *** Pakchois was not found. Will use the included one.
-  ]])
-    fi
-  fi
-  #not other option for now. The released pakchois cannot open an arbitrary 
PKCS11 module,
-  #and the author is reluctant to add such feature.
-  included_pakchois=yes
-  AC_MSG_CHECKING([whether to use the included pakchois])
-  AC_MSG_RESULT($included_pakchois)
-  AM_CONDITIONAL(ENABLE_LOCAL_PAKCHOIS, test "$included_pakchois" = "yes")
-  if test "$included_pakchois" = "yes";then
-       AC_CHECK_LIB(pthread, pthread_mutex_lock,,
-          [AC_MSG_WARN([could not find pthread_mutex_lock])])
-       AC_CHECK_LIB(dl, dlopen,,
-          [AC_MSG_WARN([could not find dlopen])])
-
-  fi
-
   AC_ARG_WITH(lzo,
     AS_HELP_STRING([--with-lzo], [use experimental LZO compression]),
                    use_lzo=$withval, use_lzo=no)
diff --git a/lib/openpgp/gnutls_openpgp.c b/lib/openpgp/gnutls_openpgp.c
index 5917447..8175a9d 100644
--- a/lib/openpgp/gnutls_openpgp.c
+++ b/lib/openpgp/gnutls_openpgp.c
@@ -369,7 +369,7 @@ gnutls_certificate_set_openpgp_key_mem2 
(gnutls_certificate_credentials_t res,
   gnutls_openpgp_privkey_t pkey;
   gnutls_openpgp_crt_t crt;
   int ret;
-  gnutls_openpgp_keyid_t keyid;
+  uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
 
   ret = gnutls_openpgp_privkey_init (&pkey);
   if (ret < 0)
@@ -725,7 +725,7 @@ int
 _gnutls_openpgp_crt_to_gcert (gnutls_cert * gcert, gnutls_openpgp_crt_t cert)
 {
   int ret;
-  gnutls_openpgp_keyid_t keyid;
+  uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
   char err_buf[33];
 
   memset (gcert, 0, sizeof (gnutls_cert));
diff --git a/lib/openpgp/openpgp_int.h b/lib/openpgp/openpgp_int.h
index bf0a970..82a4db6 100644
--- a/lib/openpgp/openpgp_int.h
+++ b/lib/openpgp/openpgp_int.h
@@ -18,7 +18,7 @@
 typedef struct gnutls_openpgp_crt_int
 {
   cdk_kbnode_t knode;
-  gnutls_openpgp_keyid_t preferred_keyid;
+  uint8_t preferred_keyid[GNUTLS_OPENPGP_KEYID_SIZE];
   int preferred_set;
 } gnutls_openpgp_crt_int;
 
diff --git a/lib/openpgp/pgp.c b/lib/openpgp/pgp.c
index 77a931d..9549c41 100644
--- a/lib/openpgp/pgp.c
+++ b/lib/openpgp/pgp.c
@@ -1426,7 +1426,7 @@ int
 gnutls_openpgp_crt_get_pk_rsa_raw (gnutls_openpgp_crt_t crt,
                                    gnutls_datum_t * m, gnutls_datum_t * e)
 {
-  gnutls_openpgp_keyid_t keyid;
+  uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
   int ret;
 
   ret = gnutls_openpgp_crt_get_key_id (crt, keyid);
@@ -1460,7 +1460,7 @@ gnutls_openpgp_crt_get_pk_dsa_raw (gnutls_openpgp_crt_t 
crt,
                                    gnutls_datum_t * p, gnutls_datum_t * q,
                                    gnutls_datum_t * g, gnutls_datum_t * y)
 {
-  gnutls_openpgp_keyid_t keyid;
+  uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
   int ret;
 
   ret = gnutls_openpgp_crt_get_key_id (crt, keyid);
@@ -1494,7 +1494,7 @@ gnutls_openpgp_crt_get_subkey_pk_rsa_raw 
(gnutls_openpgp_crt_t crt,
                                           gnutls_datum_t * m,
                                           gnutls_datum_t * e)
 {
-  gnutls_openpgp_keyid_t keyid;
+  uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
   int ret;
 
   ret = gnutls_openpgp_crt_get_subkey_id (crt, idx, keyid);
@@ -1532,7 +1532,7 @@ gnutls_openpgp_crt_get_subkey_pk_dsa_raw 
(gnutls_openpgp_crt_t crt,
                                           gnutls_datum_t * g,
                                           gnutls_datum_t * y)
 {
-  gnutls_openpgp_keyid_t keyid;
+  uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
   int ret;
 
   ret = gnutls_openpgp_crt_get_subkey_id (crt, idx, keyid);
diff --git a/lib/openpgp/pgpverify.c b/lib/openpgp/pgpverify.c
index bdb2ea3..2850a17 100644
--- a/lib/openpgp/pgpverify.c
+++ b/lib/openpgp/pgpverify.c
@@ -61,7 +61,7 @@ gnutls_openpgp_crt_verify_ring (gnutls_openpgp_crt_t key,
                                 gnutls_openpgp_keyring_t keyring,
                                 unsigned int flags, unsigned int *verify)
 {
-  gnutls_openpgp_keyid_t id;
+  uint8_t id[GNUTLS_OPENPGP_KEYID_SIZE];
   cdk_error_t rc;
   int status;
 
diff --git a/lib/openpgp/privkey.c b/lib/openpgp/privkey.c
index 7fef5ad..0040922 100644
--- a/lib/openpgp/privkey.c
+++ b/lib/openpgp/privkey.c
@@ -1032,7 +1032,7 @@ gnutls_openpgp_privkey_export_rsa_raw 
(gnutls_openpgp_privkey_t pkey,
                                        gnutls_datum_t * d, gnutls_datum_t * p,
                                        gnutls_datum_t * q, gnutls_datum_t * u)
 {
-  gnutls_openpgp_keyid_t keyid;
+  uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
   int ret;
 
   ret = gnutls_openpgp_privkey_get_key_id (pkey, keyid);
@@ -1068,7 +1068,7 @@ gnutls_openpgp_privkey_export_dsa_raw 
(gnutls_openpgp_privkey_t pkey,
                                        gnutls_datum_t * g, gnutls_datum_t * y,
                                        gnutls_datum_t * x)
 {
-  gnutls_openpgp_keyid_t keyid;
+  uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
   int ret;
 
   ret = gnutls_openpgp_privkey_get_key_id (pkey, keyid);
@@ -1110,7 +1110,7 @@ gnutls_openpgp_privkey_export_subkey_rsa_raw 
(gnutls_openpgp_privkey_t pkey,
                                               gnutls_datum_t * q,
                                               gnutls_datum_t * u)
 {
-  gnutls_openpgp_keyid_t keyid;
+  uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
   int ret;
 
   ret = gnutls_openpgp_privkey_get_subkey_id (pkey, idx, keyid);
@@ -1150,7 +1150,7 @@ gnutls_openpgp_privkey_export_subkey_dsa_raw 
(gnutls_openpgp_privkey_t pkey,
                                               gnutls_datum_t * y,
                                               gnutls_datum_t * x)
 {
-  gnutls_openpgp_keyid_t keyid;
+  uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
   int ret;
 
   ret = gnutls_openpgp_privkey_get_subkey_id (pkey, idx, keyid);
@@ -1253,7 +1253,7 @@ gnutls_openpgp_privkey_sign_hash 
(gnutls_openpgp_privkey_t key,
   bigint_t params[MAX_PRIV_PARAMS_SIZE];
   int params_size = MAX_PRIV_PARAMS_SIZE;
   int pk_algorithm;
-  gnutls_openpgp_keyid_t keyid;
+  uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
 
   if (key == NULL)
     {
@@ -1328,7 +1328,7 @@ _gnutls_openpgp_privkey_decrypt_data 
(gnutls_openpgp_privkey_t key,
   bigint_t params[MAX_PRIV_PARAMS_SIZE];
   int params_size = MAX_PRIV_PARAMS_SIZE;
   int pk_algorithm;
-  gnutls_openpgp_keyid_t keyid;
+  uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
 
   if (key == NULL)
     {
diff --git a/tests/cve-2009-1416.c b/tests/cve-2009-1416.c
index b9a66e5..faa5d1d 100644
--- a/tests/cve-2009-1416.c
+++ b/tests/cve-2009-1416.c
@@ -40,6 +40,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include <gnutls/gnutls.h>
 #include <gnutls/x509.h>
diff --git a/tests/pkcs12_s2k_pem.c b/tests/pkcs12_s2k_pem.c
index a09faae..8b5992c 100644
--- a/tests/pkcs12_s2k_pem.c
+++ b/tests/pkcs12_s2k_pem.c
@@ -33,6 +33,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include <gnutls/gnutls.h>
 #include <gnutls/x509.h>


hooks/post-receive
-- 
GNU gnutls



reply via email to

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