| /freebsd-14.2/crypto/openssl/demos/pkey/ |
| H A D | EVP_PKEY_EC_keygen.c | 40 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 D | EVP_PKEY_RSA_keygen.c | 37 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()
|
| /freebsd-14.2/crypto/openssl/providers/implementations/keymgmt/ |
| H A D | mac_legacy_kmgmt.c | 420 static int mac_gen_set_params(void *genctx, const OSSL_PARAM params[]) in mac_gen_set_params() argument 422 struct mac_gen_ctx *gctx = genctx; in mac_gen_set_params() 446 static int cmac_gen_set_params(void *genctx, const OSSL_PARAM params[]) in cmac_gen_set_params() argument 448 struct mac_gen_ctx *gctx = genctx; in cmac_gen_set_params() 450 if (!mac_gen_set_params(genctx, params)) in cmac_gen_set_params() 462 static const OSSL_PARAM *mac_gen_settable_params(ossl_unused void *genctx, in mac_gen_settable_params() argument 472 static const OSSL_PARAM *cmac_gen_settable_params(ossl_unused void *genctx, in cmac_gen_settable_params() argument 483 static void *mac_gen(void *genctx, OSSL_CALLBACK *cb, void *cbarg) in mac_gen() argument 485 struct mac_gen_ctx *gctx = genctx; in mac_gen() 526 static void mac_gen_cleanup(void *genctx) in mac_gen_cleanup() argument [all …]
|
| H A D | dh_kmgmt.c | 497 static int dh_gen_set_template(void *genctx, void *templ) in dh_gen_set_template() argument 499 struct dh_gen_ctx *gctx = genctx; in dh_gen_set_template() 525 struct dh_gen_ctx *gctx = genctx; in dh_gen_common_set_params() 600 struct dh_gen_ctx *gctx = genctx; in dhx_gen_set_params() 603 if (!dh_gen_common_set_params(genctx, params)) in dhx_gen_set_params() 654 struct dh_gen_ctx *gctx = genctx; in dh_gen_set_params() 657 if (!dh_gen_common_set_params(genctx, params)) in dh_gen_set_params() 693 struct dh_gen_ctx *gctx = genctx; in dh_gen() 749 BN_GENCB_set(gencb, dh_gencb, genctx); in dh_gen() 792 static void dh_gen_cleanup(void *genctx) in dh_gen_cleanup() argument [all …]
|
| H A D | ecx_kmgmt.c | 520 static int ecx_gen_set_params(void *genctx, const OSSL_PARAM params[]) in ecx_gen_set_params() argument 522 struct ecx_gen_ctx *gctx = genctx; in ecx_gen_set_params() 632 static void *x25519_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in x25519_gen() argument 634 struct ecx_gen_ctx *gctx = genctx; in x25519_gen() 646 static void *x448_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in x448_gen() argument 648 struct ecx_gen_ctx *gctx = genctx; in x448_gen() 662 struct ecx_gen_ctx *gctx = genctx; in ed25519_gen() 677 static void *ed448_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in ed448_gen() argument 679 struct ecx_gen_ctx *gctx = genctx; in ed448_gen() 693 static void ecx_gen_cleanup(void *genctx) in ecx_gen_cleanup() argument [all …]
|
| H A D | dsa_kmgmt.c | 435 static int dsa_gen_set_template(void *genctx, void *templ) in dsa_gen_set_template() argument 437 struct dsa_gen_ctx *gctx = genctx; in dsa_gen_set_template() 461 static int dsa_gen_set_params(void *genctx, const OSSL_PARAM params[]) in dsa_gen_set_params() argument 463 struct dsa_gen_ctx *gctx = genctx; in dsa_gen_set_params() 524 static const OSSL_PARAM *dsa_gen_settable_params(ossl_unused void *genctx, in dsa_gen_settable_params() argument 553 static void *dsa_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in dsa_gen() argument 555 struct dsa_gen_ctx *gctx = genctx; in dsa_gen() 575 BN_GENCB_set(gencb, dsa_gencb, genctx); in dsa_gen() 624 static void dsa_gen_cleanup(void *genctx) in dsa_gen_cleanup() argument 626 struct dsa_gen_ctx *gctx = genctx; in dsa_gen_cleanup()
|
| H A D | rsa_kmgmt.c | 503 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 D | ec_kmgmt.c | 1035 static int ec_gen_set_group(void *genctx, const EC_GROUP *src) in ec_gen_set_group() argument 1037 struct ec_gen_ctx *gctx = genctx; in ec_gen_set_group() 1050 static int ec_gen_set_template(void *genctx, void *templ) in ec_gen_set_template() argument 1052 struct ec_gen_ctx *gctx = genctx; in ec_gen_set_template() 1100 static int ec_gen_set_params(void *genctx, const OSSL_PARAM params[]) in ec_gen_set_params() argument 1103 struct ec_gen_ctx *gctx = genctx; in ec_gen_set_params() 1242 static void *ec_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in ec_gen() argument 1244 struct ec_gen_ctx *gctx = genctx; in ec_gen() 1300 struct ec_gen_ctx *gctx = genctx; in sm2_gen() 1345 static void ec_gen_cleanup(void *genctx) in ec_gen_cleanup() argument [all …]
|
| /freebsd-14.2/crypto/openssl/test/ |
| H A D | tls-provider.c | 347 void *genctx = NULL, *derivectx = NULL; in xor_encapsulate() local 365 if (genctx == NULL) in xor_encapsulate() 367 ourkey = xor_gen(genctx, NULL, NULL); in xor_encapsulate() 386 xor_gen_cleanup(genctx); in xor_encapsulate() 610 static int xor_gen_set_params(void *genctx, const OSSL_PARAM params[]) in xor_gen_set_params() argument 612 struct xor_gen_ctx *gctx = genctx; in xor_gen_set_params() 629 static const OSSL_PARAM *xor_gen_settable_params(ossl_unused void *genctx, in xor_gen_settable_params() argument 639 static void *xor_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in xor_gen() argument 641 struct xor_gen_ctx *gctx = genctx; in xor_gen() 738 static void xor_gen_cleanup(void *genctx) in xor_gen_cleanup() argument [all …]
|
| H A D | fake_rsaprov.c | 242 static void *fake_rsa_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in fake_rsa_gen() argument 244 unsigned char *gctx = genctx; in fake_rsa_gen() 259 static void fake_rsa_gen_cleanup(void *genctx) in fake_rsa_gen_cleanup() argument 261 OPENSSL_free(genctx); in fake_rsa_gen_cleanup()
|
| H A D | evp_test.c | 1312 EVP_PKEY_CTX *pctx = NULL, *genctx = NULL; in mac_test_run_pkey() local 1412 EVP_PKEY_CTX_free(genctx); in mac_test_run_pkey() 3094 EVP_PKEY_CTX *genctx; /* Keygen context to use */ member 3101 EVP_PKEY_CTX *genctx; in keygen_test_init() local 3114 if (!TEST_ptr(genctx = EVP_PKEY_CTX_new_from_name(libctx, alg, NULL))) in keygen_test_init() 3117 if (EVP_PKEY_keygen_init(genctx) <= 0) { in keygen_test_init() 3124 data->genctx = genctx; in keygen_test_init() 3131 EVP_PKEY_CTX_free(genctx); in keygen_test_init() 3139 EVP_PKEY_CTX_free(keygen->genctx); in keygen_test_cleanup() 3153 return pkey_test_ctrl(t, keygen->genctx, value); in keygen_test_parse() [all …]
|
| /freebsd-14.2/crypto/openssl/crypto/evp/ |
| H A D | keymgmt_meth.c | 340 int evp_keymgmt_gen_set_template(const EVP_KEYMGMT *keymgmt, void *genctx, in evp_keymgmt_gen_set_template() argument 351 return keymgmt->gen_set_template(genctx, template); in evp_keymgmt_gen_set_template() 354 int evp_keymgmt_gen_set_params(const EVP_KEYMGMT *keymgmt, void *genctx, in evp_keymgmt_gen_set_params() argument 359 return keymgmt->gen_set_params(genctx, params); in evp_keymgmt_gen_set_params() 371 void *evp_keymgmt_gen(const EVP_KEYMGMT *keymgmt, void *genctx, in evp_keymgmt_gen() argument 376 return keymgmt->gen(genctx, cb, cbarg); in evp_keymgmt_gen() 379 void evp_keymgmt_gen_cleanup(const EVP_KEYMGMT *keymgmt, void *genctx) in evp_keymgmt_gen_cleanup() argument 382 keymgmt->gen_cleanup(genctx); in evp_keymgmt_gen_cleanup()
|
| H A D | pmeth_gn.c | 40 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 D | keymgmt_lib.c | 518 void *genctx, OSSL_CALLBACK *cb, void *cbarg) in evp_keymgmt_util_gen() argument 522 if ((keydata = evp_keymgmt_gen(keymgmt, genctx, cb, cbarg)) == NULL in evp_keymgmt_util_gen()
|
| H A D | pmeth_lib.c | 172 && ctx->op.keymgmt.genctx != NULL) in evp_pkey_ctx_state() 406 if (ctx->op.keymgmt.genctx != NULL && ctx->keymgmt != NULL) in evp_pkey_ctx_free_old_ops() 407 evp_keymgmt_gen_cleanup(ctx->keymgmt, ctx->op.keymgmt.genctx); in evp_pkey_ctx_free_old_ops() 715 evp_keymgmt_gen_set_params(ctx->keymgmt, ctx->op.keymgmt.genctx, in EVP_PKEY_CTX_set_params() 840 return ctx->keymgmt->gen_settable_params(ctx->op.keymgmt.genctx, in EVP_PKEY_CTX_settable_params() 1262 return evp_pkey_ctx_set1_octet_string(ctx, ctx->op.keymgmt.genctx == NULL, in EVP_PKEY_CTX_set_mac_key()
|
| H A D | ctrl_params_translate.c | 432 && ctx->pctx->op.keymgmt.genctx == NULL) in default_fixup_args() 434 && ctx->pctx->op.keymgmt.genctx == NULL)) { in default_fixup_args()
|
| /freebsd-14.2/crypto/openssl/apps/ |
| H A D | req.c | 240 EVP_PKEY_CTX *genctx = NULL; in req_main() local 644 if (genctx == NULL) in req_main() 648 && (EVP_PKEY_CTX_is_a(genctx, "RSA") in req_main() 649 || EVP_PKEY_CTX_is_a(genctx, "RSA-PSS") in req_main() 657 && (EVP_PKEY_CTX_is_a(genctx, "RSA") in req_main() 665 if (EVP_PKEY_CTX_is_a(genctx, "DSA") in req_main() 684 EVP_PKEY_CTX_set_cb(genctx, genpkey_cb); in req_main() 685 EVP_PKEY_CTX_set_app_data(genctx, bio_err); in req_main() 691 EVP_PKEY_CTX_free(genctx); in req_main() 692 genctx = NULL; in req_main() [all …]
|
| H A D | speed.c | 1470 EVP_PKEY_CTX *genctx = NULL; in speed_main() local 2581 && init_gen_str(&genctx, "RSA", NULL, 0, NULL, NULL) in speed_main() 2582 && EVP_PKEY_CTX_set_rsa_keygen_bits(genctx, rsa_keys[testnum].bits) > 0 in speed_main() 2583 && EVP_PKEY_CTX_set1_rsa_keygen_pubexp(genctx, bn) > 0 in speed_main() 2584 && EVP_PKEY_CTX_set_rsa_keygen_primes(genctx, primes) > 0 in speed_main() 2585 && EVP_PKEY_keygen(genctx, &rsa_key); in speed_main() 2588 EVP_PKEY_CTX_free(genctx); in speed_main() 2589 genctx = NULL; in speed_main() 3534 EVP_PKEY_CTX_free(genctx); in speed_main()
|
| /freebsd-14.2/crypto/openssl/include/crypto/ |
| H A D | evp.h | 46 void *genctx; member 797 void *genctx, OSSL_CALLBACK *cb, void *cbarg); 815 int evp_keymgmt_gen_set_template(const EVP_KEYMGMT *keymgmt, void *genctx, 817 int evp_keymgmt_gen_set_params(const EVP_KEYMGMT *keymgmt, void *genctx, 819 void *evp_keymgmt_gen(const EVP_KEYMGMT *keymgmt, void *genctx, 821 void evp_keymgmt_gen_cleanup(const EVP_KEYMGMT *keymgmt, void *genctx);
|
| /freebsd-14.2/crypto/openssl/doc/man7/ |
| H A D | provider-keymgmt.pod | 24 int OSSL_FUNC_keymgmt_gen_set_template(void *genctx, void *template); 25 int OSSL_FUNC_keymgmt_gen_set_params(void *genctx, const OSSL_PARAM params[]); 26 const OSSL_PARAM *OSSL_FUNC_keymgmt_gen_settable_params(void *genctx, 28 void *OSSL_FUNC_keymgmt_gen(void *genctx, OSSL_CALLBACK *cb, void *cbarg); 29 void OSSL_FUNC_keymgmt_gen_cleanup(void *genctx); 229 I<genctx>. The I<template> is assumed to be a key object constructed 236 I<params> in the key object generation context I<genctx>. 248 generation context I<genctx>
|
| /freebsd-14.2/crypto/openssl/include/openssl/ |
| H A D | core_dispatch.h | 573 (void *genctx, void *templ)) 575 (void *genctx, const OSSL_PARAM params[])) 578 (void *genctx, void *provctx)) 580 (void *genctx, OSSL_CALLBACK *cb, void *cbarg)) 581 OSSL_CORE_MAKE_FUNC(void, keymgmt_gen_cleanup, (void *genctx))
|