Hardware Key Usage
LicenseSpring allows users to bind licenses to a YubiKey hardware key dongle.
Prerequisites
Make sure to set up a YubiKey on the LicenseSpring platform and the LicenseSpring Provisioning Application for Desktop. See Hardware Key Licensing for instructions.
C++ Platform-specific Library Placement
Since C++ SDK v7.37.0, we provide both LicenseSpring SDK libs that do link, and that don't link to libykpiv. All samples also have multiple configurations, with and without linking to libykpiv.
Linux & macOS
Shared libraries are located in
bin/shared_HardwareKeyStatic libraries are located in
bin/static_HardwareKeyNote: The existing
bin/sharedandbin/staticfolders remain unchanged and do not link tolibykpiv.
Linux ARM (i.e. ARM without hf support), ppc64le
SDK builds targeting arm and ppc64le architectures do not link tl
libykpiv(no hardware key support).
MSVC (Windows)
Dynamic libraries are located in
bin/dynamic_HardwareKeyStatic linking to
libykpivis not supported.The existing
bin/dynamicfolder remains unchanged and does not link tolibykpiv.
MinGW
We currently don't support hardware
The libykpiv library has an external dependency which should be installed on user machines:
• Linux uses the pcsc backend (via pcsclite) to manage the YubiKey, • macOS uses the macscard backend (Apple’s built‑in PC/SC layer, pcsclite daemon), • Windows (MSVC targets) uses the winscard backend (Microsoft’s WinSCard API).
Usage samples
Calling ExtendedOptions::setHardwareKeyOptions automatically sets the machine hardware ID to the serial of the Yubikey.
Afterwards, all calls to the License API require that YubiKey to be plugged in, and License::localCheck will throw an appropriate LicenseSpring::HardwareKeyException exception in case the YubiKey is not plugged in.
Was this helpful?