PKCS#11 library with the simplest possible implementation
EMPTY-PKCS11 is minimalistic C library that implements PKCS#11 v3.1 API in the simplest possible way - all PKCS#11 functions except C_GetFunctionList
, C_GetInterfaceList
and C_GetInterface
return CKR_FUNCTION_NOT_SUPPORTED
return value.
It has been tested on several desktop and mobile platforms and as such can be used as a lightweight skeleton for the development of portable PKCS#11 libraries.
Signed precompiled binaries as well as source code releases can be downloaded from releases page.
Archives with source code are signed with GnuPG key of Jaroslav Imrich.
Windows libraries are signed with code-signing certificate of Jaroslav Imrich.
Execute the build script on a 64-bit Windows machine with Visual Studio 2022 Community (or newer) installed:
cd build/windows/
build.bat
The script should use Visual Studio to build both 32-bit (empty-pkcs11-x86.dll
) and 64-bit (empty-pkcs11-x64.dll
) versions of the library.
Execute the build script on a 64-bit Linux machine with GCC, GNU Make and GCC multilib support installed (available in build-essential and gcc-multilib packages on Ubuntu 24.04 LTS):
cd build/linux/
sh build.sh
The script should use GCC to build both 32-bit (empty-pkcs11-x86.so
) and 64-bit (empty-pkcs11-x64.so
) versions of the library.
Execute the build script on a 64-bit macOS machine with Xcode and its "Command Line Tools" extension installed:
cd build/macos/
sh build.sh
The script should use Clang to build Mach-O universal binary (empty-pkcs11.dylib
) usable on both Apple silicon and Intel-based Mac computers.
Execute the build script on a 64-bit Windows machine with Android NDK r26d (or newer) unpacked in C:\android-ndk
folder:
cd build/android/
build.bat
The script should use Android NDK to build the library for all supported architectures. Results will be located in libs
directory and its subdirectories.
Execute the build script on a 64-bit macOS machine with Xcode and its "Command Line Tools" extension installed:
cd build/ios/
sh build.sh
The script should use Xcode to build the library with iphonesimulator SDK (libempty-pkcs11-iphonesimulator.a
) and iphoneos SDK (libempty-pkcs11-iphoneos.a
).
EMPTY-PKCS11 is available under the terms of the Apache License, Version 2.0.
Human friendly license summary is available at tldrlegal.com but the full license text always prevails.
EMPTY-PKCS11 has been developed as a part of Pkcs11Interop project by Jaroslav Imrich.
Please visit project website - pkcs11interop.net - for more information.