Enhance consistency by using BIO_flush() instead of fflush().
This commit is contained in:
parent
3e0f27f3c9
commit
f36e02b2ef
@ -165,68 +165,68 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
message(out,"BN_add");
|
message(out,"BN_add");
|
||||||
if (!test_add(out)) goto err;
|
if (!test_add(out)) goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
message(out,"BN_sub");
|
message(out,"BN_sub");
|
||||||
if (!test_sub(out)) goto err;
|
if (!test_sub(out)) goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
message(out,"BN_lshift1");
|
message(out,"BN_lshift1");
|
||||||
if (!test_lshift1(out)) goto err;
|
if (!test_lshift1(out)) goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
message(out,"BN_lshift (fixed)");
|
message(out,"BN_lshift (fixed)");
|
||||||
if (!test_lshift(out,ctx,BN_bin2bn(lst,sizeof(lst)-1,NULL)))
|
if (!test_lshift(out,ctx,BN_bin2bn(lst,sizeof(lst)-1,NULL)))
|
||||||
goto err;
|
goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
message(out,"BN_lshift");
|
message(out,"BN_lshift");
|
||||||
if (!test_lshift(out,ctx,NULL)) goto err;
|
if (!test_lshift(out,ctx,NULL)) goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
message(out,"BN_rshift1");
|
message(out,"BN_rshift1");
|
||||||
if (!test_rshift1(out)) goto err;
|
if (!test_rshift1(out)) goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
message(out,"BN_rshift");
|
message(out,"BN_rshift");
|
||||||
if (!test_rshift(out,ctx)) goto err;
|
if (!test_rshift(out,ctx)) goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
message(out,"BN_sqr");
|
message(out,"BN_sqr");
|
||||||
if (!test_sqr(out,ctx)) goto err;
|
if (!test_sqr(out,ctx)) goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
message(out,"BN_mul");
|
message(out,"BN_mul");
|
||||||
if (!test_mul(out)) goto err;
|
if (!test_mul(out)) goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
message(out,"BN_div");
|
message(out,"BN_div");
|
||||||
if (!test_div(out,ctx)) goto err;
|
if (!test_div(out,ctx)) goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
message(out,"BN_div_recp");
|
message(out,"BN_div_recp");
|
||||||
if (!test_div_recp(out,ctx)) goto err;
|
if (!test_div_recp(out,ctx)) goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
message(out,"BN_mod");
|
message(out,"BN_mod");
|
||||||
if (!test_mod(out,ctx)) goto err;
|
if (!test_mod(out,ctx)) goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
message(out,"BN_mod_mul");
|
message(out,"BN_mod_mul");
|
||||||
if (!test_mod_mul(out,ctx)) goto err;
|
if (!test_mod_mul(out,ctx)) goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
message(out,"BN_mont");
|
message(out,"BN_mont");
|
||||||
if (!test_mont(out,ctx)) goto err;
|
if (!test_mont(out,ctx)) goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
message(out,"BN_mod_exp");
|
message(out,"BN_mod_exp");
|
||||||
if (!test_mod_exp(out,ctx)) goto err;
|
if (!test_mod_exp(out,ctx)) goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
message(out,"BN_exp");
|
message(out,"BN_exp");
|
||||||
if (!test_exp(out,ctx)) goto err;
|
if (!test_exp(out,ctx)) goto err;
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
|
|
||||||
BN_CTX_free(ctx);
|
BN_CTX_free(ctx);
|
||||||
BIO_free(out);
|
BIO_free(out);
|
||||||
@ -235,7 +235,7 @@ int main(int argc, char *argv[])
|
|||||||
exit(0);
|
exit(0);
|
||||||
err:
|
err:
|
||||||
BIO_puts(out,"1\n"); /* make sure bc fails if we are piping to it */
|
BIO_puts(out,"1\n"); /* make sure bc fails if we are piping to it */
|
||||||
fflush(stdout);
|
BIO_flush(out);
|
||||||
ERR_load_crypto_strings();
|
ERR_load_crypto_strings();
|
||||||
ERR_print_errors_fp(stderr);
|
ERR_print_errors_fp(stderr);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -61,7 +61,7 @@ int OBJ_NAME_new_index(unsigned long (*hash_func)(), int (*cmp_func)(),
|
|||||||
MemCheck_off();
|
MemCheck_off();
|
||||||
name_funcs = Malloc(sizeof(NAME_FUNCS));
|
name_funcs = Malloc(sizeof(NAME_FUNCS));
|
||||||
name_funcs->hash_func = lh_strhash;
|
name_funcs->hash_func = lh_strhash;
|
||||||
name_funcs->cmp_func = strcmp;
|
name_funcs->cmp_func = (int (*)())strcmp;
|
||||||
name_funcs->free_func = 0; /* NULL is often declared to
|
name_funcs->free_func = 0; /* NULL is often declared to
|
||||||
* ((void *)0), which according
|
* ((void *)0), which according
|
||||||
* to Compaq C is not really
|
* to Compaq C is not really
|
||||||
|
Loading…
x
Reference in New Issue
Block a user