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

p11-kit/pkcs11x.h:230:7: error: unknown type name 'CK_OBJECT_HANDLE' #419

Closed
zs70108 opened this issue Jun 7, 2022 · 5 comments · Fixed by #421
Closed

p11-kit/pkcs11x.h:230:7: error: unknown type name 'CK_OBJECT_HANDLE' #419

zs70108 opened this issue Jun 7, 2022 · 5 comments · Fixed by #421
Labels
Milestone

Comments

@zs70108
Copy link

zs70108 commented Jun 7, 2022

No description provided.

@ueno
Copy link
Member

ueno commented Jun 7, 2022

Could you give us a bit more context how you got this error? I suppose it might be related to CRYPTOKI_GNU macro.

@zs70108
Copy link
Author

zs70108 commented Jun 8, 2022

I try to build gnutls-3.6.16 and notice:

configure: error: 
***
*** p11-kit >= 0.23.1 was not found. To disable PKCS #11 support
*** use --without-p11-kit, otherwise you may get p11-kit from
*** https://p11-glue.freedesktop.org/p11-kit.html
*** 

Then I make install p11-kit, ./configure gnutls and make it.

In file included from pkcs11x.h:24:0,
                 from pkcs11.c:38:
/usr/local/include/p11-kit-1/p11-kit/pkcs11x.h:230:7: error: unknown type name 'CK_OBJECT_HANDLE'
       CK_OBJECT_HANDLE hSignVerifyKey;
       ^~~~~~~~~~~~~~~~
Makefile:2276: recipe for target 'pkcs11.lo' failed
make[4]: *** [pkcs11.lo] Error 1

emmm, I think gnutls-3.6.16 do not update or I do something wrong.
The macro defined in pkcs11.h

image

@ueno ueno added the bug label Jun 8, 2022
@ueno
Copy link
Member

ueno commented Jun 8, 2022

Thanks! So it's indeed an issue when CRYPTOKI_GNU is defined, and the solution would be to replace CK_OBJECT_HANDLE in common/pkcs11x.h with ck_object_handle_t. It is really nice that the issue was caught before new release :-)

@schopin-pro
Copy link

We've cherry-picked the various IBM patches in Ubuntu's p11-kit including the one in #421, and this issue still manifests:

https://launchpadlibrarian.net/625442110/buildlog_ubuntu-kinetic-amd64.gnutls28_3.7.7-2ubuntu1_BUILDING.txt.gz

@ueno
Copy link
Member

ueno commented Sep 27, 2022

@schopin-pro #424 is also needed

@ueno ueno added this to the 0.25.0 milestone Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants