Skip to content

Construct Pkcs11 from cryptoki_sys::Pkcs11 #366

Description

@robin-nitrokey

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?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions