parallaxsecond / parallaxsecond/rust-cryptoki
Construct Pkcs11 from cryptoki_sys::Pkcs11
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 115
- Forks
- 96
- Avg merge
- 22h 56m
- Merged PRs (30d)
- 2
Description
Hi! I’d like to use cryptoki to test a PKCS11 module that is written in Rust. As far as I see, I currently have to compile the module to a binary and then load it with cryptoki::context::Pkcs11::new. Internally, this function constructs a cryptoki_sys::Pkcs11 instance from the loaded library and passes it to cryptoki::context::Pkcs11::_new. I think I should be able to construct the cryptoki_sys::Pkcs11 directly using function pointers to the Rust implementation, avoiding the additional compilation step. Would you accept a PR to make Pkcs11::_new part of the public API, maybe as Pkcs11::new_from_sys or Pkcs11::new_from_raw?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading cryptoki::context::Pkcs11::new and Pkcs11::_new, including how cryptoki_sys::Pkcs11 is passed between them. Check the surrounding context API and existing tests before deciding how the raw constructor should be exposed. Done means a Rust PKCS#11 implementation can provide function pointers and construct Pkcs11 without compiling and loading a separate binary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100