diff options
author | Richard Levitte <levitte@openssl.org> | 2019-04-30 13:41:51 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-04-30 15:34:23 +0200 |
commit | a39eb84006ca68d38d1c7204a6135647d06b5d01 (patch) | |
tree | a39170c4d6ece3fc94ae7fc4e09a97d4b090f00f /providers/common/ciphers/aes.c | |
parent | f79858ac4d90a450d0620d1ecb713bc35d7d9f8d (diff) |
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)
Diffstat (limited to 'providers/common/ciphers/aes.c')
-rw-r--r-- | providers/common/ciphers/aes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/providers/common/ciphers/aes.c b/providers/common/ciphers/aes.c index 2e93461621..8d91ff4804 100644 --- a/providers/common/ciphers/aes.c +++ b/providers/common/ciphers/aes.c @@ -270,7 +270,7 @@ static int aes_cipher(void *vctx, #define IMPLEMENT_new_ctx(lcmode, UCMODE, len) \ static OSSL_OP_cipher_newctx_fn aes_##len##_##lcmode##_newctx; \ - static void *aes_##len##_##lcmode##_newctx(void) \ + static void *aes_##len##_##lcmode##_newctx(void *provctx) \ { \ PROV_AES_KEY *ctx = OPENSSL_zalloc(sizeof(*ctx)); \ \ |