Replumbing: give the possibility for the provider to create a context
authorRichard Levitte <levitte@openssl.org>
Tue, 30 Apr 2019 11:41:51 +0000 (13:41 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 30 Apr 2019 13:34:23 +0000 (15:34 +0200)
commita39eb84006ca68d38d1c7204a6135647d06b5d01
treea39170c4d6ece3fc94ae7fc4e09a97d4b090f00f
parentf79858ac4d90a450d0620d1ecb713bc35d7d9f8d
Replumbing: give the possibility for the provider to create a context

OSSL_provider_init() gets another output parameter, holding a pointer
to a provider side context.  It's entirely up to the provider to
define the context and what it's being used for.  This pointer is
passed back to other provider functions, typically the provider global
get_params and set_params functions, and also the diverse algorithm
context creators, and of course, the teardown function.

With this, a provider can be instantiated more than once, or be
re-loaded as the case may be, while maintaining instance state.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8848)
13 files changed:
crypto/evp/digest.c
crypto/evp/evp_enc.c
crypto/provider_core.c
doc/internal/man3/ossl_provider_new.pod
include/internal/provider.h
include/openssl/core.h
include/openssl/core_numbers.h
providers/common/ciphers/aes.c
providers/common/digests/sha2.c
providers/default/defltprov.c
providers/fips/fipsprov.c
providers/legacy/legacyprov.c
test/p_test.c