int speed_main(int argc, char **argv)
{
+ ENGINE *e = NULL;
loopargs_t *loopargs = NULL;
int async_init = 0;
int loopargs_len = 0;
char *prog;
-#ifndef OPENSSL_NO_ENGINE
const char *engine_id = NULL;
-#endif
const EVP_CIPHER *evp_cipher = NULL;
double d = 0.0;
OPTION_CHOICE o;
#ifndef NO_FORK
int multi = 0;
#endif
- int async_jobs = 0;
+ unsigned int async_jobs = 0;
#if !defined(OPENSSL_NO_RSA) || !defined(OPENSSL_NO_DSA) \
|| !defined(OPENSSL_NO_EC)
long rsa_count = 1;
* initialised by each child process, not by the parent.
* So store the name here and run setup_engine() later on.
*/
-#ifndef OPENSSL_NO_ENGINE
engine_id = opt_arg();
-#endif
break;
case OPT_MULTI:
#ifndef NO_FORK
prog);
goto opterr;
}
+ if (async_jobs > 99999) {
+ BIO_printf(bio_err,
+ "%s: too many async_jobs\n",
+ prog);
+ goto opterr;
+ }
#endif
break;
case OPT_MISALIGN:
#endif
/* Initialize the engine after the fork */
- (void)setup_engine(engine_id, 0);
+ e = setup_engine(engine_id, 0);
/* No parameters; turn on everything. */
if ((argc == 0) && !doit[D_EVP]) {
#endif
if (doit[D_EVP]) {
-#ifdef EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK
if (multiblock && evp_cipher) {
if (!
(EVP_CIPHER_flags(evp_cipher) &
ret = 0;
goto end;
}
-#endif
for (testnum = 0; testnum < SIZE_NUM; testnum++) {
if (evp_cipher) {
ASYNC_cleanup_thread();
}
OPENSSL_free(loopargs);
+ release_engine(e);
return (ret);
}