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

Add capability to load symbols from current executable #230

Merged
merged 4 commits into from
Oct 28, 2024

Conversation

EliseChouleur
Copy link
Contributor

If PKCS#11 symbols are available inside the current executable as it can be necessary for iOS development.

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 for the PR!

I am curious, in which context would the library be contained in the executable? In case it has been statically linked 🤔?

Also wondering if instead of changing the interface and introducing the new LibLoadingType we could create a new constructor, like new_from_self which would do the same :) What do you think?

@wiktor-k
Copy link
Collaborator

I agree with @hug-dev that this can be simplified. Btw, I'm on mobile, isn't the libloading dep missing from cargo.toml?

The idea behind the change is good though!

@EliseChouleur
Copy link
Contributor Author

Thanks for the PR!

I am curious, in which context would the library be contained in the executable? In case it has been statically linked 🤔?

Also wondering if instead of changing the interface and introducing the new LibLoadingType we could create a new constructor, like new_from_self which would do the same :) What do you think?

Yes when it's statically linked, which is mandatory on iOS when following the AppStore rules :)
I was hesitating between different approch when searching on how to add this feature and the duplication of the new function was one of them, so I've changed it to that.

@EliseChouleur
Copy link
Contributor Author

I agree with @hug-dev that this can be simplified. Btw, I'm on mobile, isn't the libloading dep missing from cargo.toml?

The idea behind the change is good though!

We were already using this on iOS and Android with the old rust-pkcs11 crate (but never merged on upstream), so it's working well. And I've tested it on a real device ;)

@wiktor-k
Copy link
Collaborator

This is shaping really nicely 👌

I won't be able to look at it deeply before Monday, though :(

Signed-off-by: Elise Chouleur <[email protected]>
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 👍 thanks!

cryptoki/src/context/mod.rs Show resolved Hide resolved
@EliseChouleur
Copy link
Contributor Author

Could you tell me what's happening next ? Or more precisely, what could be the ETA of an official release with this version ? :)
Thanks a lot !

@hug-dev hug-dev merged commit b63539d into parallaxsecond:main Oct 28, 2024
7 checks passed
@hug-dev
Copy link
Member

hug-dev commented Oct 28, 2024

what could be the ETA of an official release with this version

We have no schedule set! It's all based on demand. Since the last release was in June and we got quite a lot of contributions recently, I guess we could make a new version if you wanted!

@EliseChouleur EliseChouleur deleted the static-bindings branch October 28, 2024 13:53
@wiktor-k
Copy link
Collaborator

I guess we could make a new version if you wanted!

I think it's a good idea. As you've said we have quite a lot of good contributions piled-up in main that people may wait for 👍

@hug-dev
Copy link
Member

hug-dev commented Oct 29, 2024

We can maybe announce in the community channel that a new release will be done in like two weeks, so that people have time to push in more changes before the release?

@wiktor-k
Copy link
Collaborator

We can maybe announce in the community channel that a new release will be done in like two weeks, so that people have time to push in more changes before the release?

Yes, excellent idea! :)

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