Simplify ec_asn1_group2curve()
authortb <tb@openbsd.org>
Tue, 24 May 2022 20:06:32 +0000 (20:06 +0000)
committertb <tb@openbsd.org>
Tue, 24 May 2022 20:06:32 +0000 (20:06 +0000)
commitaaf8962a38dde62945cde0170b03c5fd5321e885
treefbebb2cdcdcf1ffa91be8180af2f1514014bbc53
parentbb34c9a008c176c2db28fbe8be807d2bc5afbfad
Simplify ec_asn1_group2curve()

Don't try to reuse curve->seed to avoid an allocation. Free it
unconditionally and copy over the group->seed if it's available.
Use asn1_abs_set_unused_bits() instead of inlining it.

ok jsing
lib/libcrypto/ec/ec_asn1.c