test: add params argument to key manager's gen_init call
authorPauli <ppzgs1@gmail.com>
Mon, 1 Mar 2021 23:01:14 +0000 (09:01 +1000)
committerPauli <ppzgs1@gmail.com>
Thu, 11 Mar 2021 22:27:11 +0000 (08:27 +1000)
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14383)

test/tls-provider.c

index 03e2ae1f0ebacf1a056b534b3339ab71784dc608..20598041e0884f24b8b6750dbcfacbb3c60daa83 100644 (file)
@@ -317,7 +317,7 @@ static int xor_encapsulate(void *vpxorctx,
     }
 
     /* 1. Generate keypair */
-    genctx = xor_gen_init(pxorctx->provctx, OSSL_KEYMGMT_SELECT_KEYPAIR);
+    genctx = xor_gen_init(pxorctx->provctx, OSSL_KEYMGMT_SELECT_KEYPAIR, NULL);
     if (genctx == NULL)
         goto end;
     ourkey = xor_gen(genctx, NULL, NULL);
@@ -537,7 +537,8 @@ struct xor_gen_ctx {
     OSSL_LIB_CTX *libctx;
 };
 
-static void *xor_gen_init(void *provctx, int selection)
+static void *xor_gen_init(void *provctx, int selection,
+                          const OSSL_PARAM params[])
 {
     struct xor_gen_ctx *gctx = NULL;
 
@@ -551,6 +552,10 @@ static void *xor_gen_init(void *provctx, int selection)
     /* Our provctx is really just an OSSL_LIB_CTX */
     gctx->libctx = (OSSL_LIB_CTX *)provctx;
 
+    if (!xor_gen_set_params(gctx, params)) {
+        OPENSSL_free(gctx);
+        return NULL;
+    }
     return gctx;
 }