Adapt int_ctx_new() to use with providers
authorRichard Levitte <levitte@openssl.org>
Tue, 9 Jul 2019 15:31:24 +0000 (17:31 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 22 Jul 2019 04:18:58 +0000 (06:18 +0200)
commitd0ea49a820e02713bbe8892a333f2552da633b16
treec250dc8d1703bb6942f3f6bf0ebaf4e2f3a25f24
parent70a1f7b4d7a0611508f45ef884472b9d84cbe108
Adapt int_ctx_new() to use with providers

This affects all its callers: EVP_PKEY_CTX_new(), EVP_PKEY_CTX_new_id().
They are now possible to called with "zero" values, i.e.:

    EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new(NULL, NULL);

or

    EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new_id(0, NULL);

This is suitable for provider use, as the key functionality is tied
with its keys, and the operation time is determined by the init
functions the EVP_PKEY_CTX is used with.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9312)
crypto/evp/pmeth_lib.c