X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fbn%2Fbn_prime.c;h=6fa0f9be1ee32b4767e8ed154832b88923601119;hb=f18a93ab04f248de45a8bcdded9b91880c690dbd;hp=6b96e18883002c8b2856386982b57229dc1b4c08;hpb=ec577822f95a8bca0023c5c77cef1a4916822d4a;p=oweals%2Fopenssl.git diff --git a/crypto/bn/bn_prime.c b/crypto/bn/bn_prime.c index 6b96e18883..6fa0f9be1e 100644 --- a/crypto/bn/bn_prime.c +++ b/crypto/bn/bn_prime.c @@ -68,7 +68,6 @@ */ #include "bn_prime.h" -#ifndef NOPROTO static int witness(BIGNUM *a, BIGNUM *n, BN_CTX *ctx,BN_CTX *ctx2, BN_MONT_CTX *mont); static int probable_prime(BIGNUM *rnd, int bits); @@ -76,15 +75,8 @@ static int probable_prime_dh(BIGNUM *rnd, int bits, BIGNUM *add, BIGNUM *rem, BN_CTX *ctx); static int probable_prime_dh_strong(BIGNUM *rnd, int bits, BIGNUM *add, BIGNUM *rem, BN_CTX *ctx); -#else -static int witness(); -static int probable_prime(); -static int probable_prime_dh(); -static int probable_prime_dh_strong(); -#endif - BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int strong, BIGNUM *add, - BIGNUM *rem, void (*callback)(P_I_I_P), char *cb_arg) + BIGNUM *rem, void (*callback)(int,int,void *), void *cb_arg) { BIGNUM *rnd=NULL; BIGNUM t; @@ -159,8 +151,8 @@ err: return(ret); } -int BN_is_prime(BIGNUM *a, int checks, void (*callback)(P_I_I_P), - BN_CTX *ctx_passed, char *cb_arg) +int BN_is_prime(BIGNUM *a, int checks, void (*callback)(int,int,void *), + BN_CTX *ctx_passed, void *cb_arg) { int i,j,c2=0,ret= -1; BIGNUM *check; @@ -327,7 +319,7 @@ static int probable_prime_dh(BIGNUM *rnd, int bits, BIGNUM *add, BIGNUM *rem, loop: for (i=1; i