aboutsummaryrefslogtreecommitdiffstats
path: root/include/openssl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-06-14 10:19:56 +0200
committerRichard Levitte <levitte@openssl.org>2019-06-17 11:38:11 +0200
commite7706e63e6226c26699062a6d68fc97bed528a6f (patch)
treeca452b3e79ed7c472b394ecbeabb2f614f592194 /include/openssl
parent55a9ca5cc5e14d0018015de31baa28f2a711adaa (diff)
downloadopenssl-e7706e63e6226c26699062a6d68fc97bed528a6f.tar.gz
Replumbing: offer a core upcall to get the provider object's library context
The FIPS module currently has "magic" support to have the library context become the provider context within the core code, for the FIPS module's inner provider. We replace that with a core upcall that returns the library context associated with a provider object. That way, the FIPS module can handle the assignment of the inner provider context itself. This allows the FIPS module (and any other provider module that wishes to use a similar mechanism) to define for itself what the provider context is. It's currently simply a pointer to a library context, but may contain other stuff as well in the future. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9160)
Diffstat (limited to 'include/openssl')
-rw-r--r--include/openssl/core_numbers.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/openssl/core_numbers.h b/include/openssl/core_numbers.h
index 03a918d508..370e0590c2 100644
--- a/include/openssl/core_numbers.h
+++ b/include/openssl/core_numbers.h
@@ -63,6 +63,9 @@ OSSL_CORE_MAKE_FUNC(void,core_put_error,(int lib, int func, int reason,
const char *file, int line))
# define OSSL_FUNC_CORE_ADD_ERROR_VDATA 4
OSSL_CORE_MAKE_FUNC(void,core_add_error_vdata,(int num, va_list args))
+# define OSSL_FUNC_CORE_GET_LIBRARY_CONTEXT 5
+OSSL_CORE_MAKE_FUNC(OPENSSL_CTX *,core_get_library_context,
+ (const OSSL_PROVIDER *prov))
/* Functions provided by the provider to the Core, reserved numbers 1024-1535 */