Remove engine param macros from wrapper APIs
authorPauli <paul.dale@oracle.com>
Sun, 22 Sep 2019 00:43:08 +0000 (10:43 +1000)
committerPauli <paul.dale@oracle.com>
Wed, 25 Sep 2019 01:20:41 +0000 (11:20 +1000)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9971)

crypto/evp/p_lib.c
crypto/evp/pkey_mac.c

index 5ec519d27cd9a4ecade7f31d5b6c9d4832fdf9ac..83cf12fff38f9e9f50d4ab5ebe76baef6a6399d1 100644 (file)
@@ -344,8 +344,7 @@ EVP_PKEY *EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv,
 # ifndef OPENSSL_NO_ENGINE
     if (engine_id != NULL)
         params[paramsn++] =
-            OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_ENGINE,
-                                             (char *)engine_id, 0);
+            OSSL_PARAM_construct_utf8_string("engine", (char *)engine_id, 0);
 # endif
 
     params[paramsn++] =
index 1343e19e760213b7e1037711c6ca4d79637ca3f1..5f33b4e4213ef75b39eafd2dbde13ee53d660aa4 100644 (file)
@@ -278,8 +278,7 @@ static int pkey_mac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
                 char *engineid = (char *)ENGINE_get_id(ctx->engine);
 
                 params[params_n++] =
-                    OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_ENGINE,
-                                                     engineid, 0);
+                    OSSL_PARAM_construct_utf8_string("engine", engineid, 0);
 #endif
                 params[params_n++] =
                     OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_CIPHER,
@@ -400,11 +399,9 @@ static int pkey_mac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
                 char *engineid = ctx->engine == NULL
                     ? NULL : (char *)ENGINE_get_id(ctx->engine);
 
-                if (engineid != NULL) {
+                if (engineid != NULL)
                     params[params_n++] =
-                        OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_ENGINE,
-                                                         engineid, 0);
-                }
+                        OSSL_PARAM_construct_utf8_string("engine", engineid, 0);
 #endif
                 params[params_n++] =
                     OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_DIGEST,