summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorPaul Yang <kaishen.yy@antfin.com>2019-09-30 11:33:24 +0800
committerPaul Yang <kaishen.yy@antfin.com>2019-09-30 13:39:06 +0800
commit94bd168a9e31d1ab4986e94056dfae71ec5f051f (patch)
treea7273e4a1a65000ef5ee2c1ec8504b9264a981ad /apps
parent41f7ecf30dc9c1bd6988accc0aa288571a25b7bd (diff)
Fix a return value bug in apps/speed.c
Those functions returns less than and equal to 0 to indicate an error occured. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10054)
Diffstat (limited to 'apps')
-rw-r--r--apps/speed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/speed.c b/apps/speed.c
index 59594f0e49..33f77d3b2c 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -3249,8 +3249,8 @@ int speed_main(int argc, char **argv)
if ((ed_pctx = EVP_PKEY_CTX_new_id(test_ed_curves[testnum].nid, NULL))
== NULL
- || !EVP_PKEY_keygen_init(ed_pctx)
- || !EVP_PKEY_keygen(ed_pctx, &ed_pkey)) {
+ || EVP_PKEY_keygen_init(ed_pctx) <= 0
+ || EVP_PKEY_keygen(ed_pctx, &ed_pkey) <= 0) {
st = 0;
EVP_PKEY_CTX_free(ed_pctx);
break;