Re: DH_get0_pqg not defined on 5.8 master if you build without TLS transport

Bart Van Assche <[email protected]>
Newsgroups gmane.network.net-snmp.devel
Message-ID <[email protected]>
On 12/19/17 10:36, Bill Fenner wrote:
> snmplib/netsnmp-openssl.c is not built unless HAVE_LIBSSL is defined, 
> which is only defined if the TLS transports are used.  After the removal 
> of the compat functions from apps/snmpusm.c, if you build with only USM 
> transports, there is nothing to provide the DH_get0_pqg compatibility 
> function.

How about something like the patch below?

Thanks,

Bart.

---
 snmplib/snmp_openssl.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/snmplib/snmp_openssl.c b/snmplib/snmp_openssl.c
index f44449077d1b..545f5a89bf64 100644
--- a/snmplib/snmp_openssl.c
+++ b/snmplib/snmp_openssl.c
@@ -915,6 +915,9 @@ netsnmp_openssl_null_checks(SSL *ssl, int *null_auth, int *null_cipher)
         }
     }
 }
+#endif /* NETSNMP_USE_OPENSSL && HAVE_LIBSSL && !defined(NETSNMP_FEATURE_REMOVE_CERT_UTIL) */
+
+#if defined(NETSNMP_USE_OPENSSL) || defined(HAVE_LIBCRYPTO)
 
 #ifndef HAVE_DH_SET0_PQG
 int
@@ -1018,4 +1021,4 @@ const SSL_METHOD *DTLS_method(void)
 }
 #endif
 
-#endif /* NETSNMP_USE_OPENSSL && HAVE_LIBSSL && !defined(NETSNMP_FEATURE_REMOVE_CERT_UTIL) */
+#endif /* defined(NETSNMP_USE_OPENSSL) || defined(HAVE_LIBCRYPTO) */
-- 
2.15.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.