Lines Matching refs:pkey_ctx
51 EVP_PKEY_CTX *pkey_ctx = NULL; in generate_dsa_params() local
54 pkey_ctx = EVP_PKEY_CTX_new_from_name(libctx, ALG, PROPQUERY); in generate_dsa_params()
55 if (pkey_ctx == NULL) in generate_dsa_params()
58 if (EVP_PKEY_paramgen_init(pkey_ctx) <= 0) in generate_dsa_params()
61 if (EVP_PKEY_CTX_set_dsa_paramgen_bits(pkey_ctx, NUMBITS) <= 0) in generate_dsa_params()
63 if (EVP_PKEY_paramgen(pkey_ctx, ¶ms) <= 0) in generate_dsa_params()
74 EVP_PKEY_CTX_free(pkey_ctx); in generate_dsa_params()
171 EVP_PKEY_CTX *pkey_ctx = NULL; in demo_sign() local
174 pkey_ctx = EVP_PKEY_CTX_new_from_name(libctx, ALG, PROPQUERY); in demo_sign()
175 if (pkey_ctx == NULL) in demo_sign()
177 if (EVP_PKEY_fromdata_init(pkey_ctx) != 1) in demo_sign()
179 if (EVP_PKEY_fromdata(pkey_ctx, &pkey, EVP_PKEY_KEYPAIR, keypair) != 1) in demo_sign()
220 EVP_PKEY_CTX_free(pkey_ctx); in demo_sign()
234 EVP_PKEY_CTX *pkey_ctx = NULL; in demo_verify() local
237 pkey_ctx = EVP_PKEY_CTX_new_from_name(libctx, ALG, PROPQUERY); in demo_verify()
238 if (pkey_ctx == NULL) in demo_verify()
240 if (EVP_PKEY_fromdata_init(pkey_ctx) != 1) in demo_verify()
242 if (EVP_PKEY_fromdata(pkey_ctx, &pkey, EVP_PKEY_PUBLIC_KEY, public_key) != 1) in demo_verify()
264 EVP_PKEY_CTX_free(pkey_ctx); in demo_verify()