Re: gnutls support is ready
"Anibal Avelar" <[email protected]> Tue, 12 Jun 2007 16:58:34 -0500
| Newsgroups | gmane.network.centericq,gmane.network.centerim.user,gmane.network.centerim.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi everybody again. While wait for the patch I have ready a experimental version for centerim with gnutls (effective) support in my personal debian unstable repository [1]: deb http://fixxxer.cc/debian unstable/ deb-src http://fixxxer.cc/debian unstable/ Regards. [1] http://fixxxer.cc/blog-en/?page_id=13 On 6/12/07, Anibal Avelar <[email protected]> wrote: > Hi everybody. > > Because I saw centerim has problems to work with gnutls I made the > definitive support to GNUTLS library. The normal way was to use > openssl instead gnutls. > But at least into Debian, the openssl license is GPL non-compatible, > for that is better to use gnutls support. > > Whom were affected? > > + Jabber with SSL support (necessary to gTalk) > + Gadu Gadu with SSL support > > I proved with this: > > ./configure --with-ssl > > Installing libgnutls-dev instead libssl-dev, Jabber/gTalk does not work. > > I check what was the problem and I found it. > > When you gives the --with-ssl parameter centerim to find for OpenSSL > by default, it didn't find it, check for gnutls support. This is good. > > But the problem is: > > Inside connwrap/configure.ac and libgadu/configure.ac files aren't > prepare to receive this parameters, for example in > connwrap/configure.ac: > > if test -n "$with_ssl" -a x"$with_ssl" != xno; then > AC_DEFINE(HAVE_SSL) > if test -n "$with_openssl" -a x"$with_openssl" != xno; then > AC_DEFINE(HAVE_OPENSSL) > AC_CHECK_LIB(crypto, main, [ > AC_CHECK_LIB(crypto, SSLeay_add_all_algorithms, [ > AC_DEFINE(HAVE_SSLEAY) > ]) > ]) > fi > fi > > We don't have defined the HAVE_GNUTLS var, then when I want to use it > inside connwrap/ files, it's not defined. > > The correct would be: > > > if test -n "$with_ssl" -a x"$with_ssl" != xno; then > AC_DEFINE(HAVE_SSL) > if test -n "$with_openssl" -a x"$with_openssl" != xno; then > AC_DEFINE(HAVE_OPENSSL) > AC_CHECK_LIB(crypto, main, [ > AC_CHECK_LIB(crypto, SSLeay_add_all_algorithms, [ > AC_DEFINE(HAVE_SSLEAY) > ]) > ]) > else > AC_MSG_RESULT([not found or disabled]) > with_ssl="no" > > AM_PATH_LIBGNUTLS_EXTRA(0.0.1, [ > AC_CHECK_LIB(lzo, lzo1x_1_compress, [], [ > echo "lzo compression is required."; > exit -1 > ] ) > CXXFLAGS="$CXXFLAGS $LIBGNUTLS_CFLAGS" > LIBS="$LIBS $LIBGNUTLS_LIBS -lgnutls-extra" > AC_DEFINE(HAVE_GNUTLS, 1, [use gnutls]) > with_ssl="yes" > ac_configure_args="$ac_configure_args --with-ssl" > ]) > fi > fi > > Is strange that in the top directory on centerim has defined it, but > not below (is exactly the same problem inside libgadu dir). > > I fixed both files (connwrap/configure.ac and libgadu/configure.ac) > and after I did the porting to gnutls. > > Now, we have both supports without problems: Openssl and GNUTLS. Also > are mutually excluded to avoid problems. > > To work you need: > > If you have OpenSSL > ./configure --with-ssl > > If you have Gnutls > ./configure --with-ssl --with-openssl=no > > This is because by default is --with-openssl=yes > > The second reason because I had to do this is because Julien Lemoine > tried to use the backward compatiblity to openssl from gnutls using > gnutls/openssl.h header, but it not work (I tried). Also if you want > to use the gnutls backward compatiblity gnutls/openssl.h, you need to > link the libgnutls-openssl.so library in addition to libgnutls.so. > > Now all work fine with both. > > I send the patch. Of course to apply the configure.ac, you need to do > run automake command. > > I hope this patch would be included in the offcial centerim branch. > With this I can build the official debian package, because I can't do > with the Openssl support by the license problems mentioned above. > > Please, I hope your comments. > > Regards. > > > > > > > > > > > -- > Anibal Avelar (FixXxeR) http://fixxxer.cc > GPG: 83B64656 - C143 4AD8 B017 53FA B742 D6AA CEEA F9F3 83B6 4656 > > -- Anibal Avelar (FixXxeR) http://fixxxer.cc GPG: 83B64656 - C143 4AD8 B017 53FA B742 D6AA CEEA F9F3 83B6 4656 _______________________________________________ Cicq mailing list Cicq-xGejAJT2w6wWP6gT/[email protected] http://mailman.linuxpl.org/mailman/listinfo/cicq Questions? Check the FAQ first: http://centericq.de/faq/