Note: This project is still WIP.
Install Visual Studio 2022 with:
- Desktop development with C++
- Clang Support
- Windows Driver Kit (download from here)
You can configure the project with CMake (or use Visual Studio GUI).
You must you clang-cl as frontend, or thirdpart/dbg.h
will fail to compile.
After successful build, you will get canokey_minidriver.{inf,dll}
in your build output directory.
- Before loading the mini driver, you should enable test signing mode and reboot.
- Right-click on
canokey_minidriver.inf
and selectInstall
, then ignore any warnings. - Insert your CanoKey, go to Device Manager - Smart card readers. If Microsoft driver is loaded, right-click and select "Update driver" - "Browse my computer for drivers" and select "Let me pick from a list of available drivers on my computer", then select "CanoKey Mini Driver".
- Unplug and reinsert your CanoKey, you should now see log files under
C:\Logs\
.
If you would like to test a new version, you should uninstall the old driver first.
To do so, right-click on canokey_minidriver.inf
and select Uninstall
, check "Delete the driver software for this device" and click OK
.
Then you can install the new version and test again.
If you encounter any strange problems, you may try to (in order):
- Re-plug your CanoKey.
- Uninstall and reinstall the driver.
- Restart the
CertPropSvc
service (espcially when you cannot read or delete the log files). - Reboot your computer.