Lines Matching defs:ctx
67 pkey_cmac_init(EVP_PKEY_CTX *ctx)
69 ctx->data = CMAC_CTX_new();
70 if (!ctx->data)
72 ctx->keygen_info_count = 0;
87 pkey_cmac_cleanup(EVP_PKEY_CTX *ctx)
89 CMAC_CTX_free(ctx->data);
93 pkey_cmac_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
100 if (!CMAC_CTX_copy(cmkey, ctx->data))
115 int_update(EVP_MD_CTX *ctx, const void *data, size_t count)
117 if (!CMAC_Update(ctx->pctx->data, data, count))
123 cmac_signctx_init(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx)
131 cmac_signctx(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
134 return CMAC_Final(ctx->data, sig, siglen);
138 pkey_cmac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
140 CMAC_CTX *cmctx = ctx->data;
156 if (ctx->pkey && !CMAC_CTX_copy(ctx->data, ctx->pkey->pkey.ptr))
169 pkey_cmac_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value)
175 return pkey_cmac_ctrl(ctx, EVP_PKEY_CTRL_SET_MAC_KEY,
184 return pkey_cmac_ctrl(ctx, EVP_PKEY_CTRL_CIPHER, -1, (void *)c);
194 r = pkey_cmac_ctrl(ctx, EVP_PKEY_CTRL_SET_MAC_KEY, keylen, key);