Lines Matching defs:dctx
69 pkcs11ecdsa_createctx(dst_key_t *key, dst_context_t *dctx) {
77 REQUIRE(dctx->key->key_alg == DST_ALG_ECDSA256 ||
78 dctx->key->key_alg == DST_ALG_ECDSA384);
81 if (dctx->key->key_alg == DST_ALG_ECDSA256)
86 pk11_ctx = (pk11_context_t *) isc_mem_get(dctx->mctx,
91 if (ec->ontoken && (dctx->use == DO_SIGN))
101 dctx->ctxdata.pk11_ctx = pk11_ctx;
107 isc_mem_put(dctx->mctx, pk11_ctx, sizeof(*pk11_ctx));
113 pkcs11ecdsa_destroyctx(dst_context_t *dctx) {
116 pk11_context_t *pk11_ctx = dctx->ctxdata.pk11_ctx;
118 REQUIRE(dctx->key->key_alg == DST_ALG_ECDSA256 ||
119 dctx->key->key_alg == DST_ALG_ECDSA384);
126 isc_mem_put(dctx->mctx, pk11_ctx, sizeof(*pk11_ctx));
127 dctx->ctxdata.pk11_ctx = NULL;
132 pkcs11ecdsa_adddata(dst_context_t *dctx, const isc_region_t *data) {
134 pk11_context_t *pk11_ctx = dctx->ctxdata.pk11_ctx;
137 REQUIRE(dctx->key->key_alg == DST_ALG_ECDSA256 ||
138 dctx->key->key_alg == DST_ALG_ECDSA384);
150 pkcs11ecdsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
170 pk11_context_t *pk11_ctx = dctx->ctxdata.pk11_ctx;
171 dst_key_t *key = dctx->key;
209 keyTemplate[5].pValue = isc_mem_get(dctx->mctx,
219 keyTemplate[6].pValue = isc_mem_get(dctx->mctx,
259 isc_mem_put(dctx->mctx,
265 isc_mem_put(dctx->mctx, pk11_ctx, sizeof(*pk11_ctx));
266 dctx->ctxdata.pk11_ctx = NULL;
272 pkcs11ecdsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
291 pk11_context_t *pk11_ctx = dctx->ctxdata.pk11_ctx;
292 dst_key_t *key = dctx->key;
316 keyTemplate[5].pValue = isc_mem_get(dctx->mctx,
326 keyTemplate[6].pValue = isc_mem_get(dctx->mctx,
361 isc_mem_put(dctx->mctx,
367 isc_mem_put(dctx->mctx, pk11_ctx, sizeof(*pk11_ctx));
368 dctx->ctxdata.pk11_ctx = NULL;