yubico-piv-tool
yubico-piv-tool copied to clipboard
Building and using ykcs11 on Windows Arm
I am using a Lenovo x13s. I had previously used ykcs11
with ssh for accessing servers on an x64 machine. I was unable to use any of the prebuilt binaries as the pre-installed ssh agent would refuse to load the DLL.
Dependencies
- cmake ( I used
cmake version 3.28.0-rc5
) - vcpkg ( I used
vcpkg package management program version 2023-11-16-4c1df40a3c5c5e18de299a99e9accb03c2a82e1e
) - getopt (vcpkg) ( I used
getopt-win32:arm64-windows 1.1.0.20220925
which was brought in fromgetopt:arm64-windows 0#3
) - openssl (vcpkg) ( I used
openssl:arm64-windows 3.1.4#1
Quick Steps
- Install cmake
- Install vcpkg
-
vcpkg.exe install getopt
-
vcpkg.exe install openssl
-
$env:OPENSSL_ROOT_DIR ="vcpkg/packages/openssl_arm64-windows"
- Follow the directions in the README using something like the following command for cmake the first time
-
cmake -A arm64 -DGETOPT_LIB_DIR="../../vcpkg/packages/getopt-win32_arm64-windows/lib" -DGETOPT_INCLUDE_DIR="../../vcpkg/packages/getopt-win32_arm64-windows/include" ..
-
-
cmake --build .
I have not tried to build a non-debug version. I copied the following DLLs as well as the artifacts with the same name into a folder in program files which was added to the path as seen in the directions for using ykcs11. Some of them are found in the vcpkg packages directory
- getopt.dll
- libcypto-3-arm64.dll
- libykcs11.dll
- libykpiv.dll
- yubico-piv-tool.exe
Honestly, I'm not sure what all files are needed exactly but, this has it working on my system.
> ssh-add -s "C:/Program Files (Arm)/Yubico/Yubico PIV Tool/bin/libykcs11.dll"
Enter passphrase for PKCS#11:
Card added: C:/Program Files (Arm)/Yubico/Yubico PIV Tool/bin/libykcs11.dll
If anyone has trouble, I do not mind answering questions. I cannot promise responses in a timely fashion.