Adapt test/keymgmt_internal_test.c to the redesigned interface
authorRichard Levitte <levitte@openssl.org>
Mon, 3 Feb 2020 14:36:15 +0000 (15:36 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 7 Feb 2020 08:37:56 +0000 (09:37 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11006)

test/keymgmt_internal_test.c

index ccb5f7f9b58bc4433fe22b52036b454bb0170ce0..ad2e1deb5cbfbeed0958d55fa2e5f1709b20c6b5 100644 (file)
@@ -145,7 +145,7 @@ static int test_pass_rsa(FIXTURE *fixture)
     BIGNUM *bn1 = NULL, *bn2 = NULL, *bn3 = NULL;
     EVP_PKEY *pk = NULL;
     EVP_KEYMGMT *km1 = NULL, *km2 = NULL;
-    void *provdata = NULL;
+    void *provkey = NULL;
     /*
      * 32-bit RSA key, extracted from this command,
      * executed with OpenSSL 1.0.2:
@@ -207,12 +207,13 @@ static int test_pass_rsa(FIXTURE *fixture)
         || !TEST_ptr_ne(km1, km2))
         goto err;
 
-    if (!TEST_ptr(evp_keymgmt_util_export_to_provider(pk, km1, 0))
-        || !TEST_ptr(provdata =
-                     evp_keymgmt_util_export_to_provider(pk, km2, 0)))
+    if (!TEST_ptr(evp_keymgmt_util_export_to_provider(pk, km1))
+        || !TEST_ptr(provkey = evp_keymgmt_util_export_to_provider(pk, km2)))
         goto err;
 
-    if (!TEST_true(evp_keymgmt_exportkey(km2, provdata, &export_cb, keydata)))
+    if (!TEST_true(evp_keymgmt_export(km2, provkey,
+                                      OSSL_KEYMGMT_SELECT_KEYPAIR,
+                                      &export_cb, keydata)))
         goto err;
 
     /*