EVP: Adapt KEYEXCH, SIGNATURE and ASYM_CIPHER to handle key types better
[oweals/openssl.git] / crypto / evp / pmeth_gn.c
index a5f7dbaf53b2893479cf859a6fb63b82c6f0033f..100931cda7f111cbc434e3a04b96f97aace39643 100644 (file)
 
 static int fromdata_init(EVP_PKEY_CTX *ctx, int operation)
 {
-    if (ctx == NULL || ctx->algorithm == NULL)
+    if (ctx == NULL || ctx->keytype == NULL)
         goto not_supported;
 
     evp_pkey_ctx_free_old_ops(ctx);
     ctx->operation = operation;
     if (ctx->keymgmt == NULL)
-        ctx->keymgmt = EVP_KEYMGMT_fetch(NULL, ctx->algorithm, ctx->propquery);
+        ctx->keymgmt = EVP_KEYMGMT_fetch(NULL, ctx->keytype, ctx->propquery);
     if (ctx->keymgmt == NULL)
         goto not_supported;