Lines Matching defs:ctx
34 static int gendh_cb(EVP_PKEY_CTX *ctx);
83 EVP_PKEY_CTX *ctx = NULL;
188 ctx = EVP_PKEY_CTX_new_from_name(app_get0_libctx(), alg, app_get0_propq());
189 if (ctx == NULL) {
195 EVP_PKEY_CTX_set_cb(ctx, gendh_cb);
196 EVP_PKEY_CTX_set_app_data(ctx, bio_err);
201 if (EVP_PKEY_paramgen_init(ctx) <= 0) {
209 if (EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, num) <= 0) {
214 if (EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, num) <= 0) {
218 if (EVP_PKEY_CTX_set_dh_paramgen_generator(ctx, g) <= 0) {
224 tmppkey = app_paramgen(ctx, alg);
227 EVP_PKEY_CTX_free(ctx);
228 ctx = NULL;
318 ctx = EVP_PKEY_CTX_new_from_pkey(app_get0_libctx(), pkey, app_get0_propq());
319 if (ctx == NULL) {
323 if (EVP_PKEY_param_check(ctx) <= 0) {
353 EVP_PKEY_CTX_free(ctx);
368 EVP_PKEY_CTX *ctx = NULL;
390 ctx = EVP_PKEY_CTX_new_from_name(app_get0_libctx(), "DHX", app_get0_propq());
391 if (ctx == NULL
392 || EVP_PKEY_fromdata_init(ctx) <= 0
393 || EVP_PKEY_fromdata(ctx, &pkey, EVP_PKEY_KEY_PARAMETERS, params) <= 0) {
399 EVP_PKEY_CTX_free(ctx);
408 static int gendh_cb(EVP_PKEY_CTX *ctx)
410 int p = EVP_PKEY_CTX_get_keygen_info(ctx, 0);
411 BIO *b = EVP_PKEY_CTX_get_app_data(ctx);