Skip to content

Commit b4b157e

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix compilation of ftp without openssl
2 parents b500ddd + 4f934cb commit b4b157e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/ftp/ftp.c

+4
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,11 @@ ftp_close(ftpbuf_t *ftp)
167167
if (ftp == NULL) {
168168
return NULL;
169169
}
170+
#ifdef HAVE_FTP_SSL
170171
if (ftp->last_ssl_session) {
171172
SSL_SESSION_free(ftp->last_ssl_session);
172173
}
174+
#endif
173175
if (ftp->data) {
174176
data_close(ftp, ftp->data);
175177
}
@@ -232,6 +234,7 @@ ftp_quit(ftpbuf_t *ftp)
232234
}
233235
/* }}} */
234236

237+
#ifdef HAVE_FTP_SSL
235238
static int ftp_ssl_new_session_cb(SSL *ssl, SSL_SESSION *sess)
236239
{
237240
ftpbuf_t *ftp = SSL_get_app_data(ssl);
@@ -245,6 +248,7 @@ static int ftp_ssl_new_session_cb(SSL *ssl, SSL_SESSION *sess)
245248
/* Return 0 as we are not using OpenSSL's session cache. */
246249
return 0;
247250
}
251+
#endif
248252

249253
/* {{{ ftp_login */
250254
int

0 commit comments

Comments
 (0)