Fix error check in ecdh_cms_encrypt()
authortb <tb@openbsd.org>
Wed, 17 Apr 2024 13:47:18 +0000 (13:47 +0000)
committertb <tb@openbsd.org>
Wed, 17 Apr 2024 13:47:18 +0000 (13:47 +0000)
commit4056bf7d77ac5ea11baf4530b77738fd053f0b32
tree35b0f835ad97176f278d01b5813dd80ac3b43de5
parent84e9e36a84fae136395e148bce525bf618b063a5
Fix error check in ecdh_cms_encrypt()

ASN1_TYPE_get() returns V_ASN1_* constants.  Checking the return for
NID_undef instead means that we actually check for V_ASN1_EOC, which
makes absolutely no sense here. Clearly V_ASN1_UNDEF was intended.

ok jsing
lib/libcrypto/ec/ec_ameth.c