FOSS version of pkcs11 headers packaged for the zig build system.
- Fetch:
zig fetch --save git+https://github.com/say-fish/zcryptoki
- Add it to your build system:
const zcryptoki = b.dependency("zcryptoki", .{
.target = target,
.optimize = optimize,
.version = .@"3.1", // pkcs11 version: optional, defaults to 3.1
.deprecated = false, // where to enable deprecated features, defaults to false
});
- Use it:
const cki = @import("zcryptoki");
cki.CK_OBJECT_HANDLE
...