CVSROOT:        /cvs
Module name:    src
Changes by:     t...@cvs.openbsd.org    2023/05/02 04:44:20

Modified files:
        lib/libcrypto/ec: ec_curve.c 

Log message:
Simplify EC_GROUP_new_by_curve_name()

Pull the setting of the name a.k.a. nid into ec_group_new_from_data().
This way, we can return early on finding the nid in the curve_list[].
This also avoids a silly bug where a bogus ERR_R_UNKNOWN_BUG is pushed
onto the error stack when ec_group_new_from_data() failed.

While there rework the exit path of ec_group_new_from_data() a bit.
Instead of an ok variable we can use an additional pointer to keep
track of the return value and free the EC_GROUP unconditionally.

ok jsing

Reply via email to