Replumbing: Add the Provider Object, type OSSL_PROVIDER
[openssl.git] / include / openssl / core.h
index 98b58bea6963e69053dc8c94d8afd306aca59384..15e88434cd06d1119f26303974c365c7304b1457 100644 (file)
@@ -136,6 +136,26 @@ struct ossl_param_st {
 # define OSSL_PARAM_OCTET_STRING_PTR                    \
     (OSSL_PARAM_OCTET_STRING|OSSL_PARAM_POINTER_FLAG)
 
+/*-
+ * Provider entry point
+ * --------------------
+ *
+ * This function is expected to be present in any dynamically loadable
+ * provider module.  By definition, if this function doesn't exist in a
+ * module, that module is not an OpenSSL provider module.
+ */
+/*-
+ * |provider|   pointer to opaque type OSSL_PROVIDER.  This can be used
+ *              together with some functions passed via |in| to query data.
+ * |in|         is the array of functions that the Core passes to the provider.
+ * |out|        will be the array of base functions that the provider passes
+ *              back to the Core.
+ */
+typedef int (OSSL_provider_init_fn)(const OSSL_PROVIDER *provider,
+                                    const OSSL_DISPATCH *in,
+                                    const OSSL_DISPATCH **out);
+extern OSSL_provider_init_fn OSSL_provider_init;
+
 # ifdef __cplusplus
 }
 # endif