changeset 820:0eb64b3a3632

Fix compilation with gnutls < 3.x
author Sebastien Decugis <sdecugis@freediameter.net>
date Tue, 11 Sep 2012 20:51:18 +0200
parents 448a96910f5b
children a39848239f3a
files libfdcore/config.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libfdcore/config.c	Sun Sep 09 21:34:21 2012 +0200
+++ b/libfdcore/config.c	Tue Sep 11 20:51:18 2012 +0200
@@ -397,7 +397,13 @@
 		}
 		
 		CHECK_MALLOC( certs = calloc(cert_max, sizeof(gnutls_x509_crt_t)) );
-		CHECK_GNUTLS_DO( gnutls_x509_crt_list_import(certs, &cert_max, &certfile, GNUTLS_X509_FMT_PEM, GNUTLS_X509_CRT_LIST_FAIL_IF_UNSORTED),
+		CHECK_GNUTLS_DO( gnutls_x509_crt_list_import(certs, &cert_max, &certfile, GNUTLS_X509_FMT_PEM, 
+				#ifdef GNUTLS_VERSION_300
+				GNUTLS_X509_CRT_LIST_FAIL_IF_UNSORTED
+				#else /* GNUTLS_VERSION_300 */
+				0
+				#endif /* GNUTLS_VERSION_300 */
+				),
 			{
 				TRACE_DEBUG(INFO, "Failed to import the data from file '%s'", fd_g_config->cnf_sec_data.cert_file);
 				free(certfile.data);
"Welcome to our mercurial repository"