Make OBJ_obj2nid() work correctly with NID_undef.
authorjsing <jsing@openbsd.org>
Fri, 11 Feb 2022 16:39:16 +0000 (16:39 +0000)
committerjsing <jsing@openbsd.org>
Fri, 11 Feb 2022 16:39:16 +0000 (16:39 +0000)
commit0709e0c5b399519580f68aad556b951e95901922
treebc405bd33688c608fd15b79a0bc70b1b584b394a
parent3f4089c48468d187eaa6b693d30aed4855a25bda
Make OBJ_obj2nid() work correctly with NID_undef.

Currently OBJ_obj2nid() with NID_undef returns NID_ccitt - this is due to
doing a lookup on an empty value and having NID_undef conflict with an
uninitialised NID value.

Somewhat based on OpenSSL 0fb99904809.

ok tb@
lib/libcrypto/objects/obj_dat.c