Merge branch 'rsalz-docfixes'
authorRich Salz <rsalz@akamai.com>
Thu, 3 Jul 2014 02:44:53 +0000 (22:44 -0400)
committerRich Salz <rsalz@akamai.com>
Thu, 3 Jul 2014 02:44:53 +0000 (22:44 -0400)
crypto/bn/bn_exp.c
e_os.h

index c121122f3cb28668fb900cb90475443afdfe8296..2d051b2c35b852da488ab1dbe3d4691f2ec1fdb9 100644 (file)
@@ -909,7 +909,7 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
 
     /* Dedicated window==4 case improves 512-bit RSA sign by ~15%, but as
      * 512-bit RSA is hardly relevant, we omit it to spare size... */ 
-    if (window==5)
+    if (window==5 && top>1)
        {
        void bn_mul_mont_gather5(BN_ULONG *rp,const BN_ULONG *ap,
                        const void *table,const BN_ULONG *np,
diff --git a/e_os.h b/e_os.h
index 67638f75340e2668c692444d0c4da91f81398cf7..0a97895360d71407e2be33279641421728ac796e 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -311,7 +311,7 @@ static unsigned int _strlen31(const char *str)
 #      undef isxdigit
 #    endif
 #    if defined(_MSC_VER) && !defined(_WIN32_WCE) && !defined(_DLL) && defined(stdin)
-#      if _MSC_VER>=1300
+#      if _MSC_VER>=1300 && _MSC_VER<1600
 #        undef stdin
 #        undef stdout
 #        undef stderr
@@ -319,7 +319,7 @@ static unsigned int _strlen31(const char *str)
 #        define stdin  (&__iob_func()[0])
 #        define stdout (&__iob_func()[1])
 #        define stderr (&__iob_func()[2])
-#      elif defined(I_CAN_LIVE_WITH_LNK4049)
+#      elif _MSC_VER<1300 && defined(I_CAN_LIVE_WITH_LNK4049)
 #        undef stdin
 #        undef stdout
 #        undef stderr