Don't export ECX key data twice
authorMatt Caswell <matt@openssl.org>
Fri, 24 Apr 2020 15:20:27 +0000 (16:20 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 4 May 2020 08:30:55 +0000 (09:30 +0100)
We had a redundant couple of lines where we exported key data twice.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11635)

providers/implementations/keymgmt/ecx_kmgmt.c

index 278e548832e783616399cf75cca390203b1ba189..d3be2865b9a5f4b361c08ae984d28f496ae5ae9b 100644 (file)
@@ -161,10 +161,6 @@ static int ecx_export(void *keydata, int selection, OSSL_CALLBACK *param_cb,
          && !key_to_params(key, tmpl, NULL))
         goto err;
 
-    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0
-         && !key_to_params(key, tmpl, NULL))
-        goto err;
-
     params = OSSL_PARAM_BLD_to_param(tmpl);
     if (params == NULL)
         goto err;