Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incompatible pointers arguments #430

Closed
wants to merge 1 commit into from

Conversation

Jakuje
Copy link
Contributor

@Jakuje Jakuje commented Sep 11, 2024

The wrapped_obj_len variable on 32b architecture is of a different size than expected by the PKCS #11 API, causing build failures.

In file included from /builddir/build/BUILD/yubihsm-shell-2.6.0-build/yubihsm-shell-2.6.0/pkcs11/tests/asym_wrap_test.c:20: /builddir/build/BUILD/yubihsm-shell-2.6.0-build/yubihsm-shell-2.6.0/pkcs11/tests/asym_wrap_test.c: In function ‘get_wrapped_data’: /builddir/build/BUILD/yubihsm-shell-2.6.0-build/yubihsm-shell-2.6.0/pkcs11/tests/asym_wrap_test.c:344:25: error: passing argument 6 of ‘p11->C_WrapKey’ from incompatible pointer type [-Wincompatible-pointer-types]
  344 |                         wrapped_obj_len) == CKR_OK);
      |                         ^~~~~~~~~~~~~~~
      |                         |
      |                         size_t * {aka unsigned int *}
/builddir/build/BUILD/yubihsm-shell-2.6.0-build/yubihsm-shell-2.6.0/pkcs11/tests/asym_wrap_test.c:344:25: note: expected ‘CK_ULONG_PTR’ {aka ‘long unsigned int *’} but argument is of type ‘size_t *’ {aka ‘unsigned int *’}
/builddir/build/BUILD/yubihsm-shell-2.6.0-build/yubihsm-shell-2.6.0/pkcs11/tests/asym_wrap_test.c:344:25: error: passing argument 6 of ‘p11->C_WrapKey’ from incompatible pointer type [-Wincompatible-pointer-types]
  344 |                         wrapped_obj_len) == CKR_OK);
      |                         ^~~~~~~~~~~~~~~
      |                         |
      |                         size_t * {aka unsigned int *}
/builddir/build/BUILD/yubihsm-shell-2.6.0-build/yubihsm-shell-2.6.0/pkcs11/tests/asym_wrap_test.c:344:25: note: expected ‘CK_ULONG_PTR’ {aka ‘long unsigned int *’} but argument is of type ‘size_t *’ {aka ‘unsigned int *’}

The wrapped_obj_len variable on 32b architecture is of a different size
than expected by the PKCS Yubico#11 API, causing build failures.

In file included from /builddir/build/BUILD/yubihsm-shell-2.6.0-build/yubihsm-shell-2.6.0/pkcs11/tests/asym_wrap_test.c:20:
/builddir/build/BUILD/yubihsm-shell-2.6.0-build/yubihsm-shell-2.6.0/pkcs11/tests/asym_wrap_test.c: In function ‘get_wrapped_data’:
/builddir/build/BUILD/yubihsm-shell-2.6.0-build/yubihsm-shell-2.6.0/pkcs11/tests/asym_wrap_test.c:344:25: error: passing argument 6 of ‘p11->C_WrapKey’ from incompatible pointer type [-Wincompatible-pointer-types]
  344 |                         wrapped_obj_len) == CKR_OK);
      |                         ^~~~~~~~~~~~~~~
      |                         |
      |                         size_t * {aka unsigned int *}
/builddir/build/BUILD/yubihsm-shell-2.6.0-build/yubihsm-shell-2.6.0/pkcs11/tests/asym_wrap_test.c:344:25: note: expected ‘CK_ULONG_PTR’ {aka ‘long unsigned int *’} but argument is of type ‘size_t *’ {aka ‘unsigned int *’}
/builddir/build/BUILD/yubihsm-shell-2.6.0-build/yubihsm-shell-2.6.0/pkcs11/tests/asym_wrap_test.c:344:25: error: passing argument 6 of ‘p11->C_WrapKey’ from incompatible pointer type [-Wincompatible-pointer-types]
  344 |                         wrapped_obj_len) == CKR_OK);
      |                         ^~~~~~~~~~~~~~~
      |                         |
      |                         size_t * {aka unsigned int *}
/builddir/build/BUILD/yubihsm-shell-2.6.0-build/yubihsm-shell-2.6.0/pkcs11/tests/asym_wrap_test.c:344:25: note: expected ‘CK_ULONG_PTR’ {aka ‘long unsigned int *’} but argument is of type ‘size_t *’ {aka ‘unsigned int *’}

Signed-off-by: Jakub Jelen <[email protected]>
@qpernil
Copy link
Contributor

qpernil commented Sep 11, 2024

The errors are not related to your fix, just that external PRs don't have access to github secrets.

@qpernil
Copy link
Contributor

qpernil commented Sep 11, 2024

This issue was fixed in #431

@qpernil qpernil closed this Sep 11, 2024
@qpernil
Copy link
Contributor

qpernil commented Sep 11, 2024

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants