{"text", OPT_TEXT, '-', "Output text (not DER)"},
{"reply", OPT_REPLY, '-', "Generate a TS reply"},
{"queryfile", OPT_QUERYFILE, '<', "File containing a TS query"},
- {"passin", OPT_PASSIN, 's'},
+ {"passin", OPT_PASSIN, 's', "Input file pass phrase source"},
{"inkey", OPT_INKEY, '<', "File with private key for reply"},
{"signer", OPT_SIGNER, 's'},
{"chain", OPT_CHAIN, '<', "File with signer CA chain"},
break;
}
}
- argc = opt_num_rest();
- argv = opt_rest();
- if (mode == OPT_ERR || argc != 0)
+ if (mode == OPT_ERR || opt_num_rest() != 0)
goto opthelp;
/* Seed the random number generator if it is going to be used. */
}
conf = load_config_file(configfile);
- if (!app_load_modules(conf))
+ if (configfile != default_config_file && !app_load_modules(conf))
goto end;
/* Check parameter consistency and execute the appropriate function. */
app_RAND_write_file(NULL);
NCONF_free(conf);
OPENSSL_free(password);
- OBJ_cleanup();
return (ret);
}
EVP_MD_CTX_free(md_ctx);
} else {
long digest_len;
- *md_value = string_to_hex(digest, &digest_len);
+ *md_value = OPENSSL_hexstr2buf(digest, &digest_len);
if (!*md_value || md_value_len != digest_len) {
OPENSSL_free(*md_value);
*md_value = NULL;
goto err;
} else if (digest != NULL) {
long imprint_len;
- unsigned char *hexstr = string_to_hex(digest, &imprint_len);
+ unsigned char *hexstr = OPENSSL_hexstr2buf(digest, &imprint_len);
f |= TS_VFY_IMPRINT;
if (TS_VERIFY_CTX_set_imprint(ctx, hexstr, imprint_len) == NULL) {
BIO_printf(bio_err, "invalid digest string\n");