Giter VIP home page Giter VIP logo

Comments (5)

ximon18 avatar ximon18 commented on June 14, 2024 1

Note: Please don't block an 0.3.0 release on this point.

from rust-cryptoki.

ximon18 avatar ximon18 commented on June 14, 2024 1

Minor update: I've modified our code to test if finalizing and re-initializing works with cryptoki with the same benefit that I saw with the pkcs11 crate but I've run out of time for today and am not working tomorrow, so actual testing will have to wait until next week.

from rust-cryptoki.

ionut-arm avatar ionut-arm commented on June 14, 2024

I discovered that calling C_Finalize() and then C_Initialize() again would "flush" this cache and permit Krill to connect to the HSM without requiring a restart of Krill.

Hmmm, as far as I know, we call finalize on the open context when it's dropped, and so our "public" version of finalize just takes ownership of the context and drops it. Presumably what you'd need is a method that calls finalize while allowing the user to keep ownership of the context?

from rust-cryptoki.

ximon18 avatar ximon18 commented on June 14, 2024

Yes, previously I could call finalize and still have the context and call initialize on it again, now I cannot do that. I expect I can change my code to be able to create a whole new context instance but if it's a valid pattern to finalize and re-initialize and if it is valid per the PKCS#11 spec and it actually has real world value then an alternate model that permits ownership to be retained might be good to have.

Have you not run in to this same issue yourselves?

from rust-cryptoki.

ximon18 avatar ximon18 commented on June 14, 2024

@ionut-arm: I've tested my changes and it seems to work, thanks!

from rust-cryptoki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.