summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-04-17 13:28:11 +0200
committerSimon Josefsson <simon@josefsson.org>2008-04-17 13:28:11 +0200
commite9112f5bbe78b2d8c772432d8b69294a4dd43624 (patch)
treec03e89dca8070f88580d8f10c1815e414fc29e17
parentbadf8ae9e80620e03951cca71f59603fdb3550a8 (diff)
downloadgnutls-e9112f5bbe78b2d8c772432d8b69294a4dd43624.tar.gz
Remove code to link with external opencdk.
It seems we now don't have resources to maintain the LGPL opencdk code externally, since making it use GnuTLS's crypto code will be complicated. See discussion in: http://thread.gmane.org/gmane.comp.encryption.gpg.gnutls.devel/2672/focus=2711
-rw-r--r--configure.in43
-rw-r--r--lib/Makefile.am6
-rw-r--r--lib/opencdk/misc.c76
3 files changed, 2 insertions, 123 deletions
diff --git a/configure.in b/configure.in
index c7f9b0d0bd..83eaf1fc53 100644
--- a/configure.in
+++ b/configure.in
@@ -45,8 +45,6 @@ ac_full=1
SOVERSION=`expr ${LT_CURRENT} - ${LT_AGE}`
AC_SUBST(SOVERSION)
-dnl for opencdk needs also change in the test
-GNUTLS_OPENCDK_VERSION=0.6.5
GNUTLS_GCRYPT_VERSION=1:1.2.4
GNUTLS_LIBTASN1_VERSION=0.3.4
AC_DEFINE_UNQUOTED(GNUTLS_GCRYPT_VERSION, "$GNUTLS_GCRYPT_VERSION", [version of gcrypt])
@@ -489,43 +487,6 @@ else
fi
AM_CONDITIONAL(ENABLE_OPENPGP, test "$ac_enable_openpgp" = "yes")
-dnl Test whether to use the included opencdk library
-dnl
-dnl We no longer test for it. We use the LGPL parts of this library internally
-dnl if test x$ac_enable_openpgp = xyes; then
-dnl AC_ARG_WITH(included-opencdk,
-dnl AS_HELP_STRING([--with-included-opencdk], [use the included opencdk]),
-dnl ac_enable_included_opencdk=$withval,
-dnl ac_enable_included_opencdk=no)
-dnl if test x$ac_enable_included_opencdk = xno;then
-dnl AC_LIB_HAVE_LINKFLAGS(opencdk,, [
-dnl #include <opencdk.h>], [
-dnl #if OPENCDK_VERSION_MINOR < 6 || OPENCDK_VERSION_PATCH < 5
-dnl # error "OpenCDK 0.6.5 is required"
-dnl #else
-dnl cdk_check_version( NULL);
-dnl #endif
-dnl ])
-dnl if test "$ac_cv_libopencdk" != yes; then
-dnl ac_enable_included_opencdk=yes
-dnl AC_MSG_WARN([[
-dnl ***
-dnl *** libopencdk was not found. You may want to get it from
-dnl *** ftp://ftp.gnutls.org/pub/gnutls/opencdk/
-dnl ***
-dnl *** Will use the included opencdk.
-dnl ***
-dnl ]])
-dnl fi
-dnl AC_MSG_CHECKING([whether to use the included opencdk])
-dnl AC_MSG_RESULT($ac_enable_included_opencdk)
-dnl fi
-dnl fi
-
-ac_enable_included_opencdk=yes
-
-AM_CONDITIONAL(ENABLE_INCLUDED_OPENCDK, test "$ac_enable_included_opencdk" = "yes")
-
AC_MSG_CHECKING([whether to disable OpenSSL compatibility layer])
AC_ARG_ENABLE(openssl-compatibility,
AS_HELP_STRING([--disable-openssl-compatibility],
@@ -674,8 +635,8 @@ LIBGNUTLS_CFLAGS="$LIBGCRYPT_CFLAGS $LIBTASN1_CFLAGS -I${includedir}"
AC_SUBST(LIBGNUTLS_LIBS)
AC_SUBST(LIBGNUTLS_CFLAGS)
-LIBGNUTLS_EXTRA_LIBS="-L${libdir} -lgnutls-extra $LTLIBOPENCDK $LZO_LIBS $LIBGNUTLS_LIBS"
-LIBGNUTLS_EXTRA_CFLAGS="$INCOPENCDK -I${includedir}"
+LIBGNUTLS_EXTRA_LIBS="-L${libdir} -lgnutls-extra $LZO_LIBS $LIBGNUTLS_LIBS"
+LIBGNUTLS_EXTRA_CFLAGS="-I${includedir}"
AC_SUBST(LIBGNUTLS_EXTRA_LIBS)
AC_SUBST(LIBGNUTLS_EXTRA_CFLAGS)
export ac_full
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 21411415e2..843358e7f0 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -37,10 +37,8 @@ AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" \
$(LIBOPENCDK_CFLAGS) $(LIBGCRYPT_CFLAGS)
if ENABLE_OPENPGP
-if ENABLE_INCLUDED_OPENCDK
SUBDIRS += opencdk
AM_CPPFLAGS += -I$(srcdir)/opencdk
-endif
SUBDIRS += openpgp
endif
@@ -122,11 +120,7 @@ libgnutls_la_LIBADD = ../lgl/liblgnu.la x509/libgnutls_x509.la \
if ENABLE_OPENPGP
libgnutls_la_SOURCES += gnutls_openpgp.c
libgnutls_la_LIBADD += openpgp/libgnutls_openpgp.la
-if ENABLE_INCLUDED_OPENCDK
libgnutls_la_LIBADD += opencdk/libminiopencdk.la
-else
-libgnutls_la_LDFLAGS += $(LTLIBOPENCDK)
-endif
endif
if HAVE_LD_VERSION_SCRIPT
diff --git a/lib/opencdk/misc.c b/lib/opencdk/misc.c
index 065fb7f274..97302475a7 100644
--- a/lib/opencdk/misc.c
+++ b/lib/opencdk/misc.c
@@ -59,82 +59,6 @@ _cdk_u32tobuf (u32 u, byte *buf)
buf[3] = u ;
}
-
-static const char *
-parse_version_number (const char *s, int *number)
-{
- int val = 0;
-
- if (*s == '0' && isdigit (s[1]))
- return NULL;
- /* leading zeros are not allowed */
- for (; isdigit(*s); s++)
- {
- val *= 10;
- val += *s - '0';
- }
- *number = val;
- return val < 0? NULL : s;
-}
-
-
-static const char *
-parse_version_string (const char * s, int * major, int * minor, int * micro)
-{
- s = parse_version_number( s, major );
- if( !s || *s != '.' )
- return NULL;
- s++;
- s = parse_version_number (s, minor);
- if (!s || *s != '.')
- return NULL;
- s++;
- s = parse_version_number(s, micro);
- if (!s)
- return NULL;
- return s; /* patchlevel */
-}
-
-
-/**
- * cdk_check_version:
- * @req_version: The requested version
- *
- * Check that the the version of the library is at minimum the requested
- * one and return the version string; return NULL if the condition is
- * not satisfied. If a NULL is passed to this function, no check is done,
- *but the version string is simply returned.
- **/
-const char *
-cdk_check_version (const char *req_version)
-{
- const char *ver = VERSION;
- int my_major, my_minor, my_micro;
- int rq_major, rq_minor, rq_micro;
- const char *my_plvl, *rq_plvl;
-
- if (!req_version)
- return ver;
- my_plvl = parse_version_string (ver, &my_major, &my_minor, &my_micro);
- if (!my_plvl)
- return NULL;
- /* very strange our own version is bogus */
- rq_plvl = parse_version_string (req_version, &rq_major, &rq_minor,
- &rq_micro);
- if (!rq_plvl)
- return NULL; /* req version string is invalid */
- if (my_major > rq_major
- || (my_major == rq_major && my_minor > rq_minor)
- || (my_major == rq_major && my_minor == rq_minor
- && my_micro > rq_micro)
- || (my_major == rq_major && my_minor == rq_minor
- && my_micro == rq_micro
- && strcmp (my_plvl, rq_plvl) >= 0))
- return ver;
- return NULL;
-}
-
-
/**
* cdk_strlist_free:
* @sl: the string list