X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fbn%2Fbn_gcd.c;h=64a76f4498965b0e912eece66863edead0e46d27;hb=f18a93ab04f248de45a8bcdded9b91880c690dbd;hp=c80cecdc8de9eb125052016a7a52c8b2a7aa08ff;hpb=dfeab0689f69c0b4bd3480ffd37a9cacc2f17d9c;p=oweals%2Fopenssl.git diff --git a/crypto/bn/bn_gcd.c b/crypto/bn/bn_gcd.c index c80cecdc8d..64a76f4498 100644 --- a/crypto/bn/bn_gcd.c +++ b/crypto/bn/bn_gcd.c @@ -60,15 +60,8 @@ #include "cryptlib.h" #include "bn_lcl.h" -#ifndef NOPROTO static BIGNUM *euclid(BIGNUM *a, BIGNUM *b); -#else -static BIGNUM *euclid(); -#endif - -int BN_gcd(r,in_a,in_b,ctx) -BIGNUM *r,*in_a,*in_b; -BN_CTX *ctx; +int BN_gcd(BIGNUM *r, BIGNUM *in_a, BIGNUM *in_b, BN_CTX *ctx) { BIGNUM *a,*b,*t; int ret=0; @@ -92,8 +85,7 @@ err: return(ret); } -static BIGNUM *euclid(a,b) -BIGNUM *a,*b; +static BIGNUM *euclid(BIGNUM *a, BIGNUM *b) { BIGNUM *t; int shifts=0; @@ -148,11 +140,7 @@ err: } /* solves ax == 1 (mod n) */ -BIGNUM *BN_mod_inverse(in, a, n, ctx) -BIGNUM *in; -BIGNUM *a; -BIGNUM *n; -BN_CTX *ctx; +BIGNUM *BN_mod_inverse(BIGNUM *in, BIGNUM *a, const BIGNUM *n, BN_CTX *ctx) { BIGNUM *A,*B,*X,*Y,*M,*D,*R; BIGNUM *T,*ret=NULL;