{"action":"created","issue":{"url":"https://api.github.com/repos/Yubico/yubico-piv-tool/issues/47","labels_url":"https://api.github.com/repos/Yubico/yubico-piv-tool/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/Yubico/yubico-piv-tool/issues/47/comments","events_url":"https://api.github.com/repos/Yubico/yubico-piv-tool/issues/47/events","html_url":"https://github.com/Yubico/yubico-piv-tool/issues/47","id":120468431,"number":47,"title":"ykcs11 library reports incorrect hardcoded token serial number","user":{"login":"denisenkom","id":2815692,"avatar_url":"https://avatars.githubusercontent.com/u/2815692?v=3","gravatar_id":"","url":"https://api.github.com/users/denisenkom","html_url":"https://github.com/denisenkom","followers_url":"https://api.github.com/users/denisenkom/followers","following_url":"https://api.github.com/users/denisenkom/following{/other_user}","gists_url":"https://api.github.com/users/denisenkom/gists{/gist_id}","starred_url":"https://api.github.com/users/denisenkom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisenkom/subscriptions","organizations_url":"https://api.github.com/users/denisenkom/orgs","repos_url":"https://api.github.com/users/denisenkom/repos","events_url":"https://api.github.com/users/denisenkom/events{/privacy}","received_events_url":"https://api.github.com/users/denisenkom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-04T19:21:13Z","updated_at":"2015-12-15T18:18:01Z","closed_at":null,"body":"\r\n```\r\npkcs11-tool --module libykcs11.dylib -T\r\n```\r\n\r\n```\r\n  token label        : YubiKey PIV\r\n  token manufacturer : Yubico\r\n  token model        : YubiKey YK4\r\n  token flags        : rng, login required, PIN initialized, token initialized\r\n  hardware version   : 0.0\r\n  firmware version   : 4.206\r\n  serial num         : 1234\r\n```\r\n\r\nHere serial number is reported as 1234 which is incorrect.\r\n\r\nI've found that another library: libykneomgr is reporting correct serial number.  I tried sending same APDU command as libykneomgr: ``\"\\x00\\x01\\x10\\x00\"`` but token doesn't report serial number when this command is called from ykcs11.  Is there a documentation on APDU commands supported by Yubikey?"},"comment":{"url":"https://api.github.com/repos/Yubico/yubico-piv-tool/issues/comments/164846425","html_url":"https://github.com/Yubico/yubico-piv-tool/issues/47#issuecomment-164846425","issue_url":"https://api.github.com/repos/Yubico/yubico-piv-tool/issues/47","id":164846425,"user":{"login":"denisenkom","id":2815692,"avatar_url":"https://avatars.githubusercontent.com/u/2815692?v=3","gravatar_id":"","url":"https://api.github.com/users/denisenkom","html_url":"https://github.com/denisenkom","followers_url":"https://api.github.com/users/denisenkom/followers","following_url":"https://api.github.com/users/denisenkom/following{/other_user}","gists_url":"https://api.github.com/users/denisenkom/gists{/gist_id}","starred_url":"https://api.github.com/users/denisenkom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisenkom/subscriptions","organizations_url":"https://api.github.com/users/denisenkom/orgs","repos_url":"https://api.github.com/users/denisenkom/repos","events_url":"https://api.github.com/users/denisenkom/events{/privacy}","received_events_url":"https://api.github.com/users/denisenkom/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T18:18:01Z","updated_at":"2015-12-15T18:18:01Z","body":"So what do you think about implementing it in the same way libykneomgr is doing it?\r\n\r\nI actually tried it as I wrote initially but it didn't work:\r\n> I've found that another library: libykneomgr is reporting correct serial number. I tried sending same APDU command as libykneomgr: \"\\x00\\x01\\x10\\x00\" but token doesn't report serial number when this command is called from ykcs11. Is there a documentation on APDU commands supported by Yubikey?"}}