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

Feat/pkcs11 3.0 #228

Merged
merged 5 commits into from
Oct 22, 2024
Merged

Feat/pkcs11 3.0 #228

merged 5 commits into from
Oct 22, 2024

Conversation

Direktor799
Copy link
Contributor

Replace pkcs11.h with https://github.com/latchset/pkcs11-headers/blob/main/public-domain/3.0/pkcs11.h, which was mentioned in #156.

  • Use latchset PKCS#11 3.0 header
  • Manually specify CK_UNAVAILABLE_INFORMATION due to a bug(i believe) in bindgen
  • Add 3.0 macro definations
  • Enable PKCS11_DEPRECATED for backward compatibility with 2.4
  • Deprecate EC_NAMEDCURVE, replace it with EC_OID

Copy link
Member

@hug-dev hug-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! Excellent as well if this is compatible with 2.4. A few general comments but I am okay otherwise with it!

hug-dev
hug-dev previously approved these changes Oct 22, 2024
Copy link
Member

@hug-dev hug-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to resolve the last comment, if it's not something you were planning to investigate. I think it's fine to go as it is, and I can open an issue for this specific item to be looked at later :)

@Direktor799
Copy link
Contributor Author

Feel free to resolve the last comment, if it's not something you were planning to investigate. I think it's fine to go as it is, and I can open an issue for this specific item to be looked at later :)

I think it's mainly because bindgen doesn't care integer length(only cares about signedness) when generating code for macros, see https://github.com/rust-lang/rust-bindgen/blob/07bbd04ea5f386aa3b83e792548127e2a2e33c43/bindgen/codegen/mod.rs#L705-L709

There are some issues mentioning bindgen generated wrong types with macros, but no issue related to this specific ~0UL case.

Do you want me to open up a new issue?

@Direktor799
Copy link
Contributor Author

@hug-dev also what do you suggest to do with the misspelling in the new header..

@hug-dev
Copy link
Member

hug-dev commented Oct 22, 2024

Thanks for research! I think it's fine as it is, this PR will be the history in case someone wants to look this up.

@hug-dev also what do you suggest to do with the misspelling in the new header..

I think we can add the folder in the ignored here to make it work!

Signed-off-by: Direktor799 <priceclaptrap@hotmail.com>
Signed-off-by: Direktor799 <priceclaptrap@hotmail.com>
Signed-off-by: Direktor799 <priceclaptrap@hotmail.com>
Signed-off-by: Direktor799 <priceclaptrap@hotmail.com>
Signed-off-by: Direktor799 <priceclaptrap@hotmail.com>
Copy link
Collaborator

@wiktor-k wiktor-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@wiktor-k wiktor-k merged commit be13433 into parallaxsecond:main Oct 22, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants