int hex=0;
int checks=20;
BIGNUM *bn=NULL;
- BIO *bio_out=NULL;
+ BIO *bio_out;
apps_startup();
goto bad;
}
- if (bio_out == NULL)
- if ((bio_out=BIO_new(BIO_s_file())) != NULL)
- {
- BIO_set_fp(bio_out,stdout,BIO_NOCLOSE);
+ if ((bio_out=BIO_new(BIO_s_file())) != NULL)
+ {
+ BIO_set_fp(bio_out,stdout,BIO_NOCLOSE);
#ifdef OPENSSL_SYS_VMS
{
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
bio_out = BIO_push(tmpbio, bio_out);
}
#endif
- }
+ }
if(hex)
BN_hex2bn(&bn,argv[0]);
BN_is_prime(bn,checks,NULL,NULL,NULL) ? "" : "not ");
BN_free(bn);
- BIO_free(bio_out);
+ BIO_free_all(bio_out);
return 0;
BIO_printf(bio_err,"options are\n");
BIO_printf(bio_err,"%-14s hex\n","-hex");
BIO_printf(bio_err,"%-14s number of checks\n","-checks <n>");
- exit(1);
+ return 1;
}