+ /*
+ * 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_CTX_settable_params(mac),
+ type, value, strlen(value) + 1))
+ return 0;
+ params[1] = OSSL_PARAM_construct_end();
+ ok = EVP_MAC_CTX_set_params(hctx->ctx, params);
+ OPENSSL_free(params[0].data);
+ return ok;