schlock = 0;
thr = CreateThread(NULL, 4096, sleepy, NULL, 0, NULL);
if (thr == NULL) {
- DWORD ret = GetLastError();
- BIO_printf(bio_err, "unable to CreateThread (%d)", ret);
- ExitProcess(ret);
+ DWORD err = GetLastError();
+ BIO_printf(bio_err, "unable to CreateThread (%lu)", err);
+ ExitProcess(err);
}
while (!schlock)
Sleep(0); /* scheduler spinlock */
{"mr", OPT_MR, '-', "Produce machine readable output"},
{"mb", OPT_MB, '-'},
{"misalign", OPT_MISALIGN, 'n', "Amount to mis-align buffers"},
-#if defined(TIMES) || defined(USE_TOD)
{"elapsed", OPT_ELAPSED, '-',
"Measure time in real time instead of CPU user time"},
-#endif
#ifndef NO_FORK
{"multi", OPT_MULTI, 'p', "Run benchmarks in parallel"},
#endif
#define D_IGE_192_AES 27
#define D_IGE_256_AES 28
#define D_GHASH 29
-OPT_PAIR doit_choices[] = {
+static OPT_PAIR doit_choices[] = {
#ifndef OPENSSL_NO_MD2
{"md2", D_MD2},
#endif
#define R_EC_B283 13
#define R_EC_B409 14
#define R_EC_B571 15
-#ifndef OPENSSL_NO_ECA
+#ifndef OPENSSL_NO_EC
static OPT_PAIR ecdsa_choices[] = {
{"ecdsap160", R_EC_P160},
{"ecdsap192", R_EC_P192},
long c[ALGOR_NUM][SIZE_NUM], count = 0, save_count = 0;
unsigned char *buf_malloc = NULL, *buf2_malloc = NULL;
unsigned char *buf = NULL, *buf2 = NULL;
- unsigned char *save_buf = NULL, *save_buf2 = NULL;
unsigned char md[EVP_MAX_MD_SIZE];
#ifndef NO_FORK
int multi = 0;
long ecdh_c[EC_NUM][2];
int ecdh_doit[EC_NUM];
#endif
-#ifndef TIMES
- usertime = -1;
-#endif
memset(results, 0, sizeof(results));
#ifndef OPENSSL_NO_DSA
argc = opt_num_rest();
argv = opt_rest();
- if (!app_load_modules(NULL))
- goto end;
-
/* Remaining arguments are algorithms. */
for ( ; *argv; argv++) {
if (found(*argv, doit_choices, &i)) {
#ifndef OPENSSL_NO_RSA
# ifndef RSA_NULL
if (strcmp(*argv, "openssl") == 0) {
- RSA_set_default_method(RSA_PKCS1_SSLeay());
+ RSA_set_default_method(RSA_PKCS1_OpenSSL());
continue;
}
# endif
#endif
/* No parameters; turn on everything. */
- if (argc == 0) {
+ if ((argc == 0) && !doit[D_EVP]) {
for (i = 0; i < ALGOR_NUM; i++)
if (i != D_EVP)
doit[i] = 1;
#if !defined(OPENSSL_NO_MD5)
if (doit[D_HMAC]) {
- HMAC_CTX hctx;
+ HMAC_CTX hctx = HMAC_CTX_EMPTY;
HMAC_CTX_init(&hctx);
HMAC_Init_ex(&hctx, (unsigned char *)"This is a key...",
show_res:
#endif
if (!mr) {
- printf("%s\n", SSLeay_version(SSLEAY_VERSION));
- printf("%s\n", SSLeay_version(SSLEAY_BUILT_ON));
+ printf("%s\n", OpenSSL_version(OPENSSL_VERSION));
+ printf("%s\n", OpenSSL_version(OPENSSL_BUILT_ON));
printf("options:");
printf("%s ", BN_options());
#ifndef OPENSSL_NO_MD2
#ifndef OPENSSL_NO_BF
printf("%s ", BF_options());
#endif
- printf("\n%s\n", SSLeay_version(SSLEAY_CFLAGS));
+ printf("\n%s\n", OpenSSL_version(OPENSSL_CFLAGS));
}
if (pr_header) {
end:
ERR_print_errors(bio_err);
- OPENSSL_free(save_buf);
- OPENSSL_free(save_buf2);
+ OPENSSL_free(buf_malloc);
+ OPENSSL_free(buf2_malloc);
#ifndef OPENSSL_NO_RSA
for (i = 0; i < RSA_NUM; i++)
RSA_free(rsa_key[i]);
EC_KEY_free(ecdh_b[i]);
}
#endif
-
return (ret);
}