/freebsd/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/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() 523 static int dh_gen_common_set_params(void *genctx, const OSSL_PARAM params[]) in dh_gen_common_set_params() argument 525 struct dh_gen_ctx *gctx = genctx; in dh_gen_common_set_params() 564 static const OSSL_PARAM *dh_gen_settable_params(ossl_unused void *genctx, in dh_gen_settable_params() argument 578 static const OSSL_PARAM *dhx_gen_settable_params(ossl_unused void *genctx, in dhx_gen_settable_params() argument 598 static int dhx_gen_set_params(void *genctx, const OSSL_PARAM params[]) in dhx_gen_set_params() argument 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() 652 static int dh_gen_set_params(void *genctx, const OSSL_PARAM params[]) in dh_gen_set_params() 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() 568 static const OSSL_PARAM *ecx_gen_settable_params(ossl_unused void *genctx, in ecx_gen_settable_params() argument 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() 660 static void *ed25519_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in ed25519_gen() argument 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 [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() 1208 static const OSSL_PARAM *ec_gen_settable_params(ossl_unused void *genctx, in ec_gen_settable_params() argument 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() 1298 static void *sm2_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in sm2_gen() argument [all …]
|
/freebsd/crypto/openssl/test/ |
H A D | tls-provider.c | 347 void *genctx = NULL, *derivectx = NULL; in xor_encapsulate() 364 genctx = xor_gen_init(pxorctx->provctx, OSSL_KEYMGMT_SELECT_KEYPAIR, NULL); in xor_encapsulate() 365 if (genctx == NULL) in xor_encapsulate() 367 ourkey = xor_gen(genctx, NULL, NULL); in xor_encapsulate() 386 xor_gen_cleanup(genctx); in xor_decapsulate() 610 static int xor_gen_set_params(void *genctx, const OSSL_PARAM params[]) in xor_gen_set_params() 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() 639 static void *xor_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg) in xor_gen() 641 struct xor_gen_ctx *gctx = genctx; in xor_gen() 341 void *genctx = NULL, *derivectx = NULL; xor_encapsulate() local 604 xor_gen_set_params(void * genctx,const OSSL_PARAM params[]) xor_gen_set_params() argument 623 xor_gen_settable_params(ossl_unused void * genctx,ossl_unused void * provctx) xor_gen_settable_params() argument 633 xor_gen(void * genctx,OSSL_CALLBACK * osslcb,void * cbarg) xor_gen() argument 732 xor_gen_cleanup(void * genctx) 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 */ 3101 EVP_PKEY_CTX *genctx; in keygen_test_init() 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); 3139 EVP_PKEY_CTX_free(keygen->genctx); in keygen_test_cleanup() 3091 EVP_PKEY_CTX *genctx; /* Keygen context to use */ global() member 3098 EVP_PKEY_CTX *genctx; keygen_test_init() local [all...] |
/freebsd/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() 522 if ((keydata = evp_keymgmt_gen(keymgmt, genctx, cb, cbarg)) == NULL in evp_keymgmt_util_gen() 513 evp_keymgmt_util_gen(EVP_PKEY * target,EVP_KEYMGMT * keymgmt,void * genctx,OSSL_CALLBACK * cb,void * cbarg) evp_keymgmt_util_gen() argument
|
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/crypto/openssl/apps/ |
H A D | req.c | 240 EVP_PKEY_CTX *genctx = NULL; in req_main() local 643 genctx = set_keygen_ctx(keyalg, &keyalgstr, &newkey_len, gen_eng); in req_main() 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() 650 || EVP_PKEY_CTX_is_a(genctx, "DSA"))) { in req_main() 657 && (EVP_PKEY_CTX_is_a(genctx, "RSA") in req_main() 658 || EVP_PKEY_CTX_is_a(genctx, "RSA-PSS"))) in req_main() 665 if (EVP_PKEY_CTX_is_a(genctx, "DSA") in req_main() 677 if (pkey_ctrl_string(genctx, genop in req_main() [all...] |
H A D | speed.c | 1380 EVP_PKEY_CTX *genctx = NULL; in speed_main() 2367 && init_gen_str(&genctx, "RSA", NULL, 0, NULL, NULL) in speed_main() 2368 && EVP_PKEY_CTX_set_rsa_keygen_bits(genctx, rsa_keys[testnum].bits) > 0 in speed_main() 2369 && EVP_PKEY_CTX_set1_rsa_keygen_pubexp(genctx, bn) > 0 in speed_main() 2370 && EVP_PKEY_CTX_set_rsa_keygen_primes(genctx, primes) > 0 in speed_main() 2371 && EVP_PKEY_keygen(genctx, &rsa_key); in speed_main() 2374 EVP_PKEY_CTX_free(genctx); in speed_main() 2375 genctx = NULL; in speed_main() 3320 EVP_PKEY_CTX_free(genctx); in speed_main() 1376 EVP_PKEY_CTX *genctx = NULL; speed_main() local
|
/freebsd/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/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/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))
|