summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2022-01-24 13:47:53 +0000
committertb <>2022-01-24 13:47:53 +0000
commit4153a7cb53c79cd7fd5f797c80d90f28d6d482de (patch)
treefe716992585b9d94624229c9d2e4aadf7d5cd45e
parent4e5a2a133677d1a18498becda56e1ec104740a03 (diff)
downloadopenbsd-4153a7cb53c79cd7fd5f797c80d90f28d6d482de.tar.gz
openbsd-4153a7cb53c79cd7fd5f797c80d90f28d6d482de.tar.bz2
openbsd-4153a7cb53c79cd7fd5f797c80d90f28d6d482de.zip
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--src/lib/libssl/t1_lib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c
index be4bb3026c..fc1ccca5b9 100644
--- a/src/lib/libssl/t1_lib.c
+++ b/src/lib/libssl/t1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_lib.c,v 1.185 2022/01/08 12:43:44 jsing Exp $ */ 1/* $OpenBSD: t1_lib.c,v 1.186 2022/01/24 13:47:53 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -574,7 +574,6 @@ tls1_check_ec_server_key(SSL *s)
574 uint8_t comp_id; 574 uint8_t comp_id;
575 EC_KEY *eckey; 575 EC_KEY *eckey;
576 EVP_PKEY *pkey; 576 EVP_PKEY *pkey;
577 int rv;
578 577
579 if (cpk->x509 == NULL || cpk->privatekey == NULL) 578 if (cpk->x509 == NULL || cpk->privatekey == NULL)
580 return (0); 579 return (0);
@@ -582,7 +581,7 @@ tls1_check_ec_server_key(SSL *s)
582 return (0); 581 return (0);
583 if ((eckey = EVP_PKEY_get0_EC_KEY(pkey)) == NULL) 582 if ((eckey = EVP_PKEY_get0_EC_KEY(pkey)) == NULL)
584 return (0); 583 return (0);
585 if ((rv = tls1_set_ec_id(&curve_id, &comp_id, eckey)) != 1) 584 if (!tls1_set_ec_id(&curve_id, &comp_id, eckey))
586 return (0); 585 return (0);
587 586
588 return tls1_check_ec_key(s, &curve_id, &comp_id); 587 return tls1_check_ec_key(s, &curve_id, &comp_id);