diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2022-01-24 13:47:54 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2022-01-24 13:47:54 +0000 |
commit | 8214fd55c7086be768458ec2e27ab6ec91662528 (patch) | |
tree | e1bcbe436637d95d3d45883292c608704d66f888 | |
parent | 09001ee14fabca24efc47355e62775eec2955867 (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.c | 5 |
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); |