Giter VIP home page Giter VIP logo

Comments (7)

mheese avatar mheese commented on June 2, 2024

I can't say I'm running into this ... what's your pkcs#11 setup? (version, module, etc.)

from rust-pkcs11.

bpressure avatar bpressure commented on June 2, 2024

I run it with SoftHSM v2.4.0, compiled with rustc 1.26.0-nightly on MacOS 10.13.3

from rust-pkcs11.

ptescher avatar ptescher commented on June 2, 2024

I am seeing the same problem. Reverting to the previous commit fixes it.

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
    frame #0: 0x000000010001d8cf hsm-signer`pkcs11::Ctx::initialize::hd548bd70b42d3d7e(self=0x00007ffeefbfd7b8, init_args=Option<pkcs11::types::CK_C_INITIALIZE_ARGS> @ 0x00007ffeefbfe330) at lib.rs:280
   277 	        Some(args) => &args,
   278 	        None => ptr::null()
   279 	    };
-> 280 	    match (self.C_Initialize)(init_args) {
   281 	      CKR_OK => {
   282 	        self._is_initialized = true;
   283 	        Ok(())

from rust-pkcs11.

srinivasanraghavan avatar srinivasanraghavan commented on June 2, 2024

I also get the same error in Linux but i use custom a PKCS11 implementation . But i switched back to prev version its working

from rust-pkcs11.

mon avatar mon commented on June 2, 2024

Could you guys try removing the packed attribute on all the internal struct types? Further reading of the cryptoki documentation seems to imply that the structures may not be packed in unix-land.

If that works I can make a commit to make the packed aspect windows-only too

from rust-pkcs11.

mheese avatar mheese commented on June 2, 2024

@mon interesting ... can you point me to that part of the documentation?

from rust-pkcs11.

mon avatar mon commented on June 2, 2024

@mheese from pkcs11.h:

 * In addition to defining these 5 macros, the packing convention
 * for Cryptoki structures should be set.  The Cryptoki
 * convention on packing is that structures should be 1-byte
 * aligned.

.... windows instructions follow, then

 * In a UNIX environment, you're on your own for this.  You might
 * not need to do (or be able to do!) anything.

from rust-pkcs11.

Related Issues (17)

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.