Comments (7)
I can't say I'm running into this ... what's your pkcs#11 setup? (version, module, etc.)
from rust-pkcs11.
I run it with SoftHSM v2.4.0, compiled with rustc 1.26.0-nightly on MacOS 10.13.3
from rust-pkcs11.
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.
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.
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.
@mon interesting ... can you point me to that part of the documentation?
from rust-pkcs11.
@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)
- About the safety of `CK_ATTRIBUTE::get_bytes` HOT 6
- Mutability compile errors HOT 2
- Crash on initialize HOT 7
- How to use it with a different SHM HOT 4
- Safety of types containing raw pointers and methods using them HOT 15
- Support for partial implementations HOT 3
- CK_ATTRIBUTE get_biginteger mixes up endianness HOT 4
- Disabling of compiler optimizations needed to prevent non-null `pReserved` when invoking `C_Initialize()`. HOT 2
- `ctx.open_session` against Luna Network HSM crashed with SIGSEGV HOT 2
- Unknown error code from `Ctx::new()` on ARMv7 when calling the PKCS#11 `C_GetFunctionList()` function. HOT 3
- Change `Ctx::generate_random` to take the buffer to be filled instead of generating the buffer from a given size HOT 1
- possible segmentation fault HOT 1
- Unsound transmute_copy in `attr_ck_long`, `get_date`, `attr_ck_ulong`
- Report as unmaintained? HOT 1
- latest code not available in https://crates.io/ HOT 7
- Ctx::new should take a &Path HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-pkcs11.