Lines Matching defs:dctx
134 pkcs11gost_createctx_sign(dst_key_t *key, dst_context_t *dctx) {
163 pk11_ctx = (pk11_context_t *) isc_mem_get(dctx->mctx,
185 keyTemplate[6].pValue = isc_mem_get(dctx->mctx,
208 dctx->ctxdata.pk11_ctx = pk11_ctx;
214 isc_mem_put(dctx->mctx,
228 isc_mem_put(dctx->mctx,
234 isc_mem_put(dctx->mctx, pk11_ctx, sizeof(*pk11_ctx));
240 pkcs11gost_createctx_verify(dst_key_t *key, dst_context_t *dctx) {
268 pk11_ctx = (pk11_context_t *) isc_mem_get(dctx->mctx,
290 keyTemplate[5].pValue = isc_mem_get(dctx->mctx,
313 dctx->ctxdata.pk11_ctx = pk11_ctx;
319 isc_mem_put(dctx->mctx,
333 isc_mem_put(dctx->mctx,
339 isc_mem_put(dctx->mctx, pk11_ctx, sizeof(*pk11_ctx));
345 pkcs11gost_createctx(dst_key_t *key, dst_context_t *dctx) {
346 if (dctx->use == DO_SIGN)
347 return (pkcs11gost_createctx_sign(key, dctx));
349 return (pkcs11gost_createctx_verify(key, dctx));
353 pkcs11gost_destroyctx(dst_context_t *dctx) {
354 pk11_context_t *pk11_ctx = dctx->ctxdata.pk11_ctx;
363 isc_mem_put(dctx->mctx, pk11_ctx, sizeof(*pk11_ctx));
364 dctx->ctxdata.pk11_ctx = NULL;
369 pkcs11gost_adddata(dst_context_t *dctx, const isc_region_t *data) {
371 pk11_context_t *pk11_ctx = dctx->ctxdata.pk11_ctx;
374 if (dctx->use == DO_SIGN)
390 pkcs11gost_sign(dst_context_t *dctx, isc_buffer_t *sig) {
394 pk11_context_t *pk11_ctx = dctx->ctxdata.pk11_ctx;
414 pkcs11gost_verify(dst_context_t *dctx, const isc_region_t *sig) {
416 pk11_context_t *pk11_ctx = dctx->ctxdata.pk11_ctx;