{"action":"created","issue":{"url":"https://api.github.com/repos/OpenSC/OpenSC/issues/368","labels_url":"https://api.github.com/repos/OpenSC/OpenSC/issues/368/labels{/name}","comments_url":"https://api.github.com/repos/OpenSC/OpenSC/issues/368/comments","events_url":"https://api.github.com/repos/OpenSC/OpenSC/issues/368/events","html_url":"https://github.com/OpenSC/OpenSC/pull/368","id":55928472,"number":368,"title":"Prefer serial number from EF(TokenInfo) and cached serials over CARDCTL","user":{"login":"philipWendland","id":3743372,"avatar_url":"https://avatars.githubusercontent.com/u/3743372?v=3","gravatar_id":"","url":"https://api.github.com/users/philipWendland","html_url":"https://github.com/philipWendland","followers_url":"https://api.github.com/users/philipWendland/followers","following_url":"https://api.github.com/users/philipWendland/following{/other_user}","gists_url":"https://api.github.com/users/philipWendland/gists{/gist_id}","starred_url":"https://api.github.com/users/philipWendland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philipWendland/subscriptions","organizations_url":"https://api.github.com/users/philipWendland/orgs","repos_url":"https://api.github.com/users/philipWendland/repos","events_url":"https://api.github.com/users/philipWendland/events{/privacy}","received_events_url":"https://api.github.com/users/philipWendland/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-29T17:16:41Z","updated_at":"2015-02-07T19:10:35Z","closed_at":"2015-02-07T19:10:35Z","pull_request":{"url":"https://api.github.com/repos/OpenSC/OpenSC/pulls/368","html_url":"https://github.com/OpenSC/OpenSC/pull/368","diff_url":"https://github.com/OpenSC/OpenSC/pull/368.diff","patch_url":"https://github.com/OpenSC/OpenSC/pull/368.patch"},"body":"sc_pkcs15_get_object_guid() should prefer the serial number from\r\nEF(TokenInfo) over card->serialnr because the user may override the\r\ncard's serial number with \"pkcs15-init -C --serial\". The card->serialnr\r\nshould be used before calling card CTL with SC_CARDCTL_GET_SERIALNR\r\nbecause it might contain a cached value.\r\n\r\nThis change *should* allow cards to be used with the minidriver even if\r\nSC_CARDCTL_GET_SERIALNR is not implemented. For example, a driver might\r\nset card->serialnr at initialization or the user might initialize a\r\nPKCS#15 card with its own \"--serial\".\r\n\r\nSee also the discussion at the mailing list:\r\n[Opensc-devel] AT_SIGNATURE and AT_EXCHANGE Problem"},"comment":{"url":"https://api.github.com/repos/OpenSC/OpenSC/issues/comments/73378116","html_url":"https://github.com/OpenSC/OpenSC/pull/368#issuecomment-73378116","issue_url":"https://api.github.com/repos/OpenSC/OpenSC/issues/368","id":73378116,"user":{"login":"viktorTarasov","id":250674,"avatar_url":"https://avatars.githubusercontent.com/u/250674?v=3","gravatar_id":"","url":"https://api.github.com/users/viktorTarasov","html_url":"https://github.com/viktorTarasov","followers_url":"https://api.github.com/users/viktorTarasov/followers","following_url":"https://api.github.com/users/viktorTarasov/following{/other_user}","gists_url":"https://api.github.com/users/viktorTarasov/gists{/gist_id}","starred_url":"https://api.github.com/users/viktorTarasov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viktorTarasov/subscriptions","organizations_url":"https://api.github.com/users/viktorTarasov/orgs","repos_url":"https://api.github.com/users/viktorTarasov/repos","events_url":"https://api.github.com/users/viktorTarasov/events{/privacy}","received_events_url":"https://api.github.com/users/viktorTarasov/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T19:10:35Z","updated_at":"2015-02-07T19:10:35Z","body":"applied in faaa11e091001f063dac46f29f0aad28c2494a18,\r\nthank you"}}