+ pctx->shared_ukm_size = p1;
+ return 1;
+ case EVP_PKEY_CTRL_SET_VKO:
+ switch (p1) {
+ case 0: /* switch to KEG */
+ case NID_id_GostR3411_2012_256:
+ case NID_id_GostR3411_2012_512:
+ break;
+ default:
+ GOSTerr(GOST_F_PKEY_GOST_CTRL, GOST_R_INVALID_DIGEST_TYPE);
+ return 0;
+ }
+ pctx->vko_dgst_nid = p1;
+ return 1;
+ case EVP_PKEY_CTRL_CIPHER:
+ switch (p1) {
+ case NID_magma_ctr_acpkm:
+ case NID_magma_ctr_acpkm_omac:
+ case NID_magma_ctr:
+ pctx->cipher_nid = NID_magma_ctr;
+ return 1;
+ case NID_kuznyechik_ctr_acpkm:
+ case NID_kuznyechik_ctr_acpkm_omac:
+ case NID_kuznyechik_ctr:
+ pctx->cipher_nid = NID_kuznyechik_ctr;
+ return 1;
+ default:
+ pctx->cipher_nid = p1;
+ return 1;
+ }