From owner-svn-ports-all@freebsd.org Mon Feb 1 02:30:40 2021 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E82214EFEF7; Mon, 1 Feb 2021 02:30:40 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DTX4064Hgz3FXq; Mon, 1 Feb 2021 02:30:40 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1E3213638; Mon, 1 Feb 2021 02:30:40 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 1112Ue1O093268; Mon, 1 Feb 2021 02:30:40 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 1112Ue1U092624; Mon, 1 Feb 2021 02:30:40 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <202102010230.1112Ue1U092624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Mon, 1 Feb 2021 02:30:40 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r563542 - in head/ftp/bbftp-server: . files X-SVN-Group: ports-head X-SVN-Commit-Author: danfe X-SVN-Commit-Paths: in head/ftp/bbftp-server: . files X-SVN-Commit-Revision: 563542 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Feb 2021 02:30:41 -0000 Author: danfe Date: Mon Feb 1 02:30:39 2021 New Revision: 563542 URL: https://svnweb.freebsd.org/changeset/ports/563542 Log: - Use a better way to deal with deprecated ERR_load_crypto_strings() function by #includ'ing 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 Modified: head/ftp/bbftp-server/Makefile head/ftp/bbftp-server/files/patch-bbftpd.c head/ftp/bbftp-server/files/patch-bbftpd__crypt.c Modified: head/ftp/bbftp-server/Makefile ============================================================================== --- head/ftp/bbftp-server/Makefile Mon Feb 1 02:26:28 2021 (r563541) +++ head/ftp/bbftp-server/Makefile Mon Feb 1 02:30:39 2021 (r563542) @@ -23,6 +23,8 @@ OPTIONS_DEFINE= DOCS post-patch: @${REINPLACE_CMD} -e '/^#include/s,malloc,stdlib,' \ ${WRKSRC}/bbftpd_cd.c ${WRKSRC}/bbftpd_statfs.c + @${REINPLACE_CMD} -e '/with_ssl\/lib\/libcrypto/s,\.a,.so,' \ + ${WRKSRC}/${CONFIGURE_SCRIPT} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/bbftpd ${STAGEDIR}${PREFIX}/bin Modified: head/ftp/bbftp-server/files/patch-bbftpd.c ============================================================================== --- head/ftp/bbftp-server/files/patch-bbftpd.c Mon Feb 1 02:26:28 2021 (r563541) +++ head/ftp/bbftp-server/files/patch-bbftpd.c Mon Feb 1 02:30:39 2021 (r563542) @@ -1,15 +1,10 @@ --- bbftpd.c.orig 2005-05-03 08:43:34 UTC +++ bbftpd.c -@@ -842,10 +842,12 @@ main (argc,argv,envp) - char buffrand[NBITSINKEY] ; - struct timeval tp ; - unsigned int seed ; -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - /* - ** Load the error message from the crypto lib - */ - ERR_load_crypto_strings() ; -+#endif - /* - ** Initialize the buffrand buffer which is giong to be used to initialize the - ** random generator +@@ -104,6 +104,7 @@ + #include + #endif + ++#include + #include + + #ifdef WITH_GZIP Modified: head/ftp/bbftp-server/files/patch-bbftpd__crypt.c ============================================================================== --- head/ftp/bbftp-server/files/patch-bbftpd__crypt.c Mon Feb 1 02:26:28 2021 (r563541) +++ head/ftp/bbftp-server/files/patch-bbftpd__crypt.c Mon Feb 1 02:30:39 2021 (r563542) @@ -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 */