long bytes_read = 0, finishtime = 0;
OPTION_CHOICE o;
int min_version = 0, max_version = 0, ver, buf_len, fd;
+ int want_verify = 0;
size_t buf_size;
meth = TLS_client_method();
break;
case OPT_VERIFY:
verify_args.depth = opt_int_arg();
+ want_verify = 1;
BIO_printf(bio_err, "%s: verify depth is %d\n",
prog, verify_args.depth);
break;
ERR_print_errors(bio_err);
goto end;
}
+
+ if (want_verify) {
+ X509_VERIFY_PARAM *vpm;
+ SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, verify_callback);
+ vpm = SSL_CTX_get0_param(ctx);
+ if (vpm != NULL && verify_args.depth >= 0)
+ X509_VERIFY_PARAM_set_depth(vpm, verify_args.depth);
+ }
+
if (!(perform & 1))
goto next;
printf("Collecting connection statistics for %d seconds\n", maxtime);