projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix typo in exptest.c.
[oweals/openssl.git]
/
crypto
/
bn
/
bn_kron.c
diff --git
a/crypto/bn/bn_kron.c
b/crypto/bn/bn_kron.c
index 49f75594aed019f26e8c36ff543432daadb5a919..740359b7520de3609e825801d96a5f41df81ea98 100644
(file)
--- a/
crypto/bn/bn_kron.c
+++ b/
crypto/bn/bn_kron.c
@@
-53,9
+53,9
@@
*
*/
*
*/
+#include "cryptlib.h"
#include "bn_lcl.h"
#include "bn_lcl.h"
-
/* least significant word */
#define BN_lsw(n) (((n)->top == 0) ? (BN_ULONG) 0 : (n)->d[0])
/* least significant word */
#define BN_lsw(n) (((n)->top == 0) ? (BN_ULONG) 0 : (n)->d[0])
@@
-74,6
+74,9
@@
int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
*/
static const int tab[8] = {0, 1, 0, -1, 0, -1, 0, 1};
*/
static const int tab[8] = {0, 1, 0, -1, 0, -1, 0, 1};
+ bn_check_top(a);
+ bn_check_top(b);
+
BN_CTX_start(ctx);
A = BN_CTX_get(ctx);
B = BN_CTX_get(ctx);
BN_CTX_start(ctx);
A = BN_CTX_get(ctx);
B = BN_CTX_get(ctx);
@@
-172,8
+175,7
@@
int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
tmp = A; A = B; B = tmp;
tmp->neg = 0;
}
tmp = A; A = B; B = tmp;
tmp->neg = 0;
}
-
- end:
+end:
BN_CTX_end(ctx);
if (err)
return -2;
BN_CTX_end(ctx);
if (err)
return -2;