Skip to content

Commit

Permalink
The spec says the length is the size of the data
Browse files Browse the repository at this point in the history
The current code sets the number of elements as length, but that seems
incorrect.

Fixes #396

Signed-off-by: Simo Sorce <[email protected]>
  • Loading branch information
simo5 committed May 23, 2024
1 parent d8e2823 commit 8198d15
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/keymgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1002,8 +1002,7 @@ static CK_RV set_default_rsapss_mechanisms(struct key_generator *ctx)
return CKR_HOST_MEMORY;
}
memcpy(ctx->data.rsa.allowed_types, rsapss_mechs, sizeof(rsapss_mechs));
ctx->data.rsa.allowed_types_size =
sizeof(rsapss_mechs) / sizeof(CK_MECHANISM_TYPE);
ctx->data.rsa.allowed_types_size = sizeof(rsapss_mechs);

return CKR_OK;
}
Expand Down

0 comments on commit 8198d15

Please sign in to comment.