From 4b06ab3fb4ca0047d13942936bbf183c7f45606a Mon Sep 17 00:00:00 2001 From: John Goerzen Date: Mon, 17 Nov 2025 18:58:28 -0600 Subject: [PATCH] Disable OpenSSL version check OpenSSL versions in the 3.x series do not break compatibility between minor versions. This results in spurious warnings and unnecessary disabling, such as seen in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1118629 --- ck_ssl.c | 76 -------------------------------------------------------- 1 file changed, 76 deletions(-) diff --git a/ck_ssl.c b/ck_ssl.c index 8fa452f..ee39351 100644 --- a/ck_ssl.c +++ b/ck_ssl.c @@ -1529,82 +1529,6 @@ ssl_once_init() debug(F110,"OpenSSL Library",SSLeay_version(SSLEAY_CFLAGS),0); debug(F110,"OpenSSL Library",SSLeay_version(SSLEAY_PLATFORM),0); - /* The following test is suggested by Richard Levitte */ - /* if (((OPENSSL_VERSION_NUMBER ^ SSLeay()) & 0xffffff0f) */ - /* Modified by Adam Friedlander for OpenSSL >= 1.0.0 */ - if (OPENSSL_VERSION_NUMBER > SSLeay() - || ((OPENSSL_VERSION_NUMBER ^ SSLeay()) & COMPAT_VERSION_MASK) -#ifdef OS2 -/* DG 2024-08-05: Not sure what the point of this was. Presumably the goal was - * to prevent updated OpenSSL libraries from being used, though why you'd - * want to do that I'm not sure. Might have been to do with how Kermit 95s - * SSH code was built way back in the early 2000s I guess. Today Kermit 95s - * use of OpenSSL is largely the same as how C-Kermit uses it on other - * platforms so I don't see any reason to treat it differently here. - || ckstrcmp(OPENSSL_VERSION_TEXT,(char *)SSLeay_version(SSLEAY_VERSION),-1,1) -*/ -#endif /* OS2 */ - ) { - ssl_installed = 0; - debug(F111,"OpenSSL Version does not match. Built with", - SSLeay_version(SSLEAY_VERSION),SSLEAY_VERSION_NUMBER); - printf("?OpenSSL libraries do not match required version:\r\n"); - printf(" . C-Kermit built with %s\r\n",OPENSSL_VERSION_TEXT); - printf(" . Version found %s\r\n",SSLeay_version(SSLEAY_VERSION)); -#ifdef OPENSSL_100 - printf(" OpenSSL versions 1.0.0 or newer must be the same\r\n"); - printf(" major and minor version number, and Kermit may not\r\n"); - printf(" be used with a version of OpenSSL older than the one\r\n"); - printf(" supplied at compile time.\r\n"); -#else - printf(" OpenSSL versions prior to 1.0.0 must be the same.\r\n"); -#endif /* OPENSSL_100 */ - - s = "R"; -#ifdef SOLARIS - printf(" Set CD_LIBRARY_PATH for %s.\r\n",OPENSSL_VERSION_TEXT); - s = " Or r"; -#endif /* SOLARIS */ - -#ifdef HPUX - printf(" Set SHLIB_PATH for %s.\r\n",OPENSSL_VERSION_TEXT); - s = " Or r"; -#endif /* HPUX */ - -#ifdef AIX - printf(" Set LIBPATH for %s.\r\n",OPENSSL_VERSION_TEXT); - s = " Or r"; -#endif /* AIX */ - -#ifdef LINUX - printf(" Set LD_LIBRARY_PATH for %s.\r\n",OPENSSL_VERSION_TEXT); - s = " Or r"; -#endif /* LINUX */ - - printf(" %sebuild C-Kermit from source on this computer to make \ -versions agree.\r\n",s); - -#ifdef KTARGET - { - char * s; - s = KTARGET; - if (!s) s = ""; - if (!*s) s = "(unknown)"; - printf(" C-Kermit makefile target: %s\r\n",s); - } -#endif /* KTARGET */ - printf(" Or if that is what you did then try to find out why\r\n"); - printf(" the program loader (image activator) is choosing a\r\n"); - printf(" different OpenSSL library than the one specified in \ -the build.\r\n\r\n"); - printf(" All SSL/TLS features disabled.\r\n\r\n"); - bleep(BP_FAIL); -#ifdef SSLDLL - ck_ssl_unloaddll(); - ck_crypto_unloaddll(); -#endif /* SSLDLL */ - return; - } #endif /* OS2ONLY */ /* init things so we will get meaningful error messages