diff -p -up nmap-5.21/nse_openssl.cc.md2 nmap-5.21/nse_openssl.cc --- nmap-5.21/nse_openssl.cc.md2 2010-04-08 11:19:21.000000000 -0300 +++ nmap-5.21/nse_openssl.cc 2010-04-08 11:19:24.000000000 -0300 @@ -8,7 +8,9 @@ #include <openssl/crypto.h> #include <openssl/bn.h> #include <openssl/rand.h> +#ifdef HAVE_OPENSSL_MD2_H #include <openssl/md2.h> +#endif #include <openssl/md4.h> #include <openssl/md5.h> #include <openssl/sha.h> @@ -206,6 +208,7 @@ static int l_rand_pseudo_bytes( lua_Stat return 1; } +#ifdef HAVE_OPENSSL_MD2_H static int l_md2(lua_State *L) /** md2(string s) */ { size_t len; @@ -215,6 +218,7 @@ static int l_md2(lua_State *L) /** m lua_pushlstring( L, (char *) MD2( s, len, digest ), 16 ); return 1; } +#endif static int l_md4(lua_State *L) /** md4(string s) */ { @@ -469,7 +473,9 @@ static const struct luaL_reg openssllib[ { "bignum_mod_exp", l_bignum_mod_exp }, { "rand_bytes", l_rand_bytes }, { "rand_pseudo_bytes", l_rand_pseudo_bytes }, +#ifdef HAVE_OPENSSL_MD2_H { "md2", l_md2 }, +#endif { "md4", l_md4 }, { "md5", l_md5 }, { "sha1", l_sha1 },