Created attachment 198092 [details]
Fix OpenSSL 1.1.x build
sysutils/radmind: Fix OpenSSL build
Submitted by: Nathan <email@example.com>
+ extern EVP_MD *md;
+- EVP_MD_CTX mdctx;
++ EVP_MD_CTX *mdctx;
+ unsigned char md_value[ EVP_MAX_MD_SIZE ];
+- EVP_DigestInit( &mdctx, md );
++ EVP_DigestInit( mdctx, md );
No. EVP_DigestInit does not allocate any memory and mdctx points to wherever,
so this is broken.
Was this run tested at all? Or was this just build tested?
As noted by Tobias this fixes the build but will blow up when run (using an uninitialized pointer). It needs EVP_MD_CTX_new() & _free() calls to allocate & free the structure. There are also a few other files where the EVP_MD_CTX structure is referenced that aren't fixed in the attached patch.
That fix will break OpenSSL < 1.1.0 (FreeBSD 11.x) - needs compatibility shims for the _new() and _free() calls (https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes).
I'm going to bang out something more complete and version-sensitive tonight. Because of the scope I'll see if I can get it merged upstream. Failing that I'll either fork the project or do a patch to the port, whichever hurts my head less.
Created attachment 198378 [details]
Move to radmind 1.15.1 which fixes the OpenSSL 1.1 build
The main radmind project SF & GH repos seem to be defunct, so I've moved this to my fork and started a 1.15 branch that includes fixes for building on OpenSSL 1.1
The attached patch moves the port to that repository & release.
Note that 1.15.x incorporates changes equivalent to the patch-* files previously used in the port so these have been removed.
Patched port builds & run checks OK on FreeBSD 11.2, 12.0-ALPHA9, should be OK to merge unless committers see an issue.
A commit references this bug:
Date: Sat Nov 10 21:28:06 UTC 2018
New revision: 484645
Update to 1.15.1
As Upstream seems unresponsive, maintainer created a fork.
This fixes build with OpenSSL 1.1
All patches from the port have been incorporated
Submitted by: maintainer
Update committed. Thanks