diff options
author | tb <> | 2025-01-18 13:11:58 +0000 |
---|---|---|
committer | tb <> | 2025-01-18 13:11:58 +0000 |
commit | c39b79d2d45df9ada86387a886c6d32487328f86 (patch) | |
tree | fc65433186bf5325130da67e810ce811ea42a47f /src | |
parent | 6e03331a19baa7a7151b89a73b6cf94ab645925f (diff) | |
download | openbsd-c39b79d2d45df9ada86387a886c6d32487328f86.tar.gz openbsd-c39b79d2d45df9ada86387a886c6d32487328f86.tar.bz2 openbsd-c39b79d2d45df9ada86387a886c6d32487328f86.zip |
Remove two pointless NULL checks
The only caller ensures that the EC_KEY is not NULL and passes the address
of comp_id on its stack, so neither will be NULL.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/t1_lib.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c index c889e04180..1fe3c1cde4 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.200 2025/01/18 13:07:47 tb Exp $ */ | 1 | /* $OpenBSD: t1_lib.c,v 1.201 2025/01/18 13:11:58 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 | * |
@@ -631,10 +631,6 @@ tls1_set_ec_id(uint16_t *group_id, uint8_t *comp_id, EC_KEY *ec) | |||
631 | const EC_GROUP *grp; | 631 | const EC_GROUP *grp; |
632 | int nid; | 632 | int nid; |
633 | 633 | ||
634 | if (ec == NULL) | ||
635 | return (0); | ||
636 | |||
637 | /* Determine whether the group is defined over a prime field. */ | ||
638 | if ((grp = EC_KEY_get0_group(ec)) == NULL) | 634 | if ((grp = EC_KEY_get0_group(ec)) == NULL) |
639 | return (0); | 635 | return (0); |
640 | 636 | ||
@@ -643,9 +639,6 @@ tls1_set_ec_id(uint16_t *group_id, uint8_t *comp_id, EC_KEY *ec) | |||
643 | if (!tls1_ec_nid2group_id(nid, group_id)) | 639 | if (!tls1_ec_nid2group_id(nid, group_id)) |
644 | return (0); | 640 | return (0); |
645 | 641 | ||
646 | if (comp_id == NULL) | ||
647 | return (1); | ||
648 | |||
649 | /* Specify the compression identifier. */ | 642 | /* Specify the compression identifier. */ |
650 | if (EC_KEY_get0_public_key(ec) == NULL) | 643 | if (EC_KEY_get0_public_key(ec) == NULL) |
651 | return (0); | 644 | return (0); |