Yubico / yubikey-personalization

YubiKey Personalization cross-platform library and tool
https://developers.yubico.com/yubikey-personalization/
BSD 2-Clause "Simplified" License
299 stars 82 forks source link

libykpers-1 doesn't detect YubiKey when executed on different system than it was compiled (as AppImage) #108

Closed phoerious closed 6 years ago

phoerious commented 6 years ago

We are shipping libykpers-1 as bundled dependency inside our KeePassXC (https://github.com/keepassxreboot/keepassxc) AppImage (https://appimage.org/). Our AppImages are built on Ubuntu 14.04 or CentOS 7 (Dockerfile).

Unfortunately, libykpers-1 fails to detect an inserted YubiKey when the AppImage is executed, but doesn't give an error either. An AppImage built on the same system on which it is executed (tried it on Arch Linux), detects my YubiKey successfully. Switching out the library inside the AppImage or not bundling it, so the library from the host system is used, does the same.

I tried to work out the problem with the AppImage maintainer, but we came to the conclusion that this is not an AppImage bug, but rather a problem with the library itself. I checked the binary for hard-coded paths, but couldn't find any. The problem also occurs with a custom libykpers build of the latest version.

You can find our AppImages for testing on our releases page

phoerious commented 6 years ago

It appears that I jumped the gun a little. There is indeed a problem, but it seems to be a bit circumstantial. I managed to get it working with our new CentOS build system and custom builds of libyubikey and libykpers-1. I cannot, however, get it working with Ubuntu 14.04 (at least not with the packages from the repositories).

I'm closing this, as I have a working AppImage now. However, if someone else has similar problems or an explanation what the actual problem was, please let me know.