]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Support for liblzo was dropped.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 10 Apr 2011 21:17:39 +0000 (23:17 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 10 Apr 2011 21:18:16 +0000 (23:18 +0200)
12 files changed:
NEWS
configure.ac
doc/cha-intro-tls.texi
doc/cha-preface.texi
doc/cha-programs.texi
lib/gnutls_compress.c
lib/gnutls_errors.c
lib/gnutls_state.c
lib/includes/gnutls/gnutls.h.in
lib/libgnutls.map
libextra/gnutls_extra.c
m4/hooks.m4

diff --git a/NEWS b/NEWS
index b55d2e9688b1932c6a007219eab6285bb4cfbdcf..12b751b4c6f464b0b42d68d540d5784dcafefaa4 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,8 @@ See the end for copying conditions.
 
 * Version 2.99.1 (unreleased)
 
+** libgnutls-extra: Dropped support of LZO compression via liblzo.
+
 ** API and ABI modifications:
 No changes since last version.
 
index 829aec329e0944c6e27fb90d7fc4686a67c0f8b2..6e327ff6f29ccde82d87a8da49389aa32e8e6baf 100644 (file)
@@ -333,7 +333,7 @@ fi
 AM_CONDITIONAL(HAVE_GUILE, test "$opt_guile_bindings" = "yes")
 
 
-LIBGNUTLS_EXTRA_LIBS="-L${libdir} -lgnutls-extra $LZO_LIBS $LIBGNUTLS_LIBS"
+LIBGNUTLS_EXTRA_LIBS="-L${libdir} -lgnutls-extra $LIBGNUTLS_LIBS"
 LIBGNUTLS_EXTRA_CFLAGS="-I${includedir}"
 AC_SUBST(LIBGNUTLS_EXTRA_LIBS)
 AC_SUBST(LIBGNUTLS_EXTRA_CFLAGS)
index 3439ceba6f25cd81009099a412a022deb5eeaab0..ae71f039d19fff697864b049c36f18e2f8b455b4 100644 (file)
@@ -236,12 +236,6 @@ The supported compression algorithms are:
 @item DEFLATE
 Zlib compression, using the deflate algorithm.
 
-@item LZO
-LZO is a very fast compression algorithm.  This algorithm is only
-available if the @acronym{GnuTLS-extra} library has been initialized
-and the private extensions are enabled, and if GnuTLS was built with
-LZO support.
-
 @end table
 
 @node Weaknesses and countermeasures
index 1c4058bf455373f893877c11e185121b1840c977..10e41d61fd7d7da6aae361edf061b65d78cf26e6 100644 (file)
@@ -122,9 +122,8 @@ distribution archive.  Typically you invoke @code{./configure} and
 then @code{make check install}.  There are a number of compile-time
 parameters, as discussed below.
 
-The compression libraries (libz and lzo) are optional dependencies.
-You can get libz from @url{http://www.zlib.net/}.  You can get lzo
-from @url{http://www.oberhumer.com/opensource/lzo/}.
+The compression library (libz) is an optional dependency.
+You can get libz from @url{http://www.zlib.net/}.  
 
 The X.509 part of GnuTLS needs ASN.1 functionality, from a library
 called libtasn1.  A copy of libtasn1 is included in GnuTLS.  If you
index 2f44e8368d1388cdbdbbcc21a0abcc95aea22e76..8b9aea55d27bf4e4527e76266a4a91ea178c54a3 100644 (file)
@@ -506,7 +506,6 @@ Checking for ARCFOUR 40 cipher support... no
 Checking for MD5 MAC support... yes
 Checking for SHA1 MAC support... yes
 Checking for ZLIB compression support (TLS extension)... yes
-Checking for LZO compression support (GnuTLS extension)... yes
 Checking for max record size (TLS extension)... yes
 Checking for SRP authentication support (TLS extension)... yes
 Checking for OpenPGP authentication support (TLS extension)... no
index b0f67ce5ed5ea07b2a4dd17e8e1fe63df7b2e92e..67db1fad2fb5a5445df9c31313d7c170e43d7f72 100644 (file)
@@ -103,9 +103,6 @@ gnutls_compression_entry _gnutls_compression_algorithms[MAX_COMP_METHODS] = {
 };
 
 static const gnutls_compression_method_t supported_compressions[] = {
-#ifdef USE_LZO
-  GNUTLS_COMP_LZO,
-#endif
 #ifdef HAVE_LIBZ
   GNUTLS_COMP_DEFLATE,
 #endif
@@ -168,9 +165,7 @@ gnutls_compression_get_id (const char *name)
 /**
  * gnutls_compression_list:
  *
- * Get a list of compression methods.  Note that to be able to use LZO
- * compression, you must link to libgnutls-extra and call
- * gnutls_global_init_extra().
+ * Get a list of compression methods.  
  *
  * Returns: a zero-terminated list of #gnutls_compression_method_t
  *   integers indicating the available compression methods.
@@ -299,26 +294,6 @@ _gnutls_supported_compression_methods (gnutls_session_t session,
 }
 
 
-#ifdef USE_LZO
-#ifdef USE_MINILZO
-/* Get the prototypes only.  Since LZO is a GPLed library, the
- * gnutls_global_init_extra() has to be called, before LZO compression
- * can be used.
- */
-#include "../libextra/minilzo/minilzo.h"
-#elif HAVE_LZO_LZO1X_H
-#include <lzo/lzo1x.h>
-#elif HAVE_LZO1X_H
-#include <lzo1x.h>
-#endif
-
-typedef int (*LZO_FUNC) ();
-
-LZO_FUNC _gnutls_lzo1x_decompress_safe = NULL;
-LZO_FUNC _gnutls_lzo1x_1_compress = NULL;
-
-#endif
-
 /* The flag d is the direction (compress, decompress). Non zero is
  * decompress.
  */
@@ -380,21 +355,6 @@ _gnutls_comp_init (gnutls_compression_method_t method, int d)
           }
       }
       break;
-#endif
-    case GNUTLS_COMP_LZO:
-#ifdef USE_LZO
-      /* LZO does not use memory on decompressor */
-      if (!d)
-        {
-          ret->handle = gnutls_malloc (LZO1X_1_MEM_COMPRESS);
-
-          if (ret->handle == NULL)
-            {
-              gnutls_assert ();
-              goto cleanup_ret;
-            }
-        }
-      break;
 #endif
     case GNUTLS_COMP_NULL:
     case GNUTLS_COMP_UNKNOWN:
@@ -459,39 +419,6 @@ _gnutls_compress (comp_hd_t handle, const opaque * plain,
 
   switch (handle->algo)
     {
-#ifdef USE_LZO
-    case GNUTLS_COMP_LZO:
-      {
-        lzo_uint out_len;
-        size_t size;
-        int err;
-
-        if (_gnutls_lzo1x_1_compress == NULL)
-          return GNUTLS_E_COMPRESSION_FAILED;
-
-        size = plain_size + plain_size / 64 + 16 + 3;
-        *compressed = gnutls_malloc (size);
-        if (*compressed == NULL)
-          {
-            gnutls_assert ();
-            return GNUTLS_E_MEMORY_ERROR;
-          }
-
-        err = _gnutls_lzo1x_1_compress (plain, plain_size, *compressed,
-                                        &out_len, handle->handle);
-
-        if (err != LZO_E_OK)
-          {
-            gnutls_assert ();
-            gnutls_free (*compressed);
-            *compressed = NULL;
-            return GNUTLS_E_COMPRESSION_FAILED;
-          }
-
-        compressed_size = out_len;
-        break;
-      }
-#endif
 #ifdef HAVE_LIBZ
     case GNUTLS_COMP_DEFLATE:
       {
@@ -574,51 +501,6 @@ _gnutls_decompress (comp_hd_t handle, opaque * compressed,
 
   switch (handle->algo)
     {
-#ifdef USE_LZO
-    case GNUTLS_COMP_LZO:
-      {
-        lzo_uint out_size;
-        lzo_uint new_size;
-        int err;
-
-        if (_gnutls_lzo1x_decompress_safe == NULL)
-          return GNUTLS_E_DECOMPRESSION_FAILED;
-
-        *plain = NULL;
-        out_size = compressed_size + compressed_size;
-        plain_size = 0;
-
-        do
-          {
-            out_size += 512;
-            *plain = gnutls_realloc_fast (*plain, out_size);
-            if (*plain == NULL)
-              {
-                gnutls_assert ();
-                return GNUTLS_E_MEMORY_ERROR;
-              }
-
-            new_size = out_size;
-            err =
-              _gnutls_lzo1x_decompress_safe (compressed,
-                                             compressed_size, *plain,
-                                             &new_size, NULL);
-
-          }
-        while ((err == LZO_E_OUTPUT_OVERRUN && out_size < max_record_size));
-
-        if (err != LZO_E_OK)
-          {
-            gnutls_assert ();
-            gnutls_free (*plain);
-            *plain = NULL;
-            return GNUTLS_E_DECOMPRESSION_FAILED;
-          }
-
-        plain_size = new_size;
-        break;
-      }
-#endif
 #ifdef HAVE_LIBZ
     case GNUTLS_COMP_DEFLATE:
       {
index 3ba8a1a67a9eeb8e723a24e567e7d8fb31388e1b..c87f1cfec669707c4e4f86a0529d110ac52f658b 100644 (file)
@@ -224,8 +224,6 @@ static const gnutls_error_entry error_algorithms[] = {
                GNUTLS_E_OPENPGP_KEYRING_ERROR, 1),
   ERROR_ENTRY (N_("The initialization of crypto backend has failed."),
                GNUTLS_E_CRYPTO_INIT_FAILED, 1),
-  ERROR_ENTRY (N_("The initialization of LZO has failed."),
-               GNUTLS_E_LZO_INIT_FAILED, 1),
   ERROR_ENTRY (N_("No supported compression algorithms have been found."),
                GNUTLS_E_NO_COMPRESSION_ALGORITHMS, 1),
   ERROR_ENTRY (N_("No supported cipher suites have been found."),
index ed3037db5c5443ef5eee6b972bcf4f5eee2b96cb..bce13df080b5a8bf7f86b20ef0b0804772f167d8 100644 (file)
@@ -764,9 +764,8 @@ _gnutls_record_set_default_version (gnutls_session_t session,
  * suites (the ones that start with 0xFF).  By default or if @allow
  * is 0 then these cipher suites will not be advertized nor used.
  *
- * Unless this function is called with the option to allow (1), then
- * no compression algorithms, like LZO.  That is because these
- * algorithms are not yet defined in any RFC or even internet draft.
+ * Currently GnuTLS does not include such cipher-suites or
+ * compression algorithms.
  *
  * Enabling the private ciphersuites when talking to other than
  * gnutls servers and clients may cause interoperability problems.
index 75521da663421b65ad1789d89a4af90e5cd9b792..12f8d73f2fc66f3fe5a4fc4d9b049ec8f6f0db1f 100644 (file)
@@ -263,7 +263,6 @@ extern "C"
    * @GNUTLS_COMP_NULL: The NULL compression method (uncompressed).
    * @GNUTLS_COMP_DEFLATE: The deflate/zlib compression method.
    * @GNUTLS_COMP_ZLIB: Same as %GNUTLS_COMP_DEFLATE.
-   * @GNUTLS_COMP_LZO: The non-standard LZO compression method.
    *
    * Enumeration of different TLS compression methods.
    */
@@ -273,9 +272,6 @@ extern "C"
     GNUTLS_COMP_NULL = 1,
     GNUTLS_COMP_DEFLATE = 2,
     GNUTLS_COMP_ZLIB = GNUTLS_COMP_DEFLATE,
-    GNUTLS_COMP_LZO = 3         /* only available if gnutls-extra has
-                                   been initialized
-                                 */
   } gnutls_compression_method_t;
 
   /**
@@ -1644,7 +1640,6 @@ extern "C"
    */
 #define GNUTLS_E_NO_TEMPORARY_RSA_PARAMS -84
 
-#define GNUTLS_E_LZO_INIT_FAILED -85
 #define GNUTLS_E_NO_COMPRESSION_ALGORITHMS -86
 #define GNUTLS_E_NO_CIPHER_SUITES -87
 
index f5d967e4fa9deb89f0c83dad99fc31c9f1b8c866..2efb8dfe9f792060eb4894c9f9ffb7780abc65ac 100644 (file)
@@ -717,8 +717,6 @@ GNUTLS_PRIVATE {
     # Internal symbols needed by libgnutls-extra for LZO:
     _gnutls_compression_algorithms;
     _gnutls_comp_algorithms_size;
-    _gnutls_lzo1x_decompress_safe;
-    _gnutls_lzo1x_1_compress;
     # Internal symbols needed by libgnutls-openssl:
     _gnutls_pkix1_asn;
     _gnutls_x509_parse_dn_oid;
index 302b092a6876e9b1d19cb5c2e3787e98c6e0d812..bdcbfccf7ec02e2e49cb4341e3a719790052527d 100644 (file)
 #include <gnutls_errors.h>
 #include <gnutls_extensions.h>
 #include <gnutls_algorithms.h>
+#include <gnutls/extra.h>
 
 #ifdef HAVE_GCRYPT
 #include <gcrypt.h>
 #endif
 
-#ifdef USE_LZO
-#ifdef USE_MINILZO
-#include "minilzo/minilzo.h"
-#elif HAVE_LZO_LZO1X_H
-#include <lzo/lzo1x.h>
-#elif HAVE_LZO1X_H
-#include <lzo1x.h>
-#endif
-#endif
-#include <gnutls/extra.h>
-
-#ifdef USE_LZO
-#include <gnutls_compress.h>
-
-/* the number of the compression algorithms available in the compression
- * structure.
- */
-extern int _gnutls_comp_algorithms_size;
-
-typedef int (*LZO_FUNC) ();
-extern LZO_FUNC _gnutls_lzo1x_decompress_safe;
-extern LZO_FUNC _gnutls_lzo1x_1_compress;
-
-extern gnutls_compression_entry _gnutls_compression_algorithms[];
-
-static int
-_gnutls_add_lzo_comp (void)
-{
-  int i;
-
-  /* find the last element */
-  for (i = 0; i < _gnutls_comp_algorithms_size; i++)
-    {
-      if (_gnutls_compression_algorithms[i].name == NULL)
-        break;
-    }
-
-  if (_gnutls_compression_algorithms[i].name == NULL
-      && (i < _gnutls_comp_algorithms_size - 1))
-    {
-      _gnutls_compression_algorithms[i].name = "GNUTLS_COMP_LZO";
-      _gnutls_compression_algorithms[i].id = GNUTLS_COMP_LZO;
-      _gnutls_compression_algorithms[i].num = 0xf2;
-
-      _gnutls_compression_algorithms[i + 1].name = 0;
-
-      /* Now enable the lzo functions: */
-      _gnutls_lzo1x_decompress_safe = lzo1x_decompress_safe;
-      _gnutls_lzo1x_1_compress = lzo1x_1_compress;
-
-      return 0;                 /* ok */
-    }
-
-
-  return GNUTLS_E_MEMORY_ERROR;
-}
-#endif
-
 static int _gnutls_init_extra = 0;
 
 /**
@@ -123,28 +66,6 @@ gnutls_global_init_extra (void)
   if (_gnutls_init_extra != 1)
     return 0;
 
-  /* Initialize the LZO library
-   */
-#ifdef USE_LZO
-  if (lzo_init () != LZO_E_OK)
-    return GNUTLS_E_LZO_INIT_FAILED;
-
-  /* Add the LZO compression method in the list of compression
-   * methods.
-   */
-  {
-    int ret;
-
-    ret = _gnutls_add_lzo_comp ();
-    if (ret < 0)
-      {
-       gnutls_assert ();
-       return ret;
-      }
-  }
-#endif
-
-
 #ifdef HAVE_GCRYPT
 #ifdef gcry_fips_mode_active
   /* Libgcrypt manual says that gcry_version_check must be called
index c629e6f3a9dad5d8e0101e821bc8c4b89d05cc0c..76a366cb947468537a8564b8de7b67a23c46e20d 100644 (file)
@@ -156,35 +156,6 @@ fi
 
   fi
 
-  AC_ARG_WITH(lzo,
-    AS_HELP_STRING([--with-lzo], [use experimental LZO compression]),
-                   use_lzo=$withval, use_lzo=no)
-  AC_MSG_CHECKING([whether to include LZO compression support])
-  AC_MSG_RESULT($use_lzo)
-  LZO_LIBS=
-  if test "$use_lzo" = "yes"; then
-    AC_CHECK_LIB(lzo2, lzo1x_1_compress, LZO_LIBS=-llzo2)
-    if test "$LZO_LIBS" = ""; then
-      AC_CHECK_LIB(lzo, lzo1x_1_compress, LZO_LIBS=-llzo, [
-        use_lzo=no
-        AC_MSG_WARN(
-  ***
-  *** Could not find liblzo or liblzo2.  Disabling LZO compression.
-  )
-        ])
-    fi
-  fi
-  AC_SUBST(LZO_LIBS)
-  if test "$use_lzo" = "yes"; then
-    AC_DEFINE([USE_LZO], 1, [whether to use the LZO compression])
-    if test "$LZO_LIBS" = "-llzo"; then
-      AC_CHECK_HEADERS(lzo1x.h)
-    elif test "$LZO_LIBS" = "-llzo2"; then
-      AC_CHECK_HEADERS(lzo/lzo1x.h)
-    fi
-  fi
-  AM_CONDITIONAL(USE_LZO, test "$use_lzo" = "yes")
-
   AC_MSG_CHECKING([whether C99 macros are supported])
   AC_TRY_COMPILE(,
   [