At the moment --without-openssl fails to prevent the use of openssl in
snmpusm.c.
The test case is an x86_64 host with 64-bit openssl libs but not 32-bit
openssl libs and you build a 32-bit net-snmp.
The attached patch fixes that. OK for trunk?
/MF
Index: trunk/net-snmp/apps/snmpusm.c
===================================================================
--- trunk/net-snmp/apps/snmpusm.c (revision 19347)
+++ trunk/net-snmp/apps/snmpusm.c (working copy)
@@ -55,9 +55,9 @@
#include <arpa/inet.h>
#endif
-#ifdef HAVE_OPENSSL_DH_H
+#if defined(HAVE_OPENSSL_DH_H) && defined(HAVE_LIBCRYPTO)
#include <openssl/dh.h>
-#endif
+#endif /* HAVE_OPENSSL_DH_H && HAVE_LIBCRYPTO */
#include <net-snmp/net-snmp-includes.h>
@@ -105,9 +105,11 @@
usmUserStatus[MAX_OID_LEN] = {1, 3, 6, 1, 6, 3, 15, 1, 2, 2, 1, 13},
/* diffie helman change key objects */
usmDHUserAuthKeyChange[MAX_OID_LEN] = {1, 3, 6, 1, 3, 101, 1, 1, 2, 1, 1 },
+usmDHUserPrivKeyChange[MAX_OID_LEN] = {1, 3, 6, 1, 3, 101, 1, 1, 2, 1, 3 },
+#if defined(HAVE_OPENSSL_DH_H) && defined(HAVE_LIBCRYPTO)
usmDHUserOwnAuthKeyChange[MAX_OID_LEN] = {1, 3, 6, 1, 3, 101, 1, 1, 2, 1, 2 },
-usmDHUserPrivKeyChange[MAX_OID_LEN] = {1, 3, 6, 1, 3, 101, 1, 1, 2, 1, 3 },
usmDHUserOwnPrivKeyChange[MAX_OID_LEN] = {1, 3, 6, 1, 3, 101, 1, 1, 2, 1, 4 },
+#endif /* HAVE_OPENSSL_DH_H && HAVE_LIBCRYPTO */
usmDHParameters[] = { 1,3,6,1,3,101,1,1,1,0 }
;
size_t usmDHParameters_len = OID_LENGTH(usmDHParameters);
@@ -954,7 +956,7 @@
vars = vars->next_variable;
}
/* snmp_free_pdu(dhresponse); */ /* parts still in use somewhere */
-#endif /* HAVE_OPENSSL_DH_H */
+#endif /* HAVE_OPENSSL_DH_H && HAVE_LIBCRYPTO */
} else {
fprintf(stderr, "Unknown command\n");
usage();
@@ -1012,7 +1014,7 @@
#if defined(HAVE_OPENSSL_DH_H) && defined(HAVE_LIBCRYPTO)
begone:
-#endif
+#endif /* HAVE_OPENSSL_DH_H && HAVE_LIBCRYPTO */
if (response)
snmp_free_pdu(response);
snmp_close(ss);
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders