$NetBSD: patch-ak,v 1.1 2010/11/30 11:04:59 obache Exp $

for OpenSSL without MD2

--- nse_openssl.cc.orig	2010-03-28 21:18:02.000000000 +0000
+++ nse_openssl.cc
@@ -8,7 +8,9 @@
 #include <openssl/crypto.h>
 #include <openssl/bn.h>
 #include <openssl/rand.h>
+#ifndef OPENSSL_NO_MD2
 #include <openssl/md2.h>
+#endif
 #include <openssl/md4.h>
 #include <openssl/md5.h>
 #include <openssl/sha.h>
@@ -219,6 +221,7 @@ static int l_rand_pseudo_bytes( lua_Stat
   return 1;
 }
 
+#ifndef OPENSSL_NO_MD2
 static int l_md2(lua_State *L)     /** md2(string s) */
 {
   size_t len;
@@ -228,6 +231,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) */
 {
@@ -515,7 +519,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 },
+#ifndef OPENSSL_NO_MD2
   { "md2", l_md2 },
+#endif
   { "md4", l_md4 },
   { "md5", l_md5 },
   { "sha1", l_sha1 },
