$NetBSD: patch-ap,v 1.1 2006/09/30 04:20:24 taca Exp $

# http://secunia.com/advisories/22130/

--- crypto/dh/dh.h.orig	2005-05-16 10:26:03.000000000 +0900
+++ crypto/dh/dh.h
@@ -70,6 +70,10 @@
 #include <openssl/crypto.h>
 #include <openssl/ossl_typ.h>
 	
+#ifndef OPENSSL_DH_MAX_MODULUS_BITS
+# define OPENSSL_DH_MAX_MODULUS_BITS	10000
+#endif
+
 #define DH_FLAG_CACHE_MONT_P     0x01
 #define DH_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DH
                                        * implementation now uses constant time
@@ -203,6 +207,7 @@ void ERR_load_DH_strings(void);
 #define DH_F_DH_GENERATE_KEY				 103
 #define DH_F_DH_GENERATE_PARAMETERS			 104
 #define DH_F_DH_NEW_METHOD				 105
+#define DH_R_MODULUS_TOO_LARGE                           103
 
 /* Reason codes. */
 #define DH_R_BAD_GENERATOR				 101
