<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 3, 2022 at 3:10 PM William Roberts <<a href="mailto:bill.c.roberts@gmail.com">bill.c.roberts@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, May 3, 2022 at 1:14 PM Chris Bare <<a href="mailto:chris.bare@gmail.com" target="_blank">chris.bare@gmail.com</a>> wrote:<br>
><br>
> I'm converting some openssl 1.0 code to 3.0 and I don't know how to get the coordinates<br>
> in a 3.0 way.<br>
> The old code is:<br>
> BN_CTX *ctx = BN_CTX_new ();<br>
> BIGNUM *X = NULL, *Y = NULL;<br>
> const EC_POINT *pubkey;<br>
> const EC_GROUP *group;<br>
> BN_CTX_start (ctx);<br>
> X = BN_CTX_get (ctx);<br>
> Y = BN_CTX_get (ctx);<br>
> pubkey = EC_KEY_get0_public_key ((EC_KEY *) EVP_PKEY_get0 (pkey));<br>
> group = EC_KEY_get0_group ((EC_KEY *) EVP_PKEY_get0 (cvr->sm_pkey));<br>
> EC_POINT_get_affine_coordinates_GFp (group, pubkey, X, Y, ctx)<br>
><br>
> What would be the 3.0 way to get X and Y without using deprecated functions?<br>
<br>
For EC_POINT_get_affine_coordinates_GFp it goes to<br>
EC_POINT_get_affine_coordinates, see:<br>
  - <a href="https://www.openssl.org/docs/man3.0/man3/EC_POINT_get_affine_coordinates.html" rel="noreferrer" target="_blank">https://www.openssl.org/docs/man3.0/man3/EC_POINT_get_affine_coordinates.html</a><br>
<br>
Offhand I don't see any other deprecated functions, was that the only one?<br>
<br>
Thanks,<br>
Bill<br>
</blockquote></div><div><br></div><div>all the EC_KEY_get0_ functions are deprecated. Is there a new way to access the internals of</div><div>the opaque structures, or am I stuck with the deprecated ones for this?<br></div><br>-- <br><div dir="ltr" class="gmail_signature">Chris Bare</div></div>