diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2021-02-01 02:30:39 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2021-02-01 02:30:39 +0000 |
commit | b37a13c3228c8a0de70d32da051c2d2fcfd861ed (patch) | |
tree | 679d31956a24aa084640a15339e092f867aa813a /ftp/bbftp-server/files/patch-bbftpd__crypt.c | |
parent | Updated Seafile/Seahub to 8.0.3 (diff) |
- Use a better way to deal with deprecated ERR_load_crypto_strings()
function by #includ'ing <openssl/err.h> header which already takes
the proper care of it
- Move away from using another deprecated RSA_generate_key() function
- Apply the same hack as for the client port so it dynamically links
against libcrypto.so, rather than statically against libcrypto.a
Notes
Notes:
svn path=/head/; revision=563542
Diffstat (limited to 'ftp/bbftp-server/files/patch-bbftpd__crypt.c')
-rw-r--r-- | ftp/bbftp-server/files/patch-bbftpd__crypt.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ftp/bbftp-server/files/patch-bbftpd__crypt.c b/ftp/bbftp-server/files/patch-bbftpd__crypt.c index be464b9c7e45..e9a96cf8f852 100644 --- a/ftp/bbftp-server/files/patch-bbftpd__crypt.c +++ b/ftp/bbftp-server/files/patch-bbftpd__crypt.c @@ -1,6 +1,19 @@ --- bbftpd_crypt.c.orig 2004-06-30 17:38:50 UTC +++ bbftpd_crypt.c -@@ -84,8 +84,13 @@ void sendcrypt() +@@ -73,19 +73,25 @@ void sendcrypt() + unsigned char pubexponent[NBITSINKEY] ; + int lenkey ; + int lenexpo ; ++ BIGNUM *e = BN_new(); + + /* + ** Ask for the private and public Key + */ +- if ( (myrsa = RSA_generate_key(NBITSINKEY,3,NULL,NULL)) == NULL) { ++ if (e == NULL || (BN_set_word(e,3) && RSA_generate_key_ex(myrsa,NBITSINKEY,e,NULL)) == 0) { + syslog(BBFTPD_ERR,"%s",ERR_error_string(ERR_get_error(),NULL) ) ; + exit(1) ; + } /* ** Now extract the public key in order to send it */ |