CORE: Encure that cached fetches can be done per provider
[openssl.git] / doc / internal / man3 / ossl_method_construct.pod
index f30e5609dce388196ece471f0ed2ede5b09b15ca..3683798b06b49b8c65b7a7592d7a8cc0c05b0c92 100644 (file)
@@ -13,16 +13,15 @@ OSSL_METHOD_CONSTRUCT_METHOD, ossl_method_construct
      /* Get a temporary store */
      void *(*get_tmp_store)(void *data);
      /* Get an already existing method from a store */
-     void *(*get)(void *store, void *data);
+     void *(*get)(void *store, const OSSL_PROVIDER *prov, void *data);
      /* Store a method in a store */
-     int (*put)(void *store, void *method,
-                const OSSL_PROVIDER *prov, const char *name,
-                const char *propdef, void *data);
+     int (*put)(void *store, void *method, const OSSL_PROVIDER *prov,
+                const char *name, const char *propdef, void *data);
      /* Construct a new method */
-     void *(*construct)(const char *name, const OSSL_DISPATCH *fns,
-                        OSSL_PROVIDER *prov, void *data);
+     void *(*construct)(const OSSL_ALGORITHM *algodef, OSSL_PROVIDER *prov,
+                        void *data);
      /* Destruct a method */
-     void (*destruct)(void *method);
+     void (*destruct)(void *method, void *data);
  };
  typedef struct ossl_method_construct_method OSSL_METHOD_CONSTRUCT_METHOD;
 
@@ -75,17 +74,13 @@ function pointers:
 
 =over 4
 
-=item alloc_tmp_store()
+=item get_tmp_store()
 
 Create a temporary method store in the scope of the library context I<ctx>.
 This store is used to temporarily store methods for easier lookup, for
 when the provider doesn't want its dispatch table stored in a longer
 term cache.
 
-=item dealloc_tmp_store()
-
-Remove a temporary store.
-
 =item get()
 
 Look up an already existing method from a store by name.
@@ -100,7 +95,10 @@ The method to be looked up should be identified with data found in I<data>
 In other words, the ossl_method_construct() caller is entirely responsible
 for ensuring the necesssary data is made available.
 
-This function is expected to increment the method's reference count.
+Optionally, I<prov> may be given as a search criterion, to narrow down the
+search of a method belonging to just one provider.
+
+This function is expected to increment the resulting method's reference count.
 
 =item put()
 
@@ -112,7 +110,7 @@ NULL is a valid value and means that a subsystem default store
 must be used.
 This default store should be stored in the library context I<libctx>.
 
-The method should be associated with the given I<operation_id>,
+The method should be associated with the given provider I<prov>,
 I<name> and property definition I<propdef> as well as any
 identification data given through I<data> (which is the I<mcm_data>
 that was passed to ossl_construct_method()).