Lines Matching defs:ctx
22 static int genpkey_cb(EVP_PKEY_CTX *ctx);
67 EVP_PKEY_CTX *ctx = NULL;
148 if (!init_keygen_file(&ctx, paramfile, e, libctx, app_get0_propq()))
152 if (!init_gen_str(&ctx, algname, e, do_param, libctx, app_get0_propq()))
155 if (ctx == NULL)
160 if (pkey_ctrl_string(ctx, p) <= 0) {
181 EVP_PKEY_CTX_set_cb(ctx, genpkey_cb);
182 EVP_PKEY_CTX_set_app_data(ctx, bio_err);
184 pkey = do_param ? app_paramgen(ctx, algname)
185 : app_keygen(ctx, algname, 0, 0 /* not verbose */);
226 EVP_PKEY_CTX_free(ctx);
241 EVP_PKEY_CTX *ctx = NULL;
262 ctx = EVP_PKEY_CTX_new(pkey, e);
264 ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, propq);
265 if (ctx == NULL)
267 if (EVP_PKEY_keygen_init(ctx) <= 0)
270 *pctx = ctx;
276 EVP_PKEY_CTX_free(ctx);
286 EVP_PKEY_CTX *ctx = NULL;
296 ctx = EVP_PKEY_CTX_new_id(pkey_id, e);
298 ctx = EVP_PKEY_CTX_new_from_name(libctx, algname, propq);
300 if (ctx == NULL)
303 if (EVP_PKEY_paramgen_init(ctx) <= 0)
306 if (EVP_PKEY_keygen_init(ctx) <= 0)
310 *pctx = ctx;
316 EVP_PKEY_CTX_free(ctx);
321 static int genpkey_cb(EVP_PKEY_CTX *ctx)
324 BIO *b = EVP_PKEY_CTX_get_app_data(ctx);
329 switch (EVP_PKEY_CTX_get_keygen_info(ctx, 0)) {