Lines Matching refs:ctx
40 static int evp_pkey_ctx_store_cached_data(EVP_PKEY_CTX *ctx,
44 static void evp_pkey_ctx_free_cached_data(EVP_PKEY_CTX *ctx,
46 static void evp_pkey_ctx_free_all_cached_data(EVP_PKEY_CTX *ctx);
138 int evp_pkey_ctx_state(const EVP_PKEY_CTX *ctx) in evp_pkey_ctx_state() argument
140 if (ctx->operation == EVP_PKEY_OP_UNDEFINED) in evp_pkey_ctx_state()
143 if ((EVP_PKEY_CTX_IS_DERIVE_OP(ctx) in evp_pkey_ctx_state()
144 && ctx->op.kex.algctx != NULL) in evp_pkey_ctx_state()
145 || (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx) in evp_pkey_ctx_state()
146 && ctx->op.sig.algctx != NULL) in evp_pkey_ctx_state()
147 || (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx) in evp_pkey_ctx_state()
148 && ctx->op.ciph.algctx != NULL) in evp_pkey_ctx_state()
149 || (EVP_PKEY_CTX_IS_GEN_OP(ctx) in evp_pkey_ctx_state()
150 && ctx->op.keymgmt.genctx != NULL) in evp_pkey_ctx_state()
151 || (EVP_PKEY_CTX_IS_KEM_OP(ctx) in evp_pkey_ctx_state()
152 && ctx->op.encap.algctx != NULL)) in evp_pkey_ctx_state()
354 void evp_pkey_ctx_free_old_ops(EVP_PKEY_CTX *ctx) in evp_pkey_ctx_free_old_ops() argument
356 if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)) { in evp_pkey_ctx_free_old_ops()
357 if (ctx->op.sig.algctx != NULL && ctx->op.sig.signature != NULL) in evp_pkey_ctx_free_old_ops()
358 ctx->op.sig.signature->freectx(ctx->op.sig.algctx); in evp_pkey_ctx_free_old_ops()
359 EVP_SIGNATURE_free(ctx->op.sig.signature); in evp_pkey_ctx_free_old_ops()
360 ctx->op.sig.algctx = NULL; in evp_pkey_ctx_free_old_ops()
361 ctx->op.sig.signature = NULL; in evp_pkey_ctx_free_old_ops()
362 } else if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx)) { in evp_pkey_ctx_free_old_ops()
363 if (ctx->op.kex.algctx != NULL && ctx->op.kex.exchange != NULL) in evp_pkey_ctx_free_old_ops()
364 ctx->op.kex.exchange->freectx(ctx->op.kex.algctx); in evp_pkey_ctx_free_old_ops()
365 EVP_KEYEXCH_free(ctx->op.kex.exchange); in evp_pkey_ctx_free_old_ops()
366 ctx->op.kex.algctx = NULL; in evp_pkey_ctx_free_old_ops()
367 ctx->op.kex.exchange = NULL; in evp_pkey_ctx_free_old_ops()
368 } else if (EVP_PKEY_CTX_IS_KEM_OP(ctx)) { in evp_pkey_ctx_free_old_ops()
369 if (ctx->op.encap.algctx != NULL && ctx->op.encap.kem != NULL) in evp_pkey_ctx_free_old_ops()
370 ctx->op.encap.kem->freectx(ctx->op.encap.algctx); in evp_pkey_ctx_free_old_ops()
371 EVP_KEM_free(ctx->op.encap.kem); in evp_pkey_ctx_free_old_ops()
372 ctx->op.encap.algctx = NULL; in evp_pkey_ctx_free_old_ops()
373 ctx->op.encap.kem = NULL; in evp_pkey_ctx_free_old_ops()
375 else if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)) { in evp_pkey_ctx_free_old_ops()
376 if (ctx->op.ciph.algctx != NULL && ctx->op.ciph.cipher != NULL) in evp_pkey_ctx_free_old_ops()
377 ctx->op.ciph.cipher->freectx(ctx->op.ciph.algctx); in evp_pkey_ctx_free_old_ops()
378 EVP_ASYM_CIPHER_free(ctx->op.ciph.cipher); in evp_pkey_ctx_free_old_ops()
379 ctx->op.ciph.algctx = NULL; in evp_pkey_ctx_free_old_ops()
380 ctx->op.ciph.cipher = NULL; in evp_pkey_ctx_free_old_ops()
381 } else if (EVP_PKEY_CTX_IS_GEN_OP(ctx)) { in evp_pkey_ctx_free_old_ops()
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()
387 void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx) in EVP_PKEY_CTX_free() argument
389 if (ctx == NULL) in EVP_PKEY_CTX_free()
391 if (ctx->pmeth && ctx->pmeth->cleanup) in EVP_PKEY_CTX_free()
392 ctx->pmeth->cleanup(ctx); in EVP_PKEY_CTX_free()
394 evp_pkey_ctx_free_old_ops(ctx); in EVP_PKEY_CTX_free()
396 evp_pkey_ctx_free_all_cached_data(ctx); in EVP_PKEY_CTX_free()
398 EVP_KEYMGMT_free(ctx->keymgmt); in EVP_PKEY_CTX_free()
400 OPENSSL_free(ctx->propquery); in EVP_PKEY_CTX_free()
401 EVP_PKEY_free(ctx->pkey); in EVP_PKEY_CTX_free()
402 EVP_PKEY_free(ctx->peerkey); in EVP_PKEY_CTX_free()
404 ENGINE_finish(ctx->engine); in EVP_PKEY_CTX_free()
406 BN_free(ctx->rsa_pubexp); in EVP_PKEY_CTX_free()
407 OPENSSL_free(ctx); in EVP_PKEY_CTX_free()
654 int EVP_PKEY_CTX_is_a(EVP_PKEY_CTX *ctx, const char *keytype) in EVP_PKEY_CTX_is_a() argument
657 if (evp_pkey_ctx_is_legacy(ctx)) in EVP_PKEY_CTX_is_a()
658 return (ctx->pmeth->pkey_id == evp_pkey_name2type(keytype)); in EVP_PKEY_CTX_is_a()
660 return EVP_KEYMGMT_is_a(ctx->keymgmt, keytype); in EVP_PKEY_CTX_is_a()
663 int EVP_PKEY_CTX_set_params(EVP_PKEY_CTX *ctx, const OSSL_PARAM *params) in EVP_PKEY_CTX_set_params() argument
665 switch (evp_pkey_ctx_state(ctx)) { in EVP_PKEY_CTX_set_params()
667 if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx) in EVP_PKEY_CTX_set_params()
668 && ctx->op.kex.exchange != NULL in EVP_PKEY_CTX_set_params()
669 && ctx->op.kex.exchange->set_ctx_params != NULL) in EVP_PKEY_CTX_set_params()
671 ctx->op.kex.exchange->set_ctx_params(ctx->op.kex.algctx, in EVP_PKEY_CTX_set_params()
673 if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx) in EVP_PKEY_CTX_set_params()
674 && ctx->op.sig.signature != NULL in EVP_PKEY_CTX_set_params()
675 && ctx->op.sig.signature->set_ctx_params != NULL) in EVP_PKEY_CTX_set_params()
677 ctx->op.sig.signature->set_ctx_params(ctx->op.sig.algctx, in EVP_PKEY_CTX_set_params()
679 if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx) in EVP_PKEY_CTX_set_params()
680 && ctx->op.ciph.cipher != NULL in EVP_PKEY_CTX_set_params()
681 && ctx->op.ciph.cipher->set_ctx_params != NULL) in EVP_PKEY_CTX_set_params()
683 ctx->op.ciph.cipher->set_ctx_params(ctx->op.ciph.algctx, in EVP_PKEY_CTX_set_params()
685 if (EVP_PKEY_CTX_IS_GEN_OP(ctx) in EVP_PKEY_CTX_set_params()
686 && ctx->keymgmt != NULL in EVP_PKEY_CTX_set_params()
687 && ctx->keymgmt->gen_set_params != NULL) in EVP_PKEY_CTX_set_params()
689 evp_keymgmt_gen_set_params(ctx->keymgmt, ctx->op.keymgmt.genctx, in EVP_PKEY_CTX_set_params()
691 if (EVP_PKEY_CTX_IS_KEM_OP(ctx) in EVP_PKEY_CTX_set_params()
692 && ctx->op.encap.kem != NULL in EVP_PKEY_CTX_set_params()
693 && ctx->op.encap.kem->set_ctx_params != NULL) in EVP_PKEY_CTX_set_params()
695 ctx->op.encap.kem->set_ctx_params(ctx->op.encap.algctx, in EVP_PKEY_CTX_set_params()
701 return evp_pkey_ctx_set_params_to_ctrl(ctx, params); in EVP_PKEY_CTX_set_params()
707 int EVP_PKEY_CTX_get_params(EVP_PKEY_CTX *ctx, OSSL_PARAM *params) in EVP_PKEY_CTX_get_params() argument
709 switch (evp_pkey_ctx_state(ctx)) { in EVP_PKEY_CTX_get_params()
711 if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx) in EVP_PKEY_CTX_get_params()
712 && ctx->op.kex.exchange != NULL in EVP_PKEY_CTX_get_params()
713 && ctx->op.kex.exchange->get_ctx_params != NULL) in EVP_PKEY_CTX_get_params()
715 ctx->op.kex.exchange->get_ctx_params(ctx->op.kex.algctx, in EVP_PKEY_CTX_get_params()
717 if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx) in EVP_PKEY_CTX_get_params()
718 && ctx->op.sig.signature != NULL in EVP_PKEY_CTX_get_params()
719 && ctx->op.sig.signature->get_ctx_params != NULL) in EVP_PKEY_CTX_get_params()
721 ctx->op.sig.signature->get_ctx_params(ctx->op.sig.algctx, in EVP_PKEY_CTX_get_params()
723 if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx) in EVP_PKEY_CTX_get_params()
724 && ctx->op.ciph.cipher != NULL in EVP_PKEY_CTX_get_params()
725 && ctx->op.ciph.cipher->get_ctx_params != NULL) in EVP_PKEY_CTX_get_params()
727 ctx->op.ciph.cipher->get_ctx_params(ctx->op.ciph.algctx, in EVP_PKEY_CTX_get_params()
729 if (EVP_PKEY_CTX_IS_KEM_OP(ctx) in EVP_PKEY_CTX_get_params()
730 && ctx->op.encap.kem != NULL in EVP_PKEY_CTX_get_params()
731 && ctx->op.encap.kem->get_ctx_params != NULL) in EVP_PKEY_CTX_get_params()
733 ctx->op.encap.kem->get_ctx_params(ctx->op.encap.algctx, in EVP_PKEY_CTX_get_params()
735 if (EVP_PKEY_CTX_IS_GEN_OP(ctx) in EVP_PKEY_CTX_get_params()
736 && ctx->keymgmt != NULL in EVP_PKEY_CTX_get_params()
737 && ctx->keymgmt->gen_get_params != NULL) in EVP_PKEY_CTX_get_params()
739 evp_keymgmt_gen_get_params(ctx->keymgmt, ctx->op.keymgmt.genctx, in EVP_PKEY_CTX_get_params()
745 return evp_pkey_ctx_get_params_to_ctrl(ctx, params); in EVP_PKEY_CTX_get_params()
752 const OSSL_PARAM *EVP_PKEY_CTX_gettable_params(const EVP_PKEY_CTX *ctx) in EVP_PKEY_CTX_gettable_params() argument
756 if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx) in EVP_PKEY_CTX_gettable_params()
757 && ctx->op.kex.exchange != NULL in EVP_PKEY_CTX_gettable_params()
758 && ctx->op.kex.exchange->gettable_ctx_params != NULL) { in EVP_PKEY_CTX_gettable_params()
759 provctx = ossl_provider_ctx(EVP_KEYEXCH_get0_provider(ctx->op.kex.exchange)); in EVP_PKEY_CTX_gettable_params()
760 return ctx->op.kex.exchange->gettable_ctx_params(ctx->op.kex.algctx, in EVP_PKEY_CTX_gettable_params()
763 if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx) in EVP_PKEY_CTX_gettable_params()
764 && ctx->op.sig.signature != NULL in EVP_PKEY_CTX_gettable_params()
765 && ctx->op.sig.signature->gettable_ctx_params != NULL) { in EVP_PKEY_CTX_gettable_params()
767 EVP_SIGNATURE_get0_provider(ctx->op.sig.signature)); in EVP_PKEY_CTX_gettable_params()
768 return ctx->op.sig.signature->gettable_ctx_params(ctx->op.sig.algctx, in EVP_PKEY_CTX_gettable_params()
771 if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx) in EVP_PKEY_CTX_gettable_params()
772 && ctx->op.ciph.cipher != NULL in EVP_PKEY_CTX_gettable_params()
773 && ctx->op.ciph.cipher->gettable_ctx_params != NULL) { in EVP_PKEY_CTX_gettable_params()
775 EVP_ASYM_CIPHER_get0_provider(ctx->op.ciph.cipher)); in EVP_PKEY_CTX_gettable_params()
776 return ctx->op.ciph.cipher->gettable_ctx_params(ctx->op.ciph.algctx, in EVP_PKEY_CTX_gettable_params()
779 if (EVP_PKEY_CTX_IS_KEM_OP(ctx) in EVP_PKEY_CTX_gettable_params()
780 && ctx->op.encap.kem != NULL in EVP_PKEY_CTX_gettable_params()
781 && ctx->op.encap.kem->gettable_ctx_params != NULL) { in EVP_PKEY_CTX_gettable_params()
782 provctx = ossl_provider_ctx(EVP_KEM_get0_provider(ctx->op.encap.kem)); in EVP_PKEY_CTX_gettable_params()
783 return ctx->op.encap.kem->gettable_ctx_params(ctx->op.encap.algctx, in EVP_PKEY_CTX_gettable_params()
786 if (EVP_PKEY_CTX_IS_GEN_OP(ctx) in EVP_PKEY_CTX_gettable_params()
787 && ctx->keymgmt != NULL in EVP_PKEY_CTX_gettable_params()
788 && ctx->keymgmt->gen_gettable_params != NULL) { in EVP_PKEY_CTX_gettable_params()
789 provctx = ossl_provider_ctx(EVP_KEYMGMT_get0_provider(ctx->keymgmt)); in EVP_PKEY_CTX_gettable_params()
790 return ctx->keymgmt->gen_gettable_params(ctx->op.keymgmt.genctx, in EVP_PKEY_CTX_gettable_params()
796 const OSSL_PARAM *EVP_PKEY_CTX_settable_params(const EVP_PKEY_CTX *ctx) in EVP_PKEY_CTX_settable_params() argument
800 if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx) in EVP_PKEY_CTX_settable_params()
801 && ctx->op.kex.exchange != NULL in EVP_PKEY_CTX_settable_params()
802 && ctx->op.kex.exchange->settable_ctx_params != NULL) { in EVP_PKEY_CTX_settable_params()
803 provctx = ossl_provider_ctx(EVP_KEYEXCH_get0_provider(ctx->op.kex.exchange)); in EVP_PKEY_CTX_settable_params()
804 return ctx->op.kex.exchange->settable_ctx_params(ctx->op.kex.algctx, in EVP_PKEY_CTX_settable_params()
807 if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx) in EVP_PKEY_CTX_settable_params()
808 && ctx->op.sig.signature != NULL in EVP_PKEY_CTX_settable_params()
809 && ctx->op.sig.signature->settable_ctx_params != NULL) { in EVP_PKEY_CTX_settable_params()
811 EVP_SIGNATURE_get0_provider(ctx->op.sig.signature)); in EVP_PKEY_CTX_settable_params()
812 return ctx->op.sig.signature->settable_ctx_params(ctx->op.sig.algctx, in EVP_PKEY_CTX_settable_params()
815 if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx) in EVP_PKEY_CTX_settable_params()
816 && ctx->op.ciph.cipher != NULL in EVP_PKEY_CTX_settable_params()
817 && ctx->op.ciph.cipher->settable_ctx_params != NULL) { in EVP_PKEY_CTX_settable_params()
819 EVP_ASYM_CIPHER_get0_provider(ctx->op.ciph.cipher)); in EVP_PKEY_CTX_settable_params()
820 return ctx->op.ciph.cipher->settable_ctx_params(ctx->op.ciph.algctx, in EVP_PKEY_CTX_settable_params()
823 if (EVP_PKEY_CTX_IS_GEN_OP(ctx) in EVP_PKEY_CTX_settable_params()
824 && ctx->keymgmt != NULL in EVP_PKEY_CTX_settable_params()
825 && ctx->keymgmt->gen_settable_params != NULL) { in EVP_PKEY_CTX_settable_params()
826 provctx = ossl_provider_ctx(EVP_KEYMGMT_get0_provider(ctx->keymgmt)); in EVP_PKEY_CTX_settable_params()
827 return ctx->keymgmt->gen_settable_params(ctx->op.keymgmt.genctx, in EVP_PKEY_CTX_settable_params()
830 if (EVP_PKEY_CTX_IS_KEM_OP(ctx) in EVP_PKEY_CTX_settable_params()
831 && ctx->op.encap.kem != NULL in EVP_PKEY_CTX_settable_params()
832 && ctx->op.encap.kem->settable_ctx_params != NULL) { in EVP_PKEY_CTX_settable_params()
833 provctx = ossl_provider_ctx(EVP_KEM_get0_provider(ctx->op.encap.kem)); in EVP_PKEY_CTX_settable_params()
834 return ctx->op.encap.kem->settable_ctx_params(ctx->op.encap.algctx, in EVP_PKEY_CTX_settable_params()
852 int evp_pkey_ctx_set_params_strict(EVP_PKEY_CTX *ctx, OSSL_PARAM *params) in evp_pkey_ctx_set_params_strict() argument
854 if (ctx == NULL || params == NULL) in evp_pkey_ctx_set_params_strict()
863 if (evp_pkey_ctx_is_provided(ctx)) { in evp_pkey_ctx_set_params_strict()
864 const OSSL_PARAM *settable = EVP_PKEY_CTX_settable_params(ctx); in evp_pkey_ctx_set_params_strict()
874 return EVP_PKEY_CTX_set_params(ctx, params); in evp_pkey_ctx_set_params_strict()
877 int evp_pkey_ctx_get_params_strict(EVP_PKEY_CTX *ctx, OSSL_PARAM *params) in evp_pkey_ctx_get_params_strict() argument
879 if (ctx == NULL || params == NULL) in evp_pkey_ctx_get_params_strict()
888 if (evp_pkey_ctx_is_provided(ctx)) { in evp_pkey_ctx_get_params_strict()
889 const OSSL_PARAM *gettable = EVP_PKEY_CTX_gettable_params(ctx); in evp_pkey_ctx_get_params_strict()
899 return EVP_PKEY_CTX_get_params(ctx, params); in evp_pkey_ctx_get_params_strict()
902 int EVP_PKEY_CTX_get_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD **md) in EVP_PKEY_CTX_get_signature_md() argument
909 if (ctx == NULL || !EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)) { in EVP_PKEY_CTX_get_signature_md()
915 if (ctx->op.sig.algctx == NULL) in EVP_PKEY_CTX_get_signature_md()
916 return EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, in EVP_PKEY_CTX_get_signature_md()
924 if (!EVP_PKEY_CTX_get_params(ctx, sig_md_params)) in EVP_PKEY_CTX_get_signature_md()
927 tmp = evp_get_digestbyname_ex(ctx->libctx, name); in EVP_PKEY_CTX_get_signature_md()
936 static int evp_pkey_ctx_set_md(EVP_PKEY_CTX *ctx, const EVP_MD *md, in evp_pkey_ctx_set_md() argument
943 if (ctx == NULL || (ctx->operation & op) == 0) { in evp_pkey_ctx_set_md()
950 return EVP_PKEY_CTX_ctrl(ctx, -1, op, ctrl, 0, (void *)(md)); in evp_pkey_ctx_set_md()
966 return EVP_PKEY_CTX_set_params(ctx, md_params); in evp_pkey_ctx_set_md()
969 int EVP_PKEY_CTX_set_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD *md) in EVP_PKEY_CTX_set_signature_md() argument
971 return evp_pkey_ctx_set_md(ctx, md, ctx->op.sig.algctx == NULL, in EVP_PKEY_CTX_set_signature_md()
976 int EVP_PKEY_CTX_set_tls1_prf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md) in EVP_PKEY_CTX_set_tls1_prf_md() argument
978 return evp_pkey_ctx_set_md(ctx, md, ctx->op.kex.algctx == NULL, in EVP_PKEY_CTX_set_tls1_prf_md()
983 static int evp_pkey_ctx_set1_octet_string(EVP_PKEY_CTX *ctx, int fallback, in evp_pkey_ctx_set1_octet_string() argument
990 if (ctx == NULL || (ctx->operation & op) == 0) { in evp_pkey_ctx_set1_octet_string()
998 return EVP_PKEY_CTX_ctrl(ctx, -1, op, ctrl, datalen, (void *)(data)); in evp_pkey_ctx_set1_octet_string()
1015 return EVP_PKEY_CTX_set_params(ctx, octet_string_params); in evp_pkey_ctx_set1_octet_string()
1018 static int evp_pkey_ctx_add1_octet_string(EVP_PKEY_CTX *ctx, int fallback, in evp_pkey_ctx_add1_octet_string() argument
1030 if (ctx == NULL || (ctx->operation & op) == 0) { in evp_pkey_ctx_add1_octet_string()
1038 return EVP_PKEY_CTX_ctrl(ctx, -1, op, ctrl, datalen, (void *)(data)); in evp_pkey_ctx_add1_octet_string()
1049 gettables = EVP_PKEY_CTX_gettable_params(ctx); in evp_pkey_ctx_add1_octet_string()
1051 return evp_pkey_ctx_set1_octet_string(ctx, fallback, param, op, ctrl, in evp_pkey_ctx_add1_octet_string()
1058 if (!EVP_PKEY_CTX_get_params(ctx, os_params)) in evp_pkey_ctx_add1_octet_string()
1077 if (!EVP_PKEY_CTX_get_params(ctx, os_params)) in evp_pkey_ctx_add1_octet_string()
1083 ret = EVP_PKEY_CTX_set_params(ctx, os_params); in evp_pkey_ctx_add1_octet_string()
1090 int EVP_PKEY_CTX_set1_tls1_prf_secret(EVP_PKEY_CTX *ctx, in EVP_PKEY_CTX_set1_tls1_prf_secret() argument
1093 return evp_pkey_ctx_set1_octet_string(ctx, ctx->op.kex.algctx == NULL, in EVP_PKEY_CTX_set1_tls1_prf_secret()
1100 int EVP_PKEY_CTX_add1_tls1_prf_seed(EVP_PKEY_CTX *ctx, in EVP_PKEY_CTX_add1_tls1_prf_seed() argument
1103 return evp_pkey_ctx_set1_octet_string(ctx, ctx->op.kex.algctx == NULL, in EVP_PKEY_CTX_add1_tls1_prf_seed()
1110 int EVP_PKEY_CTX_set_hkdf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md) in EVP_PKEY_CTX_set_hkdf_md() argument
1112 return evp_pkey_ctx_set_md(ctx, md, ctx->op.kex.algctx == NULL, in EVP_PKEY_CTX_set_hkdf_md()
1117 int EVP_PKEY_CTX_set1_hkdf_salt(EVP_PKEY_CTX *ctx, in EVP_PKEY_CTX_set1_hkdf_salt() argument
1120 return evp_pkey_ctx_set1_octet_string(ctx, ctx->op.kex.algctx == NULL, in EVP_PKEY_CTX_set1_hkdf_salt()
1127 int EVP_PKEY_CTX_set1_hkdf_key(EVP_PKEY_CTX *ctx, in EVP_PKEY_CTX_set1_hkdf_key() argument
1130 return evp_pkey_ctx_set1_octet_string(ctx, ctx->op.kex.algctx == NULL, in EVP_PKEY_CTX_set1_hkdf_key()
1137 int EVP_PKEY_CTX_add1_hkdf_info(EVP_PKEY_CTX *ctx, in EVP_PKEY_CTX_add1_hkdf_info() argument
1140 return evp_pkey_ctx_add1_octet_string(ctx, ctx->op.kex.algctx == NULL, in EVP_PKEY_CTX_add1_hkdf_info()
1147 int EVP_PKEY_CTX_set_hkdf_mode(EVP_PKEY_CTX *ctx, int mode) in EVP_PKEY_CTX_set_hkdf_mode() argument
1151 if (ctx == NULL || !EVP_PKEY_CTX_IS_DERIVE_OP(ctx)) { in EVP_PKEY_CTX_set_hkdf_mode()
1158 if (ctx->op.kex.algctx == NULL) in EVP_PKEY_CTX_set_hkdf_mode()
1159 return EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_DERIVE, in EVP_PKEY_CTX_set_hkdf_mode()
1171 return EVP_PKEY_CTX_set_params(ctx, int_params); in EVP_PKEY_CTX_set_hkdf_mode()
1174 int EVP_PKEY_CTX_set1_pbe_pass(EVP_PKEY_CTX *ctx, const char *pass, in EVP_PKEY_CTX_set1_pbe_pass() argument
1177 return evp_pkey_ctx_set1_octet_string(ctx, ctx->op.kex.algctx == NULL, in EVP_PKEY_CTX_set1_pbe_pass()
1184 int EVP_PKEY_CTX_set1_scrypt_salt(EVP_PKEY_CTX *ctx, in EVP_PKEY_CTX_set1_scrypt_salt() argument
1187 return evp_pkey_ctx_set1_octet_string(ctx, ctx->op.kex.algctx == NULL, in EVP_PKEY_CTX_set1_scrypt_salt()
1194 static int evp_pkey_ctx_set_uint64(EVP_PKEY_CTX *ctx, const char *param, in evp_pkey_ctx_set_uint64() argument
1199 if (ctx == NULL || !EVP_PKEY_CTX_IS_DERIVE_OP(ctx)) { in evp_pkey_ctx_set_uint64()
1206 if (ctx->op.kex.algctx == NULL) in evp_pkey_ctx_set_uint64()
1207 return EVP_PKEY_CTX_ctrl_uint64(ctx, -1, op, ctrl, val); in evp_pkey_ctx_set_uint64()
1213 return EVP_PKEY_CTX_set_params(ctx, uint64_params); in evp_pkey_ctx_set_uint64()
1216 int EVP_PKEY_CTX_set_scrypt_N(EVP_PKEY_CTX *ctx, uint64_t n) in EVP_PKEY_CTX_set_scrypt_N() argument
1218 return evp_pkey_ctx_set_uint64(ctx, OSSL_KDF_PARAM_SCRYPT_N, in EVP_PKEY_CTX_set_scrypt_N()
1223 int EVP_PKEY_CTX_set_scrypt_r(EVP_PKEY_CTX *ctx, uint64_t r) in EVP_PKEY_CTX_set_scrypt_r() argument
1225 return evp_pkey_ctx_set_uint64(ctx, OSSL_KDF_PARAM_SCRYPT_R, in EVP_PKEY_CTX_set_scrypt_r()
1230 int EVP_PKEY_CTX_set_scrypt_p(EVP_PKEY_CTX *ctx, uint64_t p) in EVP_PKEY_CTX_set_scrypt_p() argument
1232 return evp_pkey_ctx_set_uint64(ctx, OSSL_KDF_PARAM_SCRYPT_P, in EVP_PKEY_CTX_set_scrypt_p()
1237 int EVP_PKEY_CTX_set_scrypt_maxmem_bytes(EVP_PKEY_CTX *ctx, in EVP_PKEY_CTX_set_scrypt_maxmem_bytes() argument
1240 return evp_pkey_ctx_set_uint64(ctx, OSSL_KDF_PARAM_SCRYPT_MAXMEM, in EVP_PKEY_CTX_set_scrypt_maxmem_bytes()
1246 int EVP_PKEY_CTX_set_mac_key(EVP_PKEY_CTX *ctx, const unsigned char *key, in EVP_PKEY_CTX_set_mac_key() argument
1249 return evp_pkey_ctx_set1_octet_string(ctx, ctx->op.keymgmt.genctx == NULL, in EVP_PKEY_CTX_set_mac_key()
1256 int EVP_PKEY_CTX_set_kem_op(EVP_PKEY_CTX *ctx, const char *op) in EVP_PKEY_CTX_set_kem_op() argument
1260 if (ctx == NULL || op == NULL) { in EVP_PKEY_CTX_set_kem_op()
1264 if (!EVP_PKEY_CTX_IS_KEM_OP(ctx)) { in EVP_PKEY_CTX_set_kem_op()
1271 return EVP_PKEY_CTX_set_params(ctx, params); in EVP_PKEY_CTX_set_kem_op()
1274 int EVP_PKEY_CTX_set1_id(EVP_PKEY_CTX *ctx, const void *id, int len) in EVP_PKEY_CTX_set1_id() argument
1276 return EVP_PKEY_CTX_ctrl(ctx, -1, -1, in EVP_PKEY_CTX_set1_id()
1280 int EVP_PKEY_CTX_get1_id(EVP_PKEY_CTX *ctx, void *id) in EVP_PKEY_CTX_get1_id() argument
1282 return EVP_PKEY_CTX_ctrl(ctx, -1, -1, EVP_PKEY_CTRL_GET1_ID, 0, (void*)id); in EVP_PKEY_CTX_get1_id()
1285 int EVP_PKEY_CTX_get1_id_len(EVP_PKEY_CTX *ctx, size_t *id_len) in EVP_PKEY_CTX_get1_id_len() argument
1287 return EVP_PKEY_CTX_ctrl(ctx, -1, -1, in EVP_PKEY_CTX_get1_id_len()
1291 static int evp_pkey_ctx_ctrl_int(EVP_PKEY_CTX *ctx, int keytype, int optype, in evp_pkey_ctx_ctrl_int() argument
1301 if (ctx->pmeth == NULL || ctx->pmeth->digest_custom == NULL) { in evp_pkey_ctx_ctrl_int()
1302 if (ctx->operation == EVP_PKEY_OP_UNDEFINED) { in evp_pkey_ctx_ctrl_int()
1307 if ((optype != -1) && !(ctx->operation & optype)) { in evp_pkey_ctx_ctrl_int()
1313 switch (evp_pkey_ctx_state(ctx)) { in evp_pkey_ctx_ctrl_int()
1315 return evp_pkey_ctx_ctrl_to_param(ctx, keytype, optype, cmd, p1, p2); in evp_pkey_ctx_ctrl_int()
1318 if (ctx->pmeth == NULL || ctx->pmeth->ctrl == NULL) { in evp_pkey_ctx_ctrl_int()
1322 if ((keytype != -1) && (ctx->pmeth->pkey_id != keytype)) in evp_pkey_ctx_ctrl_int()
1325 ret = ctx->pmeth->ctrl(ctx, cmd, p1, p2); in evp_pkey_ctx_ctrl_int()
1334 int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, in EVP_PKEY_CTX_ctrl() argument
1339 if (ctx == NULL) { in EVP_PKEY_CTX_ctrl()
1345 ret = evp_pkey_ctx_store_cached_data(ctx, keytype, optype, in EVP_PKEY_CTX_ctrl()
1356 if (ret < 1 || ctx->operation == EVP_PKEY_OP_UNDEFINED) in EVP_PKEY_CTX_ctrl()
1359 return evp_pkey_ctx_ctrl_int(ctx, keytype, optype, cmd, p1, p2); in EVP_PKEY_CTX_ctrl()
1362 int EVP_PKEY_CTX_ctrl_uint64(EVP_PKEY_CTX *ctx, int keytype, int optype, in EVP_PKEY_CTX_ctrl_uint64() argument
1365 return EVP_PKEY_CTX_ctrl(ctx, keytype, optype, cmd, 0, &value); in EVP_PKEY_CTX_ctrl_uint64()
1369 static int evp_pkey_ctx_ctrl_str_int(EVP_PKEY_CTX *ctx, in evp_pkey_ctx_ctrl_str_int() argument
1374 if (ctx == NULL) { in evp_pkey_ctx_ctrl_str_int()
1379 switch (evp_pkey_ctx_state(ctx)) { in evp_pkey_ctx_ctrl_str_int()
1381 return evp_pkey_ctx_ctrl_str_to_param(ctx, name, value); in evp_pkey_ctx_ctrl_str_int()
1384 if (ctx == NULL || ctx->pmeth == NULL || ctx->pmeth->ctrl_str == NULL) { in evp_pkey_ctx_ctrl_str_int()
1389 ret = EVP_PKEY_CTX_md(ctx, in evp_pkey_ctx_ctrl_str_int()
1393 ret = ctx->pmeth->ctrl_str(ctx, name, value); in evp_pkey_ctx_ctrl_str_int()
1400 int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, in EVP_PKEY_CTX_ctrl_str() argument
1407 ret = evp_pkey_ctx_store_cached_data(ctx, -1, -1, -1, in EVP_PKEY_CTX_ctrl_str()
1418 if (ret < 1 || ctx->operation == EVP_PKEY_OP_UNDEFINED) in EVP_PKEY_CTX_ctrl_str()
1422 return evp_pkey_ctx_ctrl_str_int(ctx, name, value); in EVP_PKEY_CTX_ctrl_str()
1441 static int evp_pkey_ctx_store_cached_data(EVP_PKEY_CTX *ctx, in evp_pkey_ctx_store_cached_data() argument
1460 switch (evp_pkey_ctx_state(ctx)) { in evp_pkey_ctx_store_cached_data()
1462 if (ctx->keymgmt == NULL) { in evp_pkey_ctx_store_cached_data()
1466 if (!EVP_KEYMGMT_is_a(ctx->keymgmt, in evp_pkey_ctx_store_cached_data()
1474 if (ctx->pmeth == NULL) { in evp_pkey_ctx_store_cached_data()
1478 if (EVP_PKEY_type(ctx->pmeth->pkey_id) != EVP_PKEY_type(keytype)) { in evp_pkey_ctx_store_cached_data()
1485 if (optype != -1 && (ctx->operation & optype) == 0) { in evp_pkey_ctx_store_cached_data()
1492 evp_pkey_ctx_free_cached_data(ctx, cmd, name); in evp_pkey_ctx_store_cached_data()
1494 ctx->cached_parameters.dist_id_name = OPENSSL_strdup(name); in evp_pkey_ctx_store_cached_data()
1495 if (ctx->cached_parameters.dist_id_name == NULL) in evp_pkey_ctx_store_cached_data()
1499 ctx->cached_parameters.dist_id = OPENSSL_memdup(data, data_len); in evp_pkey_ctx_store_cached_data()
1500 if (ctx->cached_parameters.dist_id == NULL) in evp_pkey_ctx_store_cached_data()
1503 ctx->cached_parameters.dist_id_set = 1; in evp_pkey_ctx_store_cached_data()
1504 ctx->cached_parameters.dist_id_len = data_len; in evp_pkey_ctx_store_cached_data()
1510 static void evp_pkey_ctx_free_cached_data(EVP_PKEY_CTX *ctx, in evp_pkey_ctx_free_cached_data() argument
1516 OPENSSL_free(ctx->cached_parameters.dist_id); in evp_pkey_ctx_free_cached_data()
1517 OPENSSL_free(ctx->cached_parameters.dist_id_name); in evp_pkey_ctx_free_cached_data()
1518 ctx->cached_parameters.dist_id = NULL; in evp_pkey_ctx_free_cached_data()
1519 ctx->cached_parameters.dist_id_name = NULL; in evp_pkey_ctx_free_cached_data()
1524 static void evp_pkey_ctx_free_all_cached_data(EVP_PKEY_CTX *ctx) in evp_pkey_ctx_free_all_cached_data() argument
1526 evp_pkey_ctx_free_cached_data(ctx, EVP_PKEY_CTRL_SET1_ID, NULL); in evp_pkey_ctx_free_all_cached_data()
1529 int evp_pkey_ctx_use_cached_data(EVP_PKEY_CTX *ctx) in evp_pkey_ctx_use_cached_data() argument
1533 if (ret && ctx->cached_parameters.dist_id_set) { in evp_pkey_ctx_use_cached_data()
1534 const char *name = ctx->cached_parameters.dist_id_name; in evp_pkey_ctx_use_cached_data()
1535 const void *val = ctx->cached_parameters.dist_id; in evp_pkey_ctx_use_cached_data()
1536 size_t len = ctx->cached_parameters.dist_id_len; in evp_pkey_ctx_use_cached_data()
1539 ret = evp_pkey_ctx_ctrl_str_int(ctx, name, val); in evp_pkey_ctx_use_cached_data()
1541 ret = evp_pkey_ctx_ctrl_int(ctx, -1, ctx->operation, in evp_pkey_ctx_use_cached_data()
1549 OSSL_LIB_CTX *EVP_PKEY_CTX_get0_libctx(EVP_PKEY_CTX *ctx) in EVP_PKEY_CTX_get0_libctx() argument
1551 return ctx->libctx; in EVP_PKEY_CTX_get0_libctx()
1554 const char *EVP_PKEY_CTX_get0_propq(const EVP_PKEY_CTX *ctx) in EVP_PKEY_CTX_get0_propq() argument
1556 return ctx->propquery; in EVP_PKEY_CTX_get0_propq()
1559 const OSSL_PROVIDER *EVP_PKEY_CTX_get0_provider(const EVP_PKEY_CTX *ctx) in EVP_PKEY_CTX_get0_provider() argument
1561 if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)) { in EVP_PKEY_CTX_get0_provider()
1562 if (ctx->op.sig.signature != NULL) in EVP_PKEY_CTX_get0_provider()
1563 return EVP_SIGNATURE_get0_provider(ctx->op.sig.signature); in EVP_PKEY_CTX_get0_provider()
1564 } else if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx)) { in EVP_PKEY_CTX_get0_provider()
1565 if (ctx->op.kex.exchange != NULL) in EVP_PKEY_CTX_get0_provider()
1566 return EVP_KEYEXCH_get0_provider(ctx->op.kex.exchange); in EVP_PKEY_CTX_get0_provider()
1567 } else if (EVP_PKEY_CTX_IS_KEM_OP(ctx)) { in EVP_PKEY_CTX_get0_provider()
1568 if (ctx->op.encap.kem != NULL) in EVP_PKEY_CTX_get0_provider()
1569 return EVP_KEM_get0_provider(ctx->op.encap.kem); in EVP_PKEY_CTX_get0_provider()
1570 } else if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)) { in EVP_PKEY_CTX_get0_provider()
1571 if (ctx->op.ciph.cipher != NULL) in EVP_PKEY_CTX_get0_provider()
1572 return EVP_ASYM_CIPHER_get0_provider(ctx->op.ciph.cipher); in EVP_PKEY_CTX_get0_provider()
1573 } else if (EVP_PKEY_CTX_IS_GEN_OP(ctx)) { in EVP_PKEY_CTX_get0_provider()
1574 if (ctx->keymgmt != NULL) in EVP_PKEY_CTX_get0_provider()
1575 return EVP_KEYMGMT_get0_provider(ctx->keymgmt); in EVP_PKEY_CTX_get0_provider()
1583 int EVP_PKEY_CTX_str2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *str) in EVP_PKEY_CTX_str2ctrl() argument
1590 return ctx->pmeth->ctrl(ctx, cmd, len, (void *)str); in EVP_PKEY_CTX_str2ctrl()
1593 int EVP_PKEY_CTX_hex2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *hex) in EVP_PKEY_CTX_hex2ctrl() argument
1603 rv = ctx->pmeth->ctrl(ctx, cmd, binlen, bin); in EVP_PKEY_CTX_hex2ctrl()
1609 int EVP_PKEY_CTX_md(EVP_PKEY_CTX *ctx, int optype, int cmd, const char *md) in EVP_PKEY_CTX_md() argument
1617 return EVP_PKEY_CTX_ctrl(ctx, -1, optype, cmd, 0, (void *)m); in EVP_PKEY_CTX_md()
1620 int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx) in EVP_PKEY_CTX_get_operation() argument
1622 return ctx->operation; in EVP_PKEY_CTX_get_operation()
1625 void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen) in EVP_PKEY_CTX_set0_keygen_info() argument
1627 ctx->keygen_info = dat; in EVP_PKEY_CTX_set0_keygen_info()
1628 ctx->keygen_info_count = datlen; in EVP_PKEY_CTX_set0_keygen_info()
1631 void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data) in EVP_PKEY_CTX_set_data() argument
1633 ctx->data = data; in EVP_PKEY_CTX_set_data()
1636 void *EVP_PKEY_CTX_get_data(const EVP_PKEY_CTX *ctx) in EVP_PKEY_CTX_get_data() argument
1638 return ctx->data; in EVP_PKEY_CTX_get_data()
1641 EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx) in EVP_PKEY_CTX_get0_pkey() argument
1643 return ctx->pkey; in EVP_PKEY_CTX_get0_pkey()
1646 EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx) in EVP_PKEY_CTX_get0_peerkey() argument
1648 return ctx->peerkey; in EVP_PKEY_CTX_get0_peerkey()
1651 void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data) in EVP_PKEY_CTX_set_app_data() argument
1653 ctx->app_data = data; in EVP_PKEY_CTX_set_app_data()
1656 void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx) in EVP_PKEY_CTX_get_app_data() argument
1658 return ctx->app_data; in EVP_PKEY_CTX_get_app_data()
1662 int (*init) (EVP_PKEY_CTX *ctx)) in EVP_PKEY_meth_set_init()
1675 void (*cleanup) (EVP_PKEY_CTX *ctx)) in EVP_PKEY_meth_set_cleanup()
1681 int (*paramgen_init) (EVP_PKEY_CTX *ctx), in EVP_PKEY_meth_set_paramgen()
1682 int (*paramgen) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_set_paramgen()
1690 int (*keygen_init) (EVP_PKEY_CTX *ctx), in EVP_PKEY_meth_set_keygen()
1691 int (*keygen) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_set_keygen()
1699 int (*sign_init) (EVP_PKEY_CTX *ctx), in EVP_PKEY_meth_set_sign()
1700 int (*sign) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_set_sign()
1710 int (*verify_init) (EVP_PKEY_CTX *ctx), in EVP_PKEY_meth_set_verify()
1711 int (*verify) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_set_verify()
1723 *ctx), in EVP_PKEY_meth_set_verify_recover()
1725 *ctx, in EVP_PKEY_meth_set_verify_recover()
1738 int (*signctx_init) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_set_signctx()
1740 int (*signctx) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_set_signctx()
1750 int (*verifyctx_init) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_set_verifyctx()
1752 int (*verifyctx) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_set_verifyctx()
1762 int (*encrypt_init) (EVP_PKEY_CTX *ctx), in EVP_PKEY_meth_set_encrypt()
1763 int (*encryptfn) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_set_encrypt()
1774 int (*decrypt_init) (EVP_PKEY_CTX *ctx), in EVP_PKEY_meth_set_decrypt()
1775 int (*decrypt) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_set_decrypt()
1786 int (*derive_init) (EVP_PKEY_CTX *ctx), in EVP_PKEY_meth_set_derive()
1787 int (*derive) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_set_derive()
1796 int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1, in EVP_PKEY_meth_set_ctrl()
1798 int (*ctrl_str) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_set_ctrl()
1807 int (*digestsign) (EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen, in EVP_PKEY_meth_set_digestsign()
1814 int (*digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig, in EVP_PKEY_meth_set_digestverify()
1840 int (*digest_custom) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_set_digest_custom()
1847 int (**pinit) (EVP_PKEY_CTX *ctx)) in EVP_PKEY_meth_get_init()
1860 void (**pcleanup) (EVP_PKEY_CTX *ctx)) in EVP_PKEY_meth_get_cleanup()
1866 int (**pparamgen_init) (EVP_PKEY_CTX *ctx), in EVP_PKEY_meth_get_paramgen()
1867 int (**pparamgen) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_get_paramgen()
1877 int (**pkeygen_init) (EVP_PKEY_CTX *ctx), in EVP_PKEY_meth_get_keygen()
1878 int (**pkeygen) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_get_keygen()
1888 int (**psign_init) (EVP_PKEY_CTX *ctx), in EVP_PKEY_meth_get_sign()
1889 int (**psign) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_get_sign()
1901 int (**pverify_init) (EVP_PKEY_CTX *ctx), in EVP_PKEY_meth_get_verify()
1902 int (**pverify) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_get_verify()
1916 *ctx), in EVP_PKEY_meth_get_verify_recover()
1918 *ctx, in EVP_PKEY_meth_get_verify_recover()
1933 int (**psignctx_init) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_get_signctx()
1935 int (**psignctx) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_get_signctx()
1947 int (**pverifyctx_init) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_get_verifyctx()
1949 int (**pverifyctx) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_get_verifyctx()
1961 int (**pencrypt_init) (EVP_PKEY_CTX *ctx), in EVP_PKEY_meth_get_encrypt()
1962 int (**pencryptfn) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_get_encrypt()
1975 int (**pdecrypt_init) (EVP_PKEY_CTX *ctx), in EVP_PKEY_meth_get_decrypt()
1976 int (**pdecrypt) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_get_decrypt()
1989 int (**pderive_init) (EVP_PKEY_CTX *ctx), in EVP_PKEY_meth_get_derive()
1990 int (**pderive) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_get_derive()
2001 int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1, in EVP_PKEY_meth_get_ctrl()
2003 int (**pctrl_str) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_get_ctrl()
2014 int (**digestsign) (EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen, in EVP_PKEY_meth_get_digestsign()
2022 int (**digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig, in EVP_PKEY_meth_get_digestverify()
2052 int (**pdigest_custom) (EVP_PKEY_CTX *ctx, in EVP_PKEY_meth_get_digest_custom()