
Official source patch from the OpenSSL project
==============================================

FILENAME:                   APPLY TO:       CONTACT:             DATE:
openssl-0.9.1c-bnrec.patch  OpenSSL 0.9.1c  openssl@openssl.org  03-Mar-1999

DESCRIPTION:
The Big Number (BN) library in OpenSSL 0.9.1c has some problems when dealing
with very large numbers. Because mostly all other OpenSSL sub-libraries
(including the RSA library) are based on BN, this can cause failures when
doing certificate verification and performing other SSL functions. These BN
bugs are already fixed for OpenSSL 0.9.2. But for OpenSSL 0.9.1c the easiest
workaround to fix the subtle problems is to apply the above patch which mainly
disables the broken Montgomery multiplication algorithm inside BN.

PATCH:
Move this file to the top-level directory of a fresh OpenSSL 0.9.1c source
tree and run the command ``patch -p0 <openssl-0.9.1c-bnrec.patch'' from within
this directory.

Index: crypto/bn/bn.h
===================================================================
RCS file: crypto/bn/bn.h,v
retrieving revision 1.2
diff -u -r1.2 bn.h
--- crypto/bn/bn.h	1998/12/22 15:04:30	1.2
+++ crypto/bn/bn.h	1999/03/03 19:35:36
@@ -79,7 +79,7 @@
 
 #define BN_MUL_COMBA
 #define BN_SQR_COMBA
-#define BN_RECURSION
+#undef  BN_RECURSION
 #define RECP_MUL_MOD
 #define MONT_MUL_MOD
 
Index: crypto/bn/bn.org
===================================================================
RCS file: crypto/bn/bn.org,v
retrieving revision 1.2
diff -u -r1.2 bn.org
--- crypto/bn/bn.org	1998/12/22 15:04:30	1.2
+++ crypto/bn/bn.org	1999/03/03 19:35:43
@@ -79,7 +79,7 @@
 
 #define BN_MUL_COMBA
 #define BN_SQR_COMBA
-#define BN_RECURSION
+#undef  BN_RECURSION
 #define RECP_MUL_MOD
 #define MONT_MUL_MOD
 
