Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

pkcs11: Cast directly to target types for improved 32-bit support #283

Closed
wants to merge 2 commits into from

Conversation

LoganK
Copy link

@LoganK LoganK commented Sep 8, 2019

kr, krd, and krssh are both working on a Raspberry Pi 4 after these edits.

Resolves #89

Logan Kennelly added 2 commits September 7, 2019 16:55
The source type of the session allocator, usize, is variable, as is the
destination type of c_ulong. The current usize -> u64 ->(implicit) c_ulong can
fail on some systems (e.g., Raspberry Pi uses a 32-bit c_ulong).

PKCS kryptco#11 requires only that the size type be at least 32 bits. Casting directly
to the destination type allows for greater platform support without affecting
existing platforms.

I agree to license all rights to my contributions in each modified file exclusively to KryptCo, Inc.

Resolves kryptco#89
The implicit conversion from u64 to c_ulong fails on 32-bit platforms. The
actual array size is 2 and unlikely to every pose a problem.

I agree to license all rights to my contributions in each modified file exclusively to KryptCo, Inc.

Resolves kryptco#89
@LoganK
Copy link
Author

LoganK commented Sep 8, 2019

I know the README says 32-bit platforms are not supported, but it would be great if you could at least compile your own tools (and the changes are relatively innocuous).

@agrinman
Copy link
Contributor

@LoganK we're no longer using the pkcs11 module. It's removed from current master so please give it a try.

@agrinman agrinman closed this Oct 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support raspberry pi
2 participants