ossl_provider_library_context(NULL) returns NULL.

This will only be required until everything is moved to providers and a NULL
provider pointer won't be possible.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9662)
This commit is contained in:
Pauli 2019-08-29 13:02:54 +10:00
parent 9d8e1569aa
commit 185ce3d93e
1 changed files with 2 additions and 1 deletions

View File

@ -709,7 +709,8 @@ const char *ossl_provider_module_path(const OSSL_PROVIDER *prov)
OPENSSL_CTX *ossl_provider_library_context(const OSSL_PROVIDER *prov)
{
return prov->libctx;
/* TODO(3.0) just: return prov->libctx; */
return prov != NULL ? prov->libctx : NULL;
}
/* Wrappers around calls to the provider */