check for gnutls version

Joe Orton joe at manyfish.co.uk
Wed Dec 2 16:40:18 EST 2009


On Sat, Nov 21, 2009 at 02:50:49PM +0100, Werner Baumann wrote:
> When I configure neon "--with-ssl=gnutls" on my Debian Lenny system,
> configure runs fine, but the compiler complains about missing
> declarations for "GNUTLS_CERT_NOT_ACTIVATED" and "GNUTLS_CERT_EXPIRED".
> These constants where only introduced in GnuTLS version 2.7.8 (Lenny
> has version 2.4.2.
> Should not neon.m4 check for the appropriate version of GnuTLS?

Actually it should work fine with older versions.  I've applied this 
patch - does this work for you?  The output of "make check TESTS=ssl" 
with this applied would be useful, if that runs.

Index: src/ne_gnutls.c
===================================================================
--- src/ne_gnutls.c	(revision 1747)
+++ src/ne_gnutls.c	(working copy)
@@ -785,8 +785,10 @@
         int to;
     } map[] = {
         { GNUTLS_CERT_REVOKED, NE_SSL_REVOKED },
+#if LIBGNUTLS_VERSION_NUMBER >= 0x020800
         { GNUTLS_CERT_NOT_ACTIVATED, NE_SSL_NOTYETVALID },
         { GNUTLS_CERT_EXPIRED, NE_SSL_EXPIRED },
+#endif
         { GNUTLS_CERT_INVALID|GNUTLS_CERT_SIGNER_NOT_FOUND, NE_SSL_UNTRUSTED },
         { GNUTLS_CERT_INVALID|GNUTLS_CERT_SIGNER_NOT_CA, NE_SSL_UNTRUSTED }
     };



More information about the neon mailing list