DESERIALIZER: Refactor the constructor setting API
authorRichard Levitte <levitte@openssl.org>
Mon, 27 Jul 2020 19:51:44 +0000 (21:51 +0200)
committerPauli <paul.dale@oracle.com>
Sat, 1 Aug 2020 01:51:20 +0000 (11:51 +1000)
It's not the best idea to set a whole bunch of parameters in one call,
that leads to functions that are hard to update.  Better to re-model
this into several function made to set one parameter each.

This also renames "finalizer" to "constructor", which was suggested
earlier but got lost at the time.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12544)

crypto/serializer/deserializer_lib.c
crypto/serializer/deserializer_meth.c
crypto/serializer/deserializer_pkey.c
crypto/serializer/serializer_local.h
doc/man3/OSSL_DESERIALIZER_from_bio.pod
include/openssl/deserializer.h
util/libcrypto.num
util/other.syms

index d5401dcda325339c140a89c0ffe4d63168f69b58..912e9f8504d4eceda568bab8cf420df47b06719a 100644 (file)
@@ -275,21 +275,62 @@ int OSSL_DESERIALIZER_CTX_num_deserializers(OSSL_DESERIALIZER_CTX *ctx)
     return sk_OSSL_DESERIALIZER_INSTANCE_num(ctx->deser_insts);
 }
 
-int OSSL_DESERIALIZER_CTX_set_finalizer(OSSL_DESERIALIZER_CTX *ctx,
-                                        OSSL_DESERIALIZER_FINALIZER *finalizer,
-                                        OSSL_DESERIALIZER_CLEANER *cleaner,
-                                        void *finalize_arg)
+int OSSL_DESERIALIZER_CTX_set_construct(OSSL_DESERIALIZER_CTX *ctx,
+                                        OSSL_DESERIALIZER_CONSTRUCT *construct)
 {
     if (!ossl_assert(ctx != NULL)) {
         ERR_raise(ERR_LIB_OSSL_DESERIALIZER, ERR_R_PASSED_NULL_PARAMETER);
         return 0;
     }
-    ctx->finalizer = finalizer;
-    ctx->cleaner = cleaner;
-    ctx->finalize_arg = finalize_arg;
+    ctx->construct = construct;
     return 1;
 }
 
+int OSSL_DESERIALIZER_CTX_set_construct_data(OSSL_DESERIALIZER_CTX *ctx,
+                                             void *construct_data)
+{
+    if (!ossl_assert(ctx != NULL)) {
+        ERR_raise(ERR_LIB_OSSL_DESERIALIZER, ERR_R_PASSED_NULL_PARAMETER);
+        return 0;
+    }
+    ctx->construct_data = construct_data;
+    return 1;
+}
+
+int OSSL_DESERIALIZER_CTX_set_cleanup(OSSL_DESERIALIZER_CTX *ctx,
+                                      OSSL_DESERIALIZER_CLEANUP *cleanup)
+{
+    if (!ossl_assert(ctx != NULL)) {
+        ERR_raise(ERR_LIB_OSSL_DESERIALIZER, ERR_R_PASSED_NULL_PARAMETER);
+        return 0;
+    }
+    ctx->cleanup = cleanup;
+    return 1;
+}
+
+OSSL_DESERIALIZER_CONSTRUCT *
+OSSL_DESERIALIZER_CTX_get_construct(OSSL_DESERIALIZER_CTX *ctx)
+{
+    if (ctx == NULL)
+        return NULL;
+    return ctx->construct;
+}
+
+void *OSSL_DESERIALIZER_CTX_get_construct_data(OSSL_DESERIALIZER_CTX *ctx)
+{
+    if (ctx == NULL)
+        return NULL;
+    return ctx->construct_data;
+}
+
+OSSL_DESERIALIZER_CLEANUP *
+OSSL_DESERIALIZER_CTX_get_cleanup(OSSL_DESERIALIZER_CTX *ctx)
+{
+    if (ctx == NULL)
+        return NULL;
+    return ctx->cleanup;
+}
+
 int OSSL_DESERIALIZER_export(OSSL_DESERIALIZER_INSTANCE *deser_inst,
                              void *reference, size_t reference_sz,
                              OSSL_CALLBACK *export_cb, void *export_cbarg)
@@ -354,12 +395,13 @@ static int deser_process(const OSSL_PARAM params[], void *arg)
                                                 data->current_deser_inst_index);
         deser = OSSL_DESERIALIZER_INSTANCE_deserializer(deser_inst);
 
-        if (ctx->finalizer(deser_inst, params, ctx->finalize_arg)) {
+        if (ctx->construct != NULL
+            && ctx->construct(deser_inst, params, ctx->construct_data)) {
             ok = 1;
             goto end;
         }
 
-        /* The finalizer didn't return success */
+        /* The constructor didn't return success */
 
         /*
          * so we try to use the object we got and feed it to any next
index 72da57707e7ed9d3c86c450203bfaf17b178315d..4739c2956df85d74e1e5f484149505a8f0437e2f 100644 (file)
@@ -539,8 +539,8 @@ OSSL_DESERIALIZER_INSTANCE_free(OSSL_DESERIALIZER_INSTANCE *deser_inst)
 void OSSL_DESERIALIZER_CTX_free(OSSL_DESERIALIZER_CTX *ctx)
 {
     if (ctx != NULL) {
-        if (ctx->cleaner != NULL)
-            ctx->cleaner(ctx->finalize_arg);
+        if (ctx->cleanup != NULL)
+            ctx->cleanup(ctx->construct_data);
         sk_OSSL_DESERIALIZER_INSTANCE_pop_free(ctx->deser_insts,
                                                OSSL_DESERIALIZER_INSTANCE_free);
         OSSL_DESERIALIZER_CTX_set_passphrase_ui(ctx, NULL, NULL);
index fc77c6f005e1c094cf99eaf9cd5d1e65060c5f34..e5e8bfda6f4e2170f39953875a39dd591d49dbd3 100644 (file)
@@ -107,11 +107,11 @@ struct deser_EVP_PKEY_data_st {
     STACK_OF(EVP_KEYMGMT) *keymgmts; /* The EVP_KEYMGMTs we handle */
 };
 
-static int deser_finalize_EVP_PKEY(OSSL_DESERIALIZER_INSTANCE *deser_inst,
-                                   const OSSL_PARAM *params,
-                                   void *finalize_arg)
+static int deser_construct_EVP_PKEY(OSSL_DESERIALIZER_INSTANCE *deser_inst,
+                                    const OSSL_PARAM *params,
+                                    void *construct_data)
 {
-    struct deser_EVP_PKEY_data_st *data = finalize_arg;
+    struct deser_EVP_PKEY_data_st *data = construct_data;
     OSSL_DESERIALIZER *deser =
         OSSL_DESERIALIZER_INSTANCE_deserializer(deser_inst);
     void *deserctx = OSSL_DESERIALIZER_INSTANCE_deserializer_ctx(deser_inst);
@@ -225,13 +225,15 @@ static int deser_finalize_EVP_PKEY(OSSL_DESERIALIZER_INSTANCE *deser_inst,
     return (*data->object != NULL);
 }
 
-static void deser_clean_EVP_PKEY(void *finalize_arg)
+static void deser_clean_EVP_PKEY_construct_arg(void *construct_data)
 {
-    struct deser_EVP_PKEY_data_st *data = finalize_arg;
+    struct deser_EVP_PKEY_data_st *data = construct_data;
 
-    sk_EVP_KEYMGMT_pop_free(data->keymgmts, EVP_KEYMGMT_free);
-    OPENSSL_free(data->object_type);
-    OPENSSL_free(data);
+    if (data != NULL) {
+        sk_EVP_KEYMGMT_pop_free(data->keymgmts, EVP_KEYMGMT_free);
+        OPENSSL_free(data->object_type);
+        OPENSSL_free(data);
+    }
 }
 
 DEFINE_STACK_OF_CSTRING()
@@ -353,17 +355,15 @@ OSSL_DESERIALIZER_CTX_new_by_EVP_PKEY(EVP_PKEY **pkey,
     /* Finally, collect extra deserializers based on what we already have */
     (void)OSSL_DESERIALIZER_CTX_add_extra(ctx, libctx, propquery);
 
-    if (!OSSL_DESERIALIZER_CTX_set_finalizer(ctx, deser_finalize_EVP_PKEY,
-                                             deser_clean_EVP_PKEY,
-                                             data->process_data))
+    if (!OSSL_DESERIALIZER_CTX_set_construct(ctx, deser_construct_EVP_PKEY)
+        || !OSSL_DESERIALIZER_CTX_set_construct_data(ctx, data->process_data)
+        || !OSSL_DESERIALIZER_CTX_set_cleanup
+                (ctx, deser_clean_EVP_PKEY_construct_arg))
         goto err;
 
     data->process_data = NULL;
  err:
-    if (data->process_data != NULL)
-        sk_EVP_KEYMGMT_pop_free(data->process_data->keymgmts,
-                                EVP_KEYMGMT_free);
-    OPENSSL_free(data->process_data);
+    deser_clean_EVP_PKEY_construct_arg(data->process_data);
     sk_OPENSSL_CSTRING_free(data->names);
     OPENSSL_free(data);
     return ctx;
index 041780124899ff3097736b4384f1874d04be4640..d139e402d738b85b20471953b77042587e0a100b 100644 (file)
@@ -96,11 +96,11 @@ struct ossl_deserializer_ctx_st {
     STACK_OF(OSSL_DESERIALIZER_INSTANCE) *deser_insts;
 
     /*
-     * The finalizer of a deserialization, and its caller argument.
+     * The constructors of a deserialization, and its caller argument.
      */
-    OSSL_DESERIALIZER_FINALIZER *finalizer;
-    OSSL_DESERIALIZER_CLEANER *cleaner;
-    void *finalize_arg;
+    OSSL_DESERIALIZER_CONSTRUCT *construct;
+    OSSL_DESERIALIZER_CLEANUP *cleanup;
+    void *construct_data;
 
     /* For any function that needs a passphrase reader */
     OSSL_PASSPHRASE_CALLBACK *passphrase_cb;
index 8c372a6cf6e524c85ad9658314e87c1f0d66a120..1aa54899a50ad14b26cbc1b67da1acd9e05a7379 100644 (file)
@@ -9,9 +9,14 @@ OSSL_DESERIALIZER_CTX_add_deserializer,
 OSSL_DESERIALIZER_CTX_add_extra,
 OSSL_DESERIALIZER_CTX_num_deserializers,
 OSSL_DESERIALIZER_INSTANCE,
-OSSL_DESERIALIZER_FINALIZER,
-OSSL_DESERIALIZER_CLEANER,
-OSSL_DESERIALIZER_CTX_set_finalizer,
+OSSL_DESERIALIZER_CONSTRUCT,
+OSSL_DESERIALIZER_CLEANUP,
+OSSL_DESERIALIZER_CTX_set_construct,
+OSSL_DESERIALIZER_CTX_set_construct_data,
+OSSL_DESERIALIZER_CTX_set_cleanup,
+OSSL_DESERIALIZER_CTX_get_construct,
+OSSL_DESERIALIZER_CTX_get_construct_data,
+OSSL_DESERIALIZER_CTX_get_cleanup,
 OSSL_DESERIALIZER_export,
 OSSL_DESERIALIZER_INSTANCE_deserializer,
 OSSL_DESERIALIZER_INSTANCE_deserializer_ctx
@@ -32,25 +37,32 @@ OSSL_DESERIALIZER_INSTANCE_deserializer_ctx
  int OSSL_DESERIALIZER_CTX_num_deserializers(OSSL_DESERIALIZER_CTX *ctx);
 
  typedef struct ossl_deserializer_instance_st OSSL_DESERIALIZER_INSTANCE;
- typedef int (OSSL_DESERIALIZER_FINALIZER)
-     (OSSL_DESERIALIZER_INSTANCE *deser_inst,
-      const OSSL_PARAM *params, void *finalize_arg);
typedef void (OSSL_DESERIALIZER_CLEANER)(void *finalize_arg);
+ OSSL_DESERIALIZER *OSSL_DESERIALIZER_INSTANCE_deserializer
+     (OSSL_DESERIALIZER_INSTANCE *deser_inst);
+ void *OSSL_DESERIALIZER_INSTANCE_deserializer_ctx
    (OSSL_DESERIALIZER_INSTANCE *deser_inst);
 
- int OSSL_DESERIALIZER_CTX_set_finalizer(OSSL_DESERIALIZER_CTX *ctx,
-                                         OSSL_DESRIALIZER_FINALIZER *finalizer,
-                                         OSSL_DESERIALIZER_CLEANER *cleaner,
-                                         void *finalize_arg);
+ typedef int (OSSL_DESERIALIZER_CONSTRUCT)
+     (OSSL_DESERIALIZER_INSTANCE *deser_inst,
+      const OSSL_PARAM *params, void *construct_data);
+ typedef void (OSSL_DESERIALIZER_CLEANUP)(void *construct_data);
+
+ int OSSL_DESERIALIZER_CTX_set_construct
+     (OSSL_DESERIALIZER_CTX *ctx, OSSL_DESERIALIZER_CONSTRUCT *construct);
+ int OSSL_DESERIALIZER_CTX_set_construct_data
+     (OSSL_DESERIALIZER_CTX *ctx, void *construct_data);
+ int OSSL_DESERIALIZER_CTX_set_cleanup(OSSL_DESERIALIZER_CTX *ctx,
+                                       OSSL_DESERIALIZER_CLEANUP *cleanup);
+ OSSL_DESERIALIZER_CONSTRUCT *
+ OSSL_DESERIALIZER_CTX_get_construct(OSSL_DESERIALIZER_CTX *ctx);
+ void *OSSL_DESERIALIZER_CTX_get_construct_data(OSSL_DESERIALIZER_CTX *ctx);
+ OSSL_DESERIALIZER_CLEANUP *
+ OSSL_DESERIALIZER_CTX_get_cleanup(OSSL_DESERIALIZER_CTX *ctx);
 
  int OSSL_DESERIALIZER_export(OSSL_DESERIALIZER_INSTANCE *deser_inst,
                               void *reference, size_t reference_sz,
                               OSSL_CALLBACK *export_cb, void *export_cbarg);
 
- OSSL_DESERIALIZER *OSSL_DESERIALIZER_INSTANCE_deserializer
-     (OSSL_DESERIALIZER_INSTANCE *deser_inst);
- void *OSSL_DESERIALIZER_INSTANCE_deserializer_ctx
-     (OSSL_DESERIALIZER_INSTANCE *deser_inst);
-
 Feature availability macros:
 
 =over 4
@@ -83,26 +95,23 @@ what type of input they have.  In this case, OSSL_DESERIALIZER_from_bio()
 will simply try with one deserializer implementation after the other, and
 thereby discover what kind of input the caller gave it.
 
-For every deserialization done, even intermediary, a I<finalizer>
-provided by the caller is used to attempt to "finalize" the current
-deserialization output, which is always a provider side object of some
-sort, by "wrapping" it into some appropriate type or structure that
-the caller knows how to handle.  Exactly what this "wrapping" consists
-of is entirely at the discretion of the I<finalizer>.
+For every deserialization done, even an intermediary one, a constructor
+provided by the caller is called to attempt to construct an appropriate type
+/ structure that the caller knows how to handle from the current
+deserialization result.
+The constructor is set with OSSL_DESERIALIZER_CTX_set_construct().
 
 B<OSSL_DESERIALIZER_INSTANCE> is an opaque structure that contains
 data about the deserializer that was just used, and that may be
-useful for the I<finalizer>.  There are some functions to extract data
+useful for the constructor.  There are some functions to extract data
 from this type, described further down.
 
 =head2 Functions
 
 OSSL_DESERIALIZER_from_bio() runs the deserialization process for the
-context I<ctx>, with the input coming from the B<BIO> I<in>.  The
-application is required to set up the B<BIO> properly, for example to
-have it in text or binary mode if that's appropriate.
-
-=for comment Know your deserializer!
+context I<ctx>, with the input coming from the B<BIO> I<in>.  Should
+it make a difference, it's recommended to have the BIO set in binary
+mode rather than text mode.
 
 OSSL_DESERIALIZER_from_fp() does the same thing as OSSL_DESERIALIZER_from_bio(),
 except that the input is coming from the B<FILE> I<fp>.
@@ -122,17 +131,28 @@ description above.
 OSSL_DESERIALIZER_CTX_num_deserializers() gets the number of
 deserializers currently added to the context I<ctx>.
 
-OSSL_DESERIALIZER_CTX_set_finalizer() sets the I<finalizer> function
-together with the caller argument for the finalizer, I<finalize_arg>,
-as well as I<cleaner>, the function to clean up I<finalize_arg> when
-the deserialization has concluded.
+OSSL_DESERIALIZER_CTX_set_construct() sets the constructor I<construct>.
 
-OSSL_DESERIALIZER_export() is a fallback function for I<finalizers>
-that can't use the data they get directly for diverse reasons.  It
-takes the same deserialize instance I<deser_inst> that the
-I<finalizer> got and an object I<reference>, unpacks the object that
-refers to, and exports it by creating an L<OSSL_PARAM(3)> array that
-it then passes to I<export_cb>, along with I<export_arg>.
+OSSL_DESERIALIZER_CTX_set_construct_data() sets the constructor data that is
+passed to the constructor every time it's called.
+
+OSSL_DESERIALIZER_CTX_set_cleanup() sets the constructor data I<cleanup>
+function.  This is called by L<OSSL_DESERIALIZER_CTX_free(3)>.
+
+OSSL_DESERIALIZER_CTX_get_construct(),
+OSSL_DESERIALIZER_CTX_get_construct_data() and
+OSSL_DESERIALIZER_CTX_get_cleanup()
+return the values that have been set by
+OSSL_DESERIALIZER_CTX_set_construct(),
+OSSL_DESERIALIZER_CTX_set_construct_data() and
+OSSL_DESERIALIZER_CTX_set_cleanup() respectively.
+
+OSSL_DESERIALIZER_export() is a fallback function for constructors that
+cannot use the data they get directly for diverse reasons.  It takes the same
+deserialize instance I<deser_inst> that the constructor got and an object
+I<reference>, unpacks the object which it refers to, and exports it by creating
+an L<OSSL_PARAM(3)> array that it then passes to I<export_cb>, along with
+I<export_arg>.
 
 OSSL_DESERIALIZER_INSTANCE_deserializer() can be used to get the
 deserializer method from a deserializer instance I<deser_inst>.
@@ -141,32 +161,31 @@ OSSL_DESERIALIZER_INSTANCE_deserializer-ctx() can be used to get the
 deserializer method's provider context from a deserializer instance
 I<deser_inst>.
 
-=head2 Finalizer
+=head2 Constructor
 
-The I<finalizer> gets the following arguments:
+A B<OSSL_DESERIALIZER_CONSTRUCT> gets the following arguments:
 
 =over 4
 
 =item I<deser_inst>
 
 The B<OSSL_DESERIALIZER_INSTANCE> for the deserializer from which
-I<finalizer> gets its data.
+the constructor gets its data.
 
 =item I<params>
 
 The data produced by the deserializer, further described below.
 
-=item I<finalize_arg>
+=item I<construct_data>
 
-The pointer that was set with OSSL_DESERIALIZE_CTX_set_finalizer() as
-I<finalize_arg>.
+The pointer that was set with OSSL_DESERIALIZE_CTX_set_construct_data().
 
 =back
 
-The I<finalizer> is expected to return 1 when the data it receives can
-be "finalized", otherwise 0.
+The constructor is expected to return 1 when the data it receives can
+be constructed, otherwise 0.
 
-The globally known parameters that I<finalize> can get in I<params>
+The globally known parameters that the constructor can get in I<params>
 are:
 
 =over 4
@@ -177,7 +196,7 @@ This is a detected content type that some deserializers may provide.
 For example, PEM input sometimes has a type specified in its header,
 and some deserializers may add that information as this parameter.
 This is an optional parameter, but may be useful for extra checks in
-the I<finalizer>.
+the constructor.
 
 =item "data" (B<OSSL_DESERIALIZER_PARAM_DATA>) <octet string>
 
@@ -185,7 +204,7 @@ The deserialized data itself, as an octet string.  This is produced by
 deserializers when it's possible to pass an object in this form.  Most
 often, this is simply meant to be passed to the next deserializer in a
 chain, but could be considered final data as well, at the discretion
-of the I<finalizer>.
+of the constructor.
 
 =item "reference" (B<OSSL_DESERIALIZER_PARAM_DATA>) <octet string>
 
@@ -197,11 +216,12 @@ provides I<deser>.
 =back
 
 At least one of "data" or "reference" must be present, and it's
-possible that both can be.  A I<finalizer> should choose to use the
-"reference" parameter if possible, otherwise the "data" parameter.
+possible that both can be.  A constructor should choose to use the
+"reference" parameter if possible, otherwise it should use the "data"
+parameter.
 
 If it's not possible to use the "reference" parameter, but that's
-still what a I<finalizer> wants to do, it is possible to use
+still what a constructor wants to do, it is possible to use
 OSSL_DESERIALIZER_export() as a fallback.
 
 =head1 RETURN VALUES
@@ -210,10 +230,17 @@ OSSL_DESERIALIZER_from_bio() and OSSL_DESERIALIZER_from_fp() return 1 on
 success, or 0 on failure.
 
 OSSL_DESERIALIZER_CTX_add_deserializer(),
-OSSL_DESERIALIZER_CTX_add_extra(), and
-OSSL_DESERIALIZER_CTX_set_finalizer() return 1 on success, or 0 on
+OSSL_DESERIALIZER_CTX_add_extra(),
+OSSL_DESERIALIZER_CTX_set_construct(),
+OSSL_DESERIALIZER_CTX_set_construct_data() and
+OSSL_DESERIALIZER_CTX_set_cleanup() return 1 on success, or 0 on
 failure.
 
+OSSL_DESERIALIZER_CTX_get_construct(),
+OSSL_DESERIALIZER_CTX_get_construct_data() and
+OSSL_DESERIALIZER_CTX_get_cleanup() return the current pointers to the
+cosntructor, the constructor data and the cleanup functions, respectively.
+
 OSSL_DESERIALIZER_CTX_num_deserializers() returns the current
 number of deserializers.  It returns 0 if I<ctx> is NULL.
 
index 7ac74960666c946c6f211d168c77f38a08391833..0133785b50dcf5c72ac13026e49660a6666e0f04 100644 (file)
@@ -79,25 +79,32 @@ int OSSL_DESERIALIZER_CTX_add_extra(OSSL_DESERIALIZER_CTX *ctx,
 int OSSL_DESERIALIZER_CTX_num_deserializers(OSSL_DESERIALIZER_CTX *ctx);
 
 typedef struct ossl_deserializer_instance_st OSSL_DESERIALIZER_INSTANCE;
-typedef int (OSSL_DESERIALIZER_FINALIZER)
-    (OSSL_DESERIALIZER_INSTANCE *deser_inst,
-     const OSSL_PARAM *params, void *finalize_arg);
-typedef void (OSSL_DESERIALIZER_CLEANER)(void *finalize_arg);
+OSSL_DESERIALIZER *OSSL_DESERIALIZER_INSTANCE_deserializer
+    (OSSL_DESERIALIZER_INSTANCE *deser_inst);
+void *OSSL_DESERIALIZER_INSTANCE_deserializer_ctx
+    (OSSL_DESERIALIZER_INSTANCE *deser_inst);
 
-int OSSL_DESERIALIZER_CTX_set_finalizer(OSSL_DESERIALIZER_CTX *ctx,
-                                        OSSL_DESERIALIZER_FINALIZER *finalizer,
-                                        OSSL_DESERIALIZER_CLEANER *cleaner,
-                                        void *finalize_arg);
+typedef int (OSSL_DESERIALIZER_CONSTRUCT)
+    (OSSL_DESERIALIZER_INSTANCE *deser_inst,
+     const OSSL_PARAM *params, void *construct_data);
+typedef void (OSSL_DESERIALIZER_CLEANUP)(void *construct_data);
+
+int OSSL_DESERIALIZER_CTX_set_construct(OSSL_DESERIALIZER_CTX *ctx,
+                                        OSSL_DESERIALIZER_CONSTRUCT *construct);
+int OSSL_DESERIALIZER_CTX_set_construct_data(OSSL_DESERIALIZER_CTX *ctx,
+                                             void *construct_data);
+int OSSL_DESERIALIZER_CTX_set_cleanup(OSSL_DESERIALIZER_CTX *ctx,
+                                      OSSL_DESERIALIZER_CLEANUP *cleanup);
+OSSL_DESERIALIZER_CONSTRUCT *
+OSSL_DESERIALIZER_CTX_get_construct(OSSL_DESERIALIZER_CTX *ctx);
+void *OSSL_DESERIALIZER_CTX_get_construct_data(OSSL_DESERIALIZER_CTX *ctx);
+OSSL_DESERIALIZER_CLEANUP *
+OSSL_DESERIALIZER_CTX_get_cleanup(OSSL_DESERIALIZER_CTX *ctx);
 
 int OSSL_DESERIALIZER_export(OSSL_DESERIALIZER_INSTANCE *deser_inst,
                              void *reference, size_t reference_sz,
                              OSSL_CALLBACK *export_cb, void *export_cbarg);
 
-OSSL_DESERIALIZER *OSSL_DESERIALIZER_INSTANCE_deserializer
-    (OSSL_DESERIALIZER_INSTANCE *deser_inst);
-void *OSSL_DESERIALIZER_INSTANCE_deserializer_ctx
-    (OSSL_DESERIALIZER_INSTANCE *deser_inst);
-
 int OSSL_DESERIALIZER_from_bio(OSSL_DESERIALIZER_CTX *ctx, BIO *in);
 #ifndef OPENSSL_NO_STDIO
 int OSSL_DESERIALIZER_from_fp(OSSL_DESERIALIZER_CTX *ctx, FILE *in);
index 0c94a3e7dc70315a03582191132aa943ed4ebf4f..b1c7947b86df14318915661e0100c81955ff6565 100644 (file)
@@ -5171,7 +5171,6 @@ OSSL_DESERIALIZER_from_fp               ? 3_0_0   EXIST::FUNCTION:STDIO
 OSSL_DESERIALIZER_CTX_add_deserializer  ?      3_0_0   EXIST::FUNCTION:
 OSSL_DESERIALIZER_CTX_add_extra         ?      3_0_0   EXIST::FUNCTION:
 OSSL_DESERIALIZER_CTX_num_deserializers ?      3_0_0   EXIST::FUNCTION:
-OSSL_DESERIALIZER_CTX_set_finalizer     ?      3_0_0   EXIST::FUNCTION:
 OSSL_DESERIALIZER_CTX_set_input_type    ?      3_0_0   EXIST::FUNCTION:
 OSSL_DESERIALIZER_export                ?      3_0_0   EXIST::FUNCTION:
 OSSL_DESERIALIZER_INSTANCE_deserializer ?      3_0_0   EXIST::FUNCTION:
@@ -5192,3 +5191,9 @@ EVP_PKEY_get1_ED25519                   ? 3_0_0   EXIST::FUNCTION:EC
 EVP_PKEY_set1_ED448                     ?      3_0_0   EXIST::FUNCTION:EC
 EVP_PKEY_get0_ED448                     ?      3_0_0   EXIST::FUNCTION:EC
 EVP_PKEY_get1_ED448                     ?      3_0_0   EXIST::FUNCTION:EC
+OSSL_DESERIALIZER_CTX_set_construct     ?      3_0_0   EXIST::FUNCTION:
+OSSL_DESERIALIZER_CTX_set_construct_data ?     3_0_0   EXIST::FUNCTION:
+OSSL_DESERIALIZER_CTX_set_cleanup       ?      3_0_0   EXIST::FUNCTION:
+OSSL_DESERIALIZER_CTX_get_construct     ?      3_0_0   EXIST::FUNCTION:
+OSSL_DESERIALIZER_CTX_get_construct_data ?     3_0_0   EXIST::FUNCTION:
+OSSL_DESERIALIZER_CTX_get_cleanup       ?      3_0_0   EXIST::FUNCTION:
index a8eda47bde9be4c2d07e7b5f4cdb5b195d261894..bfe320396b32595604b7d23f89a2569388a7db74 100644 (file)
@@ -43,8 +43,8 @@ OPENSSL_CTX                             datatype
 NAMING_AUTHORITY                        datatype
 OSSL_DESERIALIZER                       datatype
 OSSL_DESERIALIZER_CTX                   datatype
-OSSL_DESERIALIZER_FINALIZER             datatype
-OSSL_DESERIALIZER_CLEANER               datatype
+OSSL_DESERIALIZER_CONSTRUCT             datatype
+OSSL_DESERIALIZER_CLEANUP               datatype
 OSSL_DESERIALIZER_INSTANCE              datatype
 OSSL_DESERIALIZER_CTX                   datatype
 OSSL_HTTP_bio_cb_t                      datatype