Lines Matching refs:pkey
90 EVP_PKEY *pkey = NULL; in generate_dsa_key() local
99 if (EVP_PKEY_keygen(ctx, &pkey) <= 0) in generate_dsa_key()
101 if (pkey == NULL) in generate_dsa_key()
107 EVP_PKEY_free(pkey); in generate_dsa_key()
108 pkey = NULL; in generate_dsa_key()
111 *p_pkey = pkey; in generate_dsa_key()
113 EVP_PKEY_print_public_fp(stdout, pkey, 4, NULL); in generate_dsa_key()
115 EVP_PKEY_print_private_fp(stdout, pkey, 4, NULL); in generate_dsa_key()
117 EVP_PKEY_print_params_fp(stdout, pkey, 4, NULL); in generate_dsa_key()
123 static int extract_public_key(const EVP_PKEY *pkey, in extract_public_key() argument
129 if (EVP_PKEY_todata(pkey, EVP_PKEY_PUBLIC_KEY, &public_key) != 1) in extract_public_key()
143 static int extract_keypair(const EVP_PKEY *pkey, in extract_keypair() argument
149 if (EVP_PKEY_todata(pkey, EVP_PKEY_KEYPAIR, &keypair) != 1) in extract_keypair()
172 EVP_PKEY *pkey = NULL; in demo_sign() local
179 if (EVP_PKEY_fromdata(pkey_ctx, &pkey, EVP_PKEY_KEYPAIR, keypair) != 1) in demo_sign()
186 if (EVP_DigestSignInit_ex(ctx, NULL, DIGEST, libctx, NULL, pkey, NULL) != 1) in demo_sign()
219 EVP_PKEY_free(pkey); in demo_sign()
235 EVP_PKEY *pkey = NULL; in demo_verify() local
242 if (EVP_PKEY_fromdata(pkey_ctx, &pkey, EVP_PKEY_PUBLIC_KEY, public_key) != 1) in demo_verify()
249 if (EVP_DigestVerifyInit_ex(ctx, NULL, DIGEST, libctx, NULL, pkey, NULL) != 1) in demo_verify()
263 EVP_PKEY_free(pkey); in demo_verify()
274 EVP_PKEY *pkey = NULL; in main() local
287 if (generate_dsa_key(libctx, params, &pkey) != 1) in main()
290 if (extract_public_key(pkey, &public_key) != 1) in main()
293 if (extract_keypair(pkey, &keypair) != 1) in main()
311 EVP_PKEY_free(pkey); in main()