* Version 2.99.1 (unreleased)
+** libgnutls-extra: Dropped support of LZO compression via liblzo.
+
** API and ABI modifications:
No changes since last version.
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)
@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
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
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
};
static const gnutls_compression_method_t supported_compressions[] = {
-#ifdef USE_LZO
- GNUTLS_COMP_LZO,
-#endif
#ifdef HAVE_LIBZ
GNUTLS_COMP_DEFLATE,
#endif
/**
* 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.
}
-#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.
*/
}
}
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:
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:
{
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:
{
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."),
* 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.
* @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.
*/
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;
/**
*/
#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
# 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;
#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;
/**
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
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(,
[