params: handle the modified sentinel.
authorPauli <paul.dale@oracle.com>
Wed, 22 Apr 2020 04:10:24 +0000 (14:10 +1000)
committerPauli <paul.dale@oracle.com>
Sat, 25 Apr 2020 08:46:01 +0000 (18:46 +1000)
The param builder and the params from text helpers also need to be modified
aware.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11601)

crypto/param_build.c
crypto/params_from_text.c

index 5927d01239fed2321393a0f2a959e5e56238d683..c4624ec33ef61c3e786f2819b65417647523fc99 100644 (file)
@@ -312,7 +312,7 @@ static OSSL_PARAM *param_bld_convert(OSSL_PARAM_BLD *bld, OSSL_PARAM *param,
         param[i].key = pd->key;
         param[i].data_type = pd->type;
         param[i].data_size = pd->size;
-        param[i].return_size = 0;
+        param[i].return_size = OSSL_PARAM_UNMODIFIED;
 
         if (pd->secure) {
             p = secure;
index 25671c592c137593cc56715f8f724cf0027f6b52..14b64edb6bb8de925e6b869529d92505e971e388 100644 (file)
@@ -157,7 +157,7 @@ static int construct_from_text(OSSL_PARAM *to, const OSSL_PARAM *paramdef,
     *to = *paramdef;
     to->data = buf;
     to->data_size = buf_n;
-    to->return_size = 0;
+    to->return_size = OSSL_PARAM_UNMODIFIED;
 
     return 1;
 }