Lines Matching refs:pmeth
126 EVP_PKEY_METHOD *pmeth; in EVP_PKEY_meth_new() local
128 pmeth = OPENSSL_zalloc(sizeof(*pmeth)); in EVP_PKEY_meth_new()
129 if (pmeth == NULL) in EVP_PKEY_meth_new()
132 pmeth->pkey_id = id; in EVP_PKEY_meth_new()
133 pmeth->flags = flags | EVP_PKEY_FLAG_DYNAMIC; in EVP_PKEY_meth_new()
134 return pmeth; in EVP_PKEY_meth_new()
165 const EVP_PKEY_METHOD *pmeth = NULL, *app_pmeth = NULL; in int_ctx_new() local
231 pmeth = ENGINE_get_pkey_meth(e, id); in int_ctx_new()
235 pmeth = EVP_PKEY_meth_find(id); in int_ctx_new()
237 app_pmeth = pmeth = evp_pkey_meth_find_added_by_application(id); in int_ctx_new()
294 if (pmeth == NULL && keymgmt == NULL) { in int_ctx_new()
301 if ((ret == NULL || pmeth == NULL) && e != NULL) in int_ctx_new()
322 ret->pmeth = pmeth; in int_ctx_new()
328 if (pmeth != NULL && pmeth->init != NULL) { in int_ctx_new()
329 if (pmeth->init(ret) <= 0) { in int_ctx_new()
330 ret->pmeth = NULL; in int_ctx_new()
391 if (ctx->pmeth && ctx->pmeth->cleanup) in EVP_PKEY_CTX_free()
392 ctx->pmeth->cleanup(ctx); in EVP_PKEY_CTX_free()
433 void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth) in EVP_PKEY_meth_free() argument
435 if (pmeth && (pmeth->flags & EVP_PKEY_FLAG_DYNAMIC)) in EVP_PKEY_meth_free()
436 OPENSSL_free(pmeth); in EVP_PKEY_meth_free()
567 rctx->pmeth = pctx->pmeth; in EVP_PKEY_CTX_dup()
576 if (pctx->pmeth == NULL) { in EVP_PKEY_CTX_dup()
591 } else if (pctx->pmeth->copy(rctx, pctx) > 0) { in EVP_PKEY_CTX_dup()
595 rctx->pmeth = NULL; in EVP_PKEY_CTX_dup()
600 int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth) in EVP_PKEY_meth_add0() argument
609 if (!sk_EVP_PKEY_METHOD_push(app_pkey_methods, pmeth)) { in EVP_PKEY_meth_add0()
623 int EVP_PKEY_meth_remove(const EVP_PKEY_METHOD *pmeth) in EVP_PKEY_meth_remove() argument
627 ret = sk_EVP_PKEY_METHOD_delete_ptr(app_pkey_methods, pmeth); in EVP_PKEY_meth_remove()
658 return (ctx->pmeth->pkey_id == evp_pkey_name2type(keytype)); in EVP_PKEY_CTX_is_a()
1301 if (ctx->pmeth == NULL || ctx->pmeth->digest_custom == NULL) { 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()
1384 if (ctx == NULL || ctx->pmeth == NULL || ctx->pmeth->ctrl_str == NULL) { in evp_pkey_ctx_ctrl_str_int()
1393 ret = ctx->pmeth->ctrl_str(ctx, name, value); in evp_pkey_ctx_ctrl_str_int()
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()
1590 return ctx->pmeth->ctrl(ctx, cmd, len, (void *)str); in EVP_PKEY_CTX_str2ctrl()
1603 rv = ctx->pmeth->ctrl(ctx, cmd, binlen, bin); in EVP_PKEY_CTX_hex2ctrl()
1661 void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_init() argument
1664 pmeth->init = init; in EVP_PKEY_meth_set_init()
1667 void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_copy() argument
1671 pmeth->copy = copy; in EVP_PKEY_meth_set_copy()
1674 void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_cleanup() argument
1677 pmeth->cleanup = cleanup; in EVP_PKEY_meth_set_cleanup()
1680 void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_paramgen() argument
1685 pmeth->paramgen_init = paramgen_init; in EVP_PKEY_meth_set_paramgen()
1686 pmeth->paramgen = paramgen; in EVP_PKEY_meth_set_paramgen()
1689 void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_keygen() argument
1694 pmeth->keygen_init = keygen_init; in EVP_PKEY_meth_set_keygen()
1695 pmeth->keygen = keygen; in EVP_PKEY_meth_set_keygen()
1698 void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_sign() argument
1705 pmeth->sign_init = sign_init; in EVP_PKEY_meth_set_sign()
1706 pmeth->sign = sign; in EVP_PKEY_meth_set_sign()
1709 void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_verify() argument
1717 pmeth->verify_init = verify_init; in EVP_PKEY_meth_set_verify()
1718 pmeth->verify = verify; in EVP_PKEY_meth_set_verify()
1721 void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_verify_recover() argument
1733 pmeth->verify_recover_init = verify_recover_init; in EVP_PKEY_meth_set_verify_recover()
1734 pmeth->verify_recover = verify_recover; in EVP_PKEY_meth_set_verify_recover()
1737 void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_signctx() argument
1745 pmeth->signctx_init = signctx_init; in EVP_PKEY_meth_set_signctx()
1746 pmeth->signctx = signctx; in EVP_PKEY_meth_set_signctx()
1749 void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_verifyctx() argument
1757 pmeth->verifyctx_init = verifyctx_init; in EVP_PKEY_meth_set_verifyctx()
1758 pmeth->verifyctx = verifyctx; in EVP_PKEY_meth_set_verifyctx()
1761 void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_encrypt() argument
1769 pmeth->encrypt_init = encrypt_init; in EVP_PKEY_meth_set_encrypt()
1770 pmeth->encrypt = encryptfn; in EVP_PKEY_meth_set_encrypt()
1773 void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_decrypt() argument
1781 pmeth->decrypt_init = decrypt_init; in EVP_PKEY_meth_set_decrypt()
1782 pmeth->decrypt = decrypt; in EVP_PKEY_meth_set_decrypt()
1785 void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_derive() argument
1791 pmeth->derive_init = derive_init; in EVP_PKEY_meth_set_derive()
1792 pmeth->derive = derive; in EVP_PKEY_meth_set_derive()
1795 void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_ctrl() argument
1802 pmeth->ctrl = ctrl; in EVP_PKEY_meth_set_ctrl()
1803 pmeth->ctrl_str = ctrl_str; in EVP_PKEY_meth_set_ctrl()
1806 void EVP_PKEY_meth_set_digestsign(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_digestsign() argument
1810 pmeth->digestsign = digestsign; in EVP_PKEY_meth_set_digestsign()
1813 void EVP_PKEY_meth_set_digestverify(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_digestverify() argument
1818 pmeth->digestverify = digestverify; in EVP_PKEY_meth_set_digestverify()
1821 void EVP_PKEY_meth_set_check(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_check() argument
1824 pmeth->check = check; in EVP_PKEY_meth_set_check()
1827 void EVP_PKEY_meth_set_public_check(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_public_check() argument
1830 pmeth->public_check = check; in EVP_PKEY_meth_set_public_check()
1833 void EVP_PKEY_meth_set_param_check(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_param_check() argument
1836 pmeth->param_check = check; in EVP_PKEY_meth_set_param_check()
1839 void EVP_PKEY_meth_set_digest_custom(EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_set_digest_custom() argument
1843 pmeth->digest_custom = digest_custom; in EVP_PKEY_meth_set_digest_custom()
1846 void EVP_PKEY_meth_get_init(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_init() argument
1849 *pinit = pmeth->init; in EVP_PKEY_meth_get_init()
1852 void EVP_PKEY_meth_get_copy(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_copy() argument
1856 *pcopy = pmeth->copy; in EVP_PKEY_meth_get_copy()
1859 void EVP_PKEY_meth_get_cleanup(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_cleanup() argument
1862 *pcleanup = pmeth->cleanup; in EVP_PKEY_meth_get_cleanup()
1865 void EVP_PKEY_meth_get_paramgen(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_paramgen() argument
1871 *pparamgen_init = pmeth->paramgen_init; in EVP_PKEY_meth_get_paramgen()
1873 *pparamgen = pmeth->paramgen; in EVP_PKEY_meth_get_paramgen()
1876 void EVP_PKEY_meth_get_keygen(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_keygen() argument
1882 *pkeygen_init = pmeth->keygen_init; in EVP_PKEY_meth_get_keygen()
1884 *pkeygen = pmeth->keygen; in EVP_PKEY_meth_get_keygen()
1887 void EVP_PKEY_meth_get_sign(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_sign() argument
1895 *psign_init = pmeth->sign_init; in EVP_PKEY_meth_get_sign()
1897 *psign = pmeth->sign; in EVP_PKEY_meth_get_sign()
1900 void EVP_PKEY_meth_get_verify(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_verify() argument
1909 *pverify_init = pmeth->verify_init; in EVP_PKEY_meth_get_verify()
1911 *pverify = pmeth->verify; in EVP_PKEY_meth_get_verify()
1914 void EVP_PKEY_meth_get_verify_recover(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_verify_recover() argument
1927 *pverify_recover_init = pmeth->verify_recover_init; in EVP_PKEY_meth_get_verify_recover()
1929 *pverify_recover = pmeth->verify_recover; in EVP_PKEY_meth_get_verify_recover()
1932 void EVP_PKEY_meth_get_signctx(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_signctx() argument
1941 *psignctx_init = pmeth->signctx_init; in EVP_PKEY_meth_get_signctx()
1943 *psignctx = pmeth->signctx; in EVP_PKEY_meth_get_signctx()
1946 void EVP_PKEY_meth_get_verifyctx(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_verifyctx() argument
1955 *pverifyctx_init = pmeth->verifyctx_init; in EVP_PKEY_meth_get_verifyctx()
1957 *pverifyctx = pmeth->verifyctx; in EVP_PKEY_meth_get_verifyctx()
1960 void EVP_PKEY_meth_get_encrypt(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_encrypt() argument
1969 *pencrypt_init = pmeth->encrypt_init; in EVP_PKEY_meth_get_encrypt()
1971 *pencryptfn = pmeth->encrypt; in EVP_PKEY_meth_get_encrypt()
1974 void EVP_PKEY_meth_get_decrypt(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_decrypt() argument
1983 *pdecrypt_init = pmeth->decrypt_init; in EVP_PKEY_meth_get_decrypt()
1985 *pdecrypt = pmeth->decrypt; in EVP_PKEY_meth_get_decrypt()
1988 void EVP_PKEY_meth_get_derive(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_derive() argument
1995 *pderive_init = pmeth->derive_init; in EVP_PKEY_meth_get_derive()
1997 *pderive = pmeth->derive; in EVP_PKEY_meth_get_derive()
2000 void EVP_PKEY_meth_get_ctrl(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_ctrl() argument
2008 *pctrl = pmeth->ctrl; in EVP_PKEY_meth_get_ctrl()
2010 *pctrl_str = pmeth->ctrl_str; in EVP_PKEY_meth_get_ctrl()
2013 void EVP_PKEY_meth_get_digestsign(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_digestsign() argument
2018 *digestsign = pmeth->digestsign; in EVP_PKEY_meth_get_digestsign()
2021 void EVP_PKEY_meth_get_digestverify(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_digestverify() argument
2027 *digestverify = pmeth->digestverify; in EVP_PKEY_meth_get_digestverify()
2030 void EVP_PKEY_meth_get_check(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_check() argument
2034 *pcheck = pmeth->check; in EVP_PKEY_meth_get_check()
2037 void EVP_PKEY_meth_get_public_check(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_public_check() argument
2041 *pcheck = pmeth->public_check; in EVP_PKEY_meth_get_public_check()
2044 void EVP_PKEY_meth_get_param_check(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_param_check() argument
2048 *pcheck = pmeth->param_check; in EVP_PKEY_meth_get_param_check()
2051 void EVP_PKEY_meth_get_digest_custom(const EVP_PKEY_METHOD *pmeth, in EVP_PKEY_meth_get_digest_custom() argument
2056 *pdigest_custom = pmeth->digest_custom; in EVP_PKEY_meth_get_digest_custom()