libssl: don't reach for pkey->save_type.
authortb <tb@openbsd.org>
Fri, 19 Nov 2021 18:53:10 +0000 (18:53 +0000)
committertb <tb@openbsd.org>
Fri, 19 Nov 2021 18:53:10 +0000 (18:53 +0000)
commit7aaded86f9f3587cb266a6a48ae43ea799bfa0c0
tree209b983adeb01b3052c077d0e35de0d55b37a5d4
parent6911632ba3a60c1920af7c2d3d79a0a56f9f2d4c
libssl: don't reach for pkey->save_type.

For some strange historical reason ECDSA_sign() and ECDSA_verify}() have
a type argument that they ignore. For another strange historical reason,
the type passed to them from libssl is pkey->save_type, which is used to
avoid expensive engine lookups when setting the pkey type... Whatever the
aforementioned reasons were, we can't access pkey->save_type with the
OpenSSL 1.1 API, and this is thus in the way of making EVP_PKEY opaque.
Simply pass in 0 instead.

ok jsing
lib/libssl/ssl_clnt.c
lib/libssl/ssl_srvr.c