Skip to content

Commit

Permalink
Use a genereic mechanism to block calls to tokens
Browse files Browse the repository at this point in the history
And use this mechanism to reimplement the no_operation_state quirk.

Signed-off-by: Simo Sorce <[email protected]>
  • Loading branch information
simo5 committed Apr 12, 2024
1 parent f3d6bab commit b9e3fdf
Show file tree
Hide file tree
Showing 8 changed files with 383 additions and 25 deletions.
9 changes: 2 additions & 7 deletions src/digests.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,8 @@ static void *p11prov_digest_dupctx(void *ctx)
dctx->session = NULL;

/* NOTE: most tokens will probably return errors trying to do this on digest
* sessions. If the configuration indicates that GetOperationState will fail
* we don't even try to duplicate the context. */

if (p11prov_ctx_no_operation_state(dctx->provctx)) {
goto done;
}

* sessions. If GetOperationState fails we don't even try to duplicate the
* context. */
ret = p11prov_GetOperationState(dctx->provctx, sess, NULL_PTR, &state_len);
if (ret != CKR_OK) {
goto done;
Expand Down
Loading

0 comments on commit b9e3fdf

Please sign in to comment.