The new BN_CTX code enforces that the context be started before a BIGNUM
can be obtained from it via BN_CTX_get(), tests for ssl/interop and the
openssl app broke, implying missing test coverage in libcrypto itself.
Add the obviously missing bits.
reported by anton
ok jsing
-/* $OpenBSD: gostr341001_key.c,v 1.10 2022/11/26 16:08:53 tb Exp $ */
+/* $OpenBSD: gostr341001_key.c,v 1.11 2023/01/15 13:58:44 tb Exp $ */
/*
* Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
* Copyright (c) 2005-2006 Cryptocom LTD
if (ctx == NULL)
goto err;
+ BN_CTX_start(ctx);
+
point = EC_POINT_new(key->group);
if (point == NULL)
goto err;
err:
EC_POINT_free(point);
+ BN_CTX_end(ctx);
BN_CTX_free(ctx);
return ok;