mirror of
git://slackware.nl/current.git
synced 2024-12-27 09:59:16 +01:00
335ab38e49
a/kernel-firmware-20230313_c761dbe-noarch-1.txz: Upgraded. a/kernel-generic-6.1.19-x86_64-1.txz: Upgraded. a/kernel-huge-6.1.19-x86_64-1.txz: Upgraded. a/kernel-modules-6.1.19-x86_64-1.txz: Upgraded. a/mcelog-192-x86_64-1.txz: Upgraded. d/ccache-4.8-x86_64-1.txz: Upgraded. d/kernel-headers-6.1.19-x86-1.txz: Upgraded. d/rust-1.67.1-x86_64-2.txz: Rebuilt. Moved here from /testing (not actually rebuilt). k/kernel-source-6.1.19-noarch-1.txz: Upgraded. l/imagemagick-7.1.1_3-x86_64-1.txz: Upgraded. n/vsftpd-3.0.5-x86_64-3.txz: Rebuilt. Patched to compile against openssl-3.0.8. Thanks to Stuart Winter. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. testing/packages/rust-1.68.0-x86_64-1.txz: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
72 lines
2.2 KiB
Diff
72 lines
2.2 KiB
Diff
https://src.fedoraproject.org/rpms/vsftpd/raw/rawhide/f/vsftpd-3.0.5-replace-deprecated-openssl-functions.patch
|
|
|
|
diff --git a/ssl.c b/ssl.c
|
|
--- ssl.c
|
|
+++ ssl.c
|
|
@@ -28,17 +28,17 @@
|
|
#include <openssl/err.h>
|
|
#include <openssl/rand.h>
|
|
#include <openssl/bio.h>
|
|
#include <openssl/bn.h>
|
|
#include <openssl/param_build.h>
|
|
#include <errno.h>
|
|
#include <limits.h>
|
|
|
|
static char* get_ssl_error();
|
|
static SSL* get_ssl(struct vsf_session* p_sess, int fd);
|
|
static int ssl_session_init(struct vsf_session* p_sess);
|
|
static void setup_bio_callbacks();
|
|
static long bio_callback(
|
|
- BIO* p_bio, int oper, const char* p_arg, int argi, long argl, long retval);
|
|
+ BIO* p_bio, int oper, const char* p_arg, size_t len, int argi, long argl, int ret, size_t *processed);
|
|
static int ssl_verify_callback(int verify_ok, X509_STORE_CTX* p_ctx);
|
|
static int ssl_alpn_callback(SSL* p_ssl,
|
|
const unsigned char** p_out,
|
|
@@ -88,7 +88,7 @@
|
|
long options;
|
|
int verify_option = 0;
|
|
SSL_library_init();
|
|
- p_ctx = SSL_CTX_new(SSLv23_server_method());
|
|
+ p_ctx = SSL_CTX_new_ex(NULL, NULL, SSLv23_server_method());
|
|
if (p_ctx == NULL)
|
|
{
|
|
die("SSL: could not allocate SSL context");
|
|
@@ -180,13 +180,10 @@
|
|
die("SSL: RNG is not seeded");
|
|
}
|
|
{
|
|
- EC_KEY* key = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
|
|
- if (key == NULL)
|
|
+ if (!SSL_CTX_set1_groups_list(p_ctx, "P-256"))
|
|
{
|
|
die("SSL: failed to get curve p256");
|
|
}
|
|
- SSL_CTX_set_tmp_ecdh(p_ctx, key);
|
|
- EC_KEY_free(key);
|
|
}
|
|
if (tunable_ssl_request_cert)
|
|
{
|
|
@@ -692,17 +689,19 @@
|
|
static void setup_bio_callbacks(SSL* p_ssl)
|
|
{
|
|
BIO* p_bio = SSL_get_rbio(p_ssl);
|
|
- BIO_set_callback(p_bio, bio_callback);
|
|
+ BIO_set_callback_ex(p_bio, bio_callback);
|
|
p_bio = SSL_get_wbio(p_ssl);
|
|
- BIO_set_callback(p_bio, bio_callback);
|
|
+ BIO_set_callback_ex(p_bio, bio_callback);
|
|
}
|
|
|
|
static long
|
|
bio_callback(
|
|
- BIO* p_bio, int oper, const char* p_arg, int argi, long argl, long ret)
|
|
+ BIO* p_bio, int oper, const char* p_arg, size_t len, int argi, long argl, int ret, size_t *processed)
|
|
{
|
|
int retval = 0;
|
|
int fd = 0;
|
|
+ (void) len;
|
|
+ (void) processed;
|
|
(void) p_arg;
|
|
(void) argi;
|
|
(void) argl;
|
|
|