From 4f934cb7f7cf65f17f01b8be472dedf269ad6030 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 4 Dec 2023 15:48:51 +0100 Subject: [PATCH] Fix compilation of ftp without openssl Closes GH-12866 --- ext/ftp/ftp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 54326889042..dd1f9d6654c 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -167,9 +167,11 @@ ftp_close(ftpbuf_t *ftp) if (ftp == NULL) { return NULL; } +#ifdef HAVE_FTP_SSL if (ftp->last_ssl_session) { SSL_SESSION_free(ftp->last_ssl_session); } +#endif if (ftp->data) { data_close(ftp, ftp->data); } @@ -232,6 +234,7 @@ ftp_quit(ftpbuf_t *ftp) } /* }}} */ +#ifdef HAVE_FTP_SSL static int ftp_ssl_new_session_cb(SSL *ssl, SSL_SESSION *sess) { ftpbuf_t *ftp = SSL_get_app_data(ssl); @@ -245,6 +248,7 @@ static int ftp_ssl_new_session_cb(SSL *ssl, SSL_SESSION *sess) /* Return 0 as we are not using OpenSSL's session cache. */ return 0; } +#endif /* {{{ ftp_login */ int