summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-01-24 13:47:54 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-01-24 13:47:54 +0000
commit8214fd55c7086be768458ec2e27ab6ec91662528 (patch)
treee1bcbe436637d95d3d45883292c608704d66f888
parent09001ee14fabca24efc47355e62775eec2955867 (diff)
Garbage collect the unused rv in tls1_check_ec_server_key() and
convert to usual form of error checking. ok inoguchi jsing
-rw-r--r--lib/libssl/t1_lib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libssl/t1_lib.c b/lib/libssl/t1_lib.c
index be4bb3026cf..fc1ccca5b93 100644
--- a/lib/libssl/t1_lib.c
+++ b/lib/libssl/t1_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: t1_lib.c,v 1.185 2022/01/08 12:43:44 jsing Exp $ */
+/* $OpenBSD: t1_lib.c,v 1.186 2022/01/24 13:47:53 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -574,7 +574,6 @@ tls1_check_ec_server_key(SSL *s)
uint8_t comp_id;
EC_KEY *eckey;
EVP_PKEY *pkey;
- int rv;
if (cpk->x509 == NULL || cpk->privatekey == NULL)
return (0);
@@ -582,7 +581,7 @@ tls1_check_ec_server_key(SSL *s)
return (0);
if ((eckey = EVP_PKEY_get0_EC_KEY(pkey)) == NULL)
return (0);
- if ((rv = tls1_set_ec_id(&curve_id, &comp_id, eckey)) != 1)
+ if (!tls1_set_ec_id(&curve_id, &comp_id, eckey))
return (0);
return tls1_check_ec_key(s, &curve_id, &comp_id);