[lftp] gnutls >=2.12: warning: 'int gnutls_protocol_set_priority(gnutls_session_int*, const int*)' is deprecated

Alexander V. Lukyanov lav at netis.ru
Mon Aug 1 13:47:52 MSK 2011


On Thu, Jul 21, 2011 at 12:08:08PM +0200, Noël Köthe wrote:
> this is a report from Andreas Metzler <ametzler downhill.at.eu.org>:
>
> --8<--
> This package is using some functions which are marked deprecated in
> newer versions of GnuTLS (>=2.12.x). (They are not yet removed, though.)
> These functions will be removed in future releases. GnuTLS 2.12.x is
> already available in experimental.

Does this patch fix the problem? I hope I understand the meaning of the calls :)

--
   Alexander.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
Index: lftp_ssl.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/lftp_ssl.cc,v
retrieving revision 1.42
diff -u -p -r1.42 lftp_ssl.cc
--- lftp_ssl.cc	10 Feb 2011 11:11:23 -0000	1.42
+++ lftp_ssl.cc	1 Aug 2011 10:37:20 -0000
@@ -274,10 +274,7 @@ lftp_ssl_gnutls::lftp_ssl_gnutls(int fd1
    // hack for some ftp servers
    const char *auth=ResMgr::Query("ftp:ssl-auth", hostname);
    if(auth && !strncmp(auth, "SSL", 3))
-   {
-      int proto[] = { GNUTLS_SSL3, 0 };
-      gnutls_protocol_set_priority(session, proto);
-   }
+      gnutls_priority_set_direct(session, "NORMAL:+SSL3.0:-TLS1.0:-TLS1.1:-TLS1.2");
 }
 void lftp_ssl_gnutls::load_keys()
 {


More information about the Lftp mailing list