Home
last modified time | relevance | path

Searched refs:genctx (Results 1 – 22 of 22) sorted by relevance

/openssl/demos/pkey/
H A DEVP_PKEY_EC_keygen.c40 EVP_PKEY_CTX *genctx = NULL; in do_ec_keygen() local
44 genctx = EVP_PKEY_CTX_new_from_name(libctx, "EC", propq); in do_ec_keygen()
45 if (genctx == NULL) { in do_ec_keygen()
50 if (EVP_PKEY_keygen_init(genctx) <= 0) { in do_ec_keygen()
64 if (!EVP_PKEY_CTX_set_params(genctx, params)) { in do_ec_keygen()
70 if (EVP_PKEY_generate(genctx, &key) <= 0) { in do_ec_keygen()
75 EVP_PKEY_CTX_free(genctx); in do_ec_keygen()
H A DEVP_PKEY_RSA_keygen.c37 EVP_PKEY_CTX *genctx = NULL; in generate_rsa_key_long() local
42 genctx = EVP_PKEY_CTX_new_from_name(libctx, "RSA", propq); in generate_rsa_key_long()
43 if (genctx == NULL) { in generate_rsa_key_long()
49 if (EVP_PKEY_keygen_init(genctx) <= 0) { in generate_rsa_key_long()
58 if (EVP_PKEY_CTX_set_rsa_keygen_bits(genctx, bits) <= 0) { in generate_rsa_key_long()
71 if (EVP_PKEY_CTX_set_rsa_keygen_primes(genctx, primes) <= 0) { in generate_rsa_key_long()
87 if (EVP_PKEY_generate(genctx, &pkey) <= 0) { in generate_rsa_key_long()
95 EVP_PKEY_CTX_free(genctx); in generate_rsa_key_long()
/openssl/test/
H A Devp_pkey_dhkem_test.c121 EVP_PKEY_CTX *genctx = NULL; in test_ec_dhkem_derivekey_fail() local
133 || !TEST_int_eq(EVP_PKEY_keygen_init(genctx), 1) in test_ec_dhkem_derivekey_fail()
135 || !TEST_int_eq(EVP_PKEY_generate(genctx, &pkey),0)) in test_ec_dhkem_derivekey_fail()
144 if (!TEST_int_eq(EVP_PKEY_keygen_init(genctx), 1) in test_ec_dhkem_derivekey_fail()
163 EVP_PKEY_CTX_free(genctx); in test_ec_dhkem_derivekey_fail()
470 EVP_PKEY_CTX *genctx = NULL; in test_ec_dhkem_derivekey() local
484 && TEST_int_eq(EVP_PKEY_keygen_init(genctx), 1) in test_ec_dhkem_derivekey()
499 EVP_PKEY_CTX_free(genctx); in test_ec_dhkem_derivekey()
710 EVP_PKEY_CTX *genctx; in test_ecx_dhkem_derivekey() local
737 && TEST_int_eq(EVP_PKEY_keygen_init(genctx), 1) in test_ecx_dhkem_derivekey()
[all …]
H A Dfake_rsaprov.c248 static void *fake_rsa_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in fake_rsa_gen() argument
250 unsigned char *gctx = genctx; in fake_rsa_gen()
265 static void fake_rsa_gen_cleanup(void *genctx) in fake_rsa_gen_cleanup() argument
267 OPENSSL_free(genctx); in fake_rsa_gen_cleanup()
H A Dtls-provider.c576 void *genctx = NULL, *derivectx = NULL; in xor_encapsulate() local
594 if (genctx == NULL) in xor_encapsulate()
596 ourkey = xor_gen(genctx, NULL, NULL); in xor_encapsulate()
615 xor_gen_cleanup(genctx); in xor_encapsulate()
945 static int xor_gen_set_params(void *genctx, const OSSL_PARAM params[]) in xor_gen_set_params() argument
947 struct xor_gen_ctx *gctx = genctx; in xor_gen_set_params()
976 struct xor_gen_ctx *gctx = genctx; in xor_gen()
1089 static void xor_gen_cleanup(void *genctx) in xor_gen_cleanup() argument
1091 OPENSSL_free(genctx); in xor_gen_cleanup()
1121 XORKEY *k = xor_gen(genctx, osslcb, cbarg); in xor_xorhmacsig_gen()
[all …]
H A Devp_test.c1738 EVP_PKEY_CTX *pctx = NULL, *genctx = NULL; in mac_test_run_pkey() local
1850 EVP_PKEY_CTX_free(genctx); in mac_test_run_pkey()
4102 EVP_PKEY_CTX *genctx = NULL; /* Keygen context to use */ in keygen_test_run() local
4114 if (!TEST_ptr(genctx = EVP_PKEY_CTX_new_from_pkey(libctx, keyparams, in keygen_test_run()
4119 if (!TEST_ptr(genctx = EVP_PKEY_CTX_new_from_name(libctx, keygen->alg, in keygen_test_run()
4124 if (EVP_PKEY_keygen_init(genctx) <= 0) { in keygen_test_run()
4131 EVP_PKEY_CTX_settable_params(genctx), in keygen_test_run()
4134 if (!EVP_PKEY_CTX_set_params(genctx, params)) { in keygen_test_run()
4142 if (EVP_PKEY_keygen(genctx, &pkey) <= 0) { in keygen_test_run()
4146 if (!pkey_check_fips_approved(genctx, t)) { in keygen_test_run()
[all …]
/openssl/providers/implementations/keymgmt/
H A Dmac_legacy_kmgmt.c414 static int mac_gen_set_params(void *genctx, const OSSL_PARAM params[]) in mac_gen_set_params() argument
416 struct mac_gen_ctx *gctx = genctx; in mac_gen_set_params()
438 static int cmac_gen_set_params(void *genctx, const OSSL_PARAM params[]) in cmac_gen_set_params() argument
440 struct mac_gen_ctx *gctx = genctx; in cmac_gen_set_params()
442 if (!mac_gen_set_params(genctx, params)) in cmac_gen_set_params()
454 static const OSSL_PARAM *mac_gen_settable_params(ossl_unused void *genctx, in mac_gen_settable_params() argument
464 static const OSSL_PARAM *cmac_gen_settable_params(ossl_unused void *genctx, in cmac_gen_settable_params() argument
475 static void *mac_gen(void *genctx, OSSL_CALLBACK *cb, void *cbarg) in mac_gen() argument
477 struct mac_gen_ctx *gctx = genctx; in mac_gen()
518 static void mac_gen_cleanup(void *genctx) in mac_gen_cleanup() argument
[all …]
H A Ddh_kmgmt.c500 static int dh_gen_set_template(void *genctx, void *templ) in dh_gen_set_template() argument
502 struct dh_gen_ctx *gctx = genctx; in dh_gen_set_template()
528 struct dh_gen_ctx *gctx = genctx; in dh_gen_common_set_params()
606 struct dh_gen_ctx *gctx = genctx; in dhx_gen_set_params()
609 if (!dh_gen_common_set_params(genctx, params)) in dhx_gen_set_params()
660 struct dh_gen_ctx *gctx = genctx; in dh_gen_set_params()
663 if (!dh_gen_common_set_params(genctx, params)) in dh_gen_set_params()
699 struct dh_gen_ctx *gctx = genctx; in dh_gen()
766 BN_GENCB_set(gencb, dh_gencb, genctx); in dh_gen()
809 static void dh_gen_cleanup(void *genctx) in dh_gen_cleanup() argument
[all …]
H A Ddsa_kmgmt.c439 static int dsa_gen_set_template(void *genctx, void *templ) in dsa_gen_set_template() argument
441 struct dsa_gen_ctx *gctx = genctx; in dsa_gen_set_template()
465 static int dsa_gen_set_params(void *genctx, const OSSL_PARAM params[]) in dsa_gen_set_params() argument
467 struct dsa_gen_ctx *gctx = genctx; in dsa_gen_set_params()
559 static int dsa_gen_get_params(void *genctx, OSSL_PARAM *params) in dsa_gen_get_params() argument
561 struct dsa_gen_ctx *gctx = genctx; in dsa_gen_get_params()
594 static void *dsa_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in dsa_gen() argument
596 struct dsa_gen_ctx *gctx = genctx; in dsa_gen()
641 BN_GENCB_set(gencb, dsa_gencb, genctx); in dsa_gen()
689 static void dsa_gen_cleanup(void *genctx) in dsa_gen_cleanup() argument
[all …]
H A Drsa_kmgmt.c503 static int rsa_gen_set_params(void *genctx, const OSSL_PARAM params[]) in rsa_gen_set_params() argument
505 struct rsa_gen_ctx *gctx = genctx; in rsa_gen_set_params()
554 static const OSSL_PARAM *rsa_gen_settable_params(ossl_unused void *genctx, in rsa_gen_settable_params() argument
565 static const OSSL_PARAM *rsapss_gen_settable_params(ossl_unused void *genctx, in rsapss_gen_settable_params() argument
577 static void *rsa_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in rsa_gen() argument
579 struct rsa_gen_ctx *gctx = genctx; in rsa_gen()
610 BN_GENCB_set(gencb, rsa_gencb, genctx); in rsa_gen()
639 static void rsa_gen_cleanup(void *genctx) in rsa_gen_cleanup() argument
641 struct rsa_gen_ctx *gctx = genctx; in rsa_gen_cleanup()
H A Dec_kmgmt.c1041 static int ec_gen_set_group(void *genctx, const EC_GROUP *src) in ec_gen_set_group() argument
1043 struct ec_gen_ctx *gctx = genctx; in ec_gen_set_group()
1056 static int ec_gen_set_template(void *genctx, void *templ) in ec_gen_set_template() argument
1058 struct ec_gen_ctx *gctx = genctx; in ec_gen_set_template()
1109 struct ec_gen_ctx *gctx = genctx; in ec_gen_set_params()
1254 static int ec_gen_get_params(void *genctx, OSSL_PARAM *params) in ec_gen_get_params() argument
1256 struct ec_gen_ctx *gctx = genctx; in ec_gen_get_params()
1281 struct ec_gen_ctx *gctx = genctx; in ec_gen()
1355 struct ec_gen_ctx *gctx = genctx; in sm2_gen()
1400 static void ec_gen_cleanup(void *genctx) in ec_gen_cleanup() argument
[all …]
H A Decx_kmgmt.c543 static int ecx_gen_set_params(void *genctx, const OSSL_PARAM params[]) in ecx_gen_set_params() argument
545 struct ecx_gen_ctx *gctx = genctx; in ecx_gen_set_params()
747 static void *x25519_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in x25519_gen() argument
749 struct ecx_gen_ctx *gctx = genctx; in x25519_gen()
761 static void *x448_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in x448_gen() argument
763 struct ecx_gen_ctx *gctx = genctx; in x448_gen()
778 struct ecx_gen_ctx *gctx = genctx; in ed25519_gen()
809 static void *ed448_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in ed448_gen() argument
812 struct ecx_gen_ctx *gctx = genctx; in ed448_gen()
842 static void ecx_gen_cleanup(void *genctx) in ecx_gen_cleanup() argument
[all …]
/openssl/crypto/evp/
H A Dkeymgmt_meth.c393 int evp_keymgmt_gen_set_template(const EVP_KEYMGMT *keymgmt, void *genctx, in evp_keymgmt_gen_set_template() argument
404 return keymgmt->gen_set_template(genctx, templ); in evp_keymgmt_gen_set_template()
407 int evp_keymgmt_gen_set_params(const EVP_KEYMGMT *keymgmt, void *genctx, in evp_keymgmt_gen_set_params() argument
412 return keymgmt->gen_set_params(genctx, params); in evp_keymgmt_gen_set_params()
424 int evp_keymgmt_gen_get_params(const EVP_KEYMGMT *keymgmt, void *genctx, in evp_keymgmt_gen_get_params() argument
429 return keymgmt->gen_get_params(genctx, params); in evp_keymgmt_gen_get_params()
441 void *evp_keymgmt_gen(const EVP_KEYMGMT *keymgmt, void *genctx, in evp_keymgmt_gen() argument
446 return keymgmt->gen(genctx, cb, cbarg); in evp_keymgmt_gen()
449 void evp_keymgmt_gen_cleanup(const EVP_KEYMGMT *keymgmt, void *genctx) in evp_keymgmt_gen_cleanup() argument
452 keymgmt->gen_cleanup(genctx); in evp_keymgmt_gen_cleanup()
H A Dpmeth_gn.c40 ctx->op.keymgmt.genctx = in gen_init()
45 ctx->op.keymgmt.genctx = in gen_init()
51 if (ctx->op.keymgmt.genctx == NULL) in gen_init()
152 if (ctx->op.keymgmt.genctx == NULL) in EVP_PKEY_generate()
181 ctx->op.keymgmt.genctx, keydata); in EVP_PKEY_generate()
189 && (evp_keymgmt_util_gen(*ppkey, ctx->keymgmt, ctx->op.keymgmt.genctx, in EVP_PKEY_generate()
H A Dkeymgmt_lib.c514 void *genctx, OSSL_CALLBACK *cb, void *cbarg) in evp_keymgmt_util_gen() argument
518 if ((keydata = evp_keymgmt_gen(keymgmt, genctx, cb, cbarg)) == NULL in evp_keymgmt_util_gen()
H A Dpmeth_lib.c150 && ctx->op.keymgmt.genctx != NULL) in evp_pkey_ctx_state()
382 if (ctx->op.keymgmt.genctx != NULL && ctx->keymgmt != NULL) in evp_pkey_ctx_free_old_ops()
383 evp_keymgmt_gen_cleanup(ctx->keymgmt, ctx->op.keymgmt.genctx); in evp_pkey_ctx_free_old_ops()
689 evp_keymgmt_gen_set_params(ctx->keymgmt, ctx->op.keymgmt.genctx, in EVP_PKEY_CTX_set_params()
739 evp_keymgmt_gen_get_params(ctx->keymgmt, ctx->op.keymgmt.genctx, in EVP_PKEY_CTX_get_params()
790 return ctx->keymgmt->gen_gettable_params(ctx->op.keymgmt.genctx, in EVP_PKEY_CTX_gettable_params()
827 return ctx->keymgmt->gen_settable_params(ctx->op.keymgmt.genctx, in EVP_PKEY_CTX_settable_params()
1249 return evp_pkey_ctx_set1_octet_string(ctx, ctx->op.keymgmt.genctx == NULL, in EVP_PKEY_CTX_set_mac_key()
H A Dctrl_params_translate.c432 && ctx->pctx->op.keymgmt.genctx == NULL) in default_fixup_args()
434 && ctx->pctx->op.keymgmt.genctx == NULL)) { in default_fixup_args()
/openssl/apps/
H A Dreq.c248 EVP_PKEY_CTX *genctx = NULL; in req_main() local
637 if (genctx == NULL) in req_main()
641 && (EVP_PKEY_CTX_is_a(genctx, "RSA") in req_main()
642 || EVP_PKEY_CTX_is_a(genctx, "RSA-PSS") in req_main()
650 && (EVP_PKEY_CTX_is_a(genctx, "RSA") in req_main()
658 if (EVP_PKEY_CTX_is_a(genctx, "DSA") in req_main()
677 EVP_PKEY_CTX_set_app_data(genctx, bio_err); in req_main()
679 EVP_PKEY_CTX_set_cb(genctx, progress_cb); in req_main()
685 EVP_PKEY_CTX_free(genctx); in req_main()
686 genctx = NULL; in req_main()
[all …]
H A Dspeed.c1799 EVP_PKEY_CTX *genctx = NULL; in speed_main() local
2992 && init_gen_str(&genctx, "RSA", NULL, 0, NULL, NULL) in speed_main()
2993 && EVP_PKEY_CTX_set_rsa_keygen_bits(genctx, rsa_keys[testnum].bits) > 0 in speed_main()
2994 && EVP_PKEY_CTX_set1_rsa_keygen_pubexp(genctx, bn) > 0 in speed_main()
2995 && EVP_PKEY_CTX_set_rsa_keygen_primes(genctx, primes) > 0 in speed_main()
2996 && EVP_PKEY_keygen(genctx, &rsa_key); in speed_main()
2999 EVP_PKEY_CTX_free(genctx); in speed_main()
3000 genctx = NULL; in speed_main()
4422 EVP_PKEY_CTX_free(genctx); in speed_main()
/openssl/include/crypto/
H A Devp.h56 void *genctx; member
799 void *genctx, OSSL_CALLBACK *cb, void *cbarg);
817 int evp_keymgmt_gen_set_template(const EVP_KEYMGMT *keymgmt, void *genctx,
819 int evp_keymgmt_gen_set_params(const EVP_KEYMGMT *keymgmt, void *genctx,
822 void *genctx, OSSL_PARAM params[]);
823 void *evp_keymgmt_gen(const EVP_KEYMGMT *keymgmt, void *genctx,
825 void evp_keymgmt_gen_cleanup(const EVP_KEYMGMT *keymgmt, void *genctx);
/openssl/doc/man7/
H A Dprovider-keymgmt.pod24 int OSSL_FUNC_keymgmt_gen_set_template(void *genctx, void *template);
25 int OSSL_FUNC_keymgmt_gen_get_params(void *genctx, OSSL_PARAM params[]);
26 int OSSL_FUNC_keymgmt_gen_set_params(void *genctx, const OSSL_PARAM params[]);
27 const OSSL_PARAM *OSSL_FUNC_keymgmt_gen_gettable_params(void *genctx,
29 const OSSL_PARAM *OSSL_FUNC_keymgmt_gen_settable_params(void *genctx,
31 void *OSSL_FUNC_keymgmt_gen(void *genctx, OSSL_CALLBACK *cb, void *cbarg);
32 void OSSL_FUNC_keymgmt_gen_cleanup(void *genctx);
239 I<genctx>. The I<template> is assumed to be a key object constructed
246 I<params> in the key object generation context I<genctx>.
253 I<params> in the key object generation context I<genctx>.
[all …]
/openssl/include/openssl/
H A Dcore_dispatch.h601 (void *genctx, void *templ))
603 (void *genctx, const OSSL_PARAM params[]))
606 (void *genctx, void *provctx))
608 (void *genctx, OSSL_PARAM params[]))
610 (void *genctx, void *provctx))
612 (void *genctx, OSSL_CALLBACK *cb, void *cbarg))
613 OSSL_CORE_MAKE_FUNC(void, keymgmt_gen_cleanup, (void *genctx))

Completed in 164 milliseconds