+ const EVP_MAC *mac;
+ OSSL_PARAM params[2];
+ int ok = 0;
+
+ if (hctx == NULL) {
+ EVPerr(0, EVP_R_NULL_MAC_PKEY_CTX);
+ return 0;
+ }
+ if (hctx->ctx == NULL) {
+ /* This actually means the fetch failed during the init call */
+ EVPerr(0, EVP_R_FETCH_FAILED);
+ return 0;
+ }
+ mac = EVP_MAC_CTX_mac(hctx->ctx);
+
+ /*
+ * Translation of some control names that are equivalent to a single
+ * parameter name.
+ *
+ * "md" and "digest" are the same thing, we use the single "digest"
+ *
+ * "digestsize" was a setting control in siphash, but naming wise,
+ * it's really the same as "size".
+ */
+ if (strcmp(type, "md") == 0)
+ type = OSSL_MAC_PARAM_DIGEST;
+ else if (strcmp(type, "digestsize") == 0)
+ type = OSSL_MAC_PARAM_SIZE;
+
+ if (!OSSL_PARAM_allocate_from_text(¶ms[0],
+ EVP_MAC_settable_ctx_params(mac),
+ type, value, strlen(value) + 1, NULL))
+ return 0;
+ params[1] = OSSL_PARAM_construct_end();