From d9374b05d67ca1abcfe0f6b289b6583b6257eee3 Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Fri, 2 Nov 2012 11:02:58 +0000
Subject: [PATCH] - Moved mpi_inv_mod() outside POLARSSL_GENPRIME
---
ChangeLog | 1 +
library/bignum.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dc68f04c2..a448acc4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@ PolarSSL ChangeLog
= Version Trunk
Bugfixes
* Fixes for MSVC6
+ * Moved mpi_inv_mod() outside POLARSSL_GENPRIME
= Version 1.2.0 released 2012-10-31
Features
diff --git a/library/bignum.c b/library/bignum.c
index a3201a6b1..f2a49ecac 100644
--- a/library/bignum.c
+++ b/library/bignum.c
@@ -1652,8 +1652,6 @@ cleanup:
return( ret );
}
-#if defined(POLARSSL_GENPRIME)
-
/*
* Modular inverse: X = A^-1 mod N (HAC 14.61 / 14.64)
*/
@@ -1749,6 +1747,8 @@ cleanup:
return( ret );
}
+#if defined(POLARSSL_GENPRIME)
+
static const int small_prime[] =
{
3, 5, 7, 11, 13, 17, 19, 23,