Lines Matching defs:pctx

4674     EVP_PKEY_CTX *pctx = NULL;
4679 pctx = EVP_PKEY_CTX_new_from_pkey(s->ctx->libctx, pm, s->ctx->propq);
4680 if (pctx == NULL)
4682 if (EVP_PKEY_keygen_init(pctx) <= 0)
4684 if (EVP_PKEY_keygen(pctx, &pkey) <= 0) {
4690 EVP_PKEY_CTX_free(pctx);
4698 EVP_PKEY_CTX *pctx = NULL;
4706 pctx = EVP_PKEY_CTX_new_from_name(s->ctx->libctx, ginf->algorithm,
4709 if (pctx == NULL) {
4713 if (EVP_PKEY_keygen_init(pctx) <= 0) {
4717 if (EVP_PKEY_CTX_set_group_name(pctx, ginf->realname) <= 0) {
4721 if (EVP_PKEY_keygen(pctx, &pkey) <= 0) {
4728 EVP_PKEY_CTX_free(pctx);
4737 EVP_PKEY_CTX *pctx = NULL;
4744 pctx = EVP_PKEY_CTX_new_from_name(s->ctx->libctx, ginf->algorithm,
4747 if (pctx == NULL)
4749 if (EVP_PKEY_paramgen_init(pctx) <= 0)
4751 if (EVP_PKEY_CTX_set_group_name(pctx, ginf->realname) <= 0) {
4755 if (EVP_PKEY_paramgen(pctx, &pkey) <= 0) {
4761 EVP_PKEY_CTX_free(pctx);
4797 EVP_PKEY_CTX *pctx;
4804 pctx = EVP_PKEY_CTX_new_from_pkey(s->ctx->libctx, privkey, s->ctx->propq);
4806 if (EVP_PKEY_derive_init(pctx) <= 0
4807 || EVP_PKEY_derive_set_peer(pctx, pubkey) <= 0
4808 || EVP_PKEY_derive(pctx, NULL, &pmslen) <= 0) {
4814 EVP_PKEY_CTX_set_dh_pad(pctx, 1);
4822 if (EVP_PKEY_derive(pctx, pms, &pmslen) <= 0) {
4840 EVP_PKEY_CTX_free(pctx);
4852 EVP_PKEY_CTX *pctx;
4859 pctx = EVP_PKEY_CTX_new_from_pkey(s->ctx->libctx, privkey, s->ctx->propq);
4861 if (EVP_PKEY_decapsulate_init(pctx, NULL) <= 0
4862 || EVP_PKEY_decapsulate(pctx, NULL, &pmslen, ct, ctlen) <= 0) {
4873 if (EVP_PKEY_decapsulate(pctx, pms, &pmslen, ct, ctlen) <= 0) {
4891 EVP_PKEY_CTX_free(pctx);
4902 EVP_PKEY_CTX *pctx;
4909 pctx = EVP_PKEY_CTX_new_from_pkey(s->ctx->libctx, pubkey, s->ctx->propq);
4911 if (EVP_PKEY_encapsulate_init(pctx, NULL) <= 0
4912 || EVP_PKEY_encapsulate(pctx, NULL, &ctlen, NULL, &pmslen) <= 0
4925 if (EVP_PKEY_encapsulate(pctx, ct, &ctlen, pms, &pmslen) <= 0) {
4951 EVP_PKEY_CTX_free(pctx);