{"action":"created","issue":{"url":"https://api.github.com/repos/OpenSC/OpenSC/issues/617","labels_url":"https://api.github.com/repos/OpenSC/OpenSC/issues/617/labels{/name}","comments_url":"https://api.github.com/repos/OpenSC/OpenSC/issues/617/comments","events_url":"https://api.github.com/repos/OpenSC/OpenSC/issues/617/events","html_url":"https://github.com/OpenSC/OpenSC/pull/617","id":119028577,"number":617,"title":"Enable OS locking","user":{"login":"mtrojnar","id":13538198,"avatar_url":"https://avatars.githubusercontent.com/u/13538198?v=3","gravatar_id":"","url":"https://api.github.com/users/mtrojnar","html_url":"https://github.com/mtrojnar","followers_url":"https://api.github.com/users/mtrojnar/followers","following_url":"https://api.github.com/users/mtrojnar/following{/other_user}","gists_url":"https://api.github.com/users/mtrojnar/gists{/gist_id}","starred_url":"https://api.github.com/users/mtrojnar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtrojnar/subscriptions","organizations_url":"https://api.github.com/users/mtrojnar/orgs","repos_url":"https://api.github.com/users/mtrojnar/repos","events_url":"https://api.github.com/users/mtrojnar/events{/privacy}","received_events_url":"https://api.github.com/users/mtrojnar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-26T11:39:46Z","updated_at":"2015-11-27T07:25:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OpenSC/OpenSC/pulls/617","html_url":"https://github.com/OpenSC/OpenSC/pull/617","diff_url":"https://github.com/OpenSC/OpenSC/pull/617.diff","patch_url":"https://github.com/OpenSC/OpenSC/pull/617.patch"},"body":"libp11 depends on OS locking implementation in the PKCS#11 library (by requesting CKF_OS_LOCKING_OK and **not** providing application locking callbacks). On the other hand, OpenSC **only** implements OS locking if PKCS11_THREAD_LOCKING is defined.\r\n\r\nSome applications (e.g. OpenVPN) implement relatively complex workarounds for this simple issue. At least libp11 (and consequently engine_pkcs11) does not implement application locking, causing concurrent requests to fail with the CKR_OPERATION_ACTIVE error."},"comment":{"url":"https://api.github.com/repos/OpenSC/OpenSC/issues/comments/160058325","html_url":"https://github.com/OpenSC/OpenSC/pull/617#issuecomment-160058325","issue_url":"https://api.github.com/repos/OpenSC/OpenSC/issues/617","id":160058325,"user":{"login":"frankmorgner","id":1266577,"avatar_url":"https://avatars.githubusercontent.com/u/1266577?v=3","gravatar_id":"","url":"https://api.github.com/users/frankmorgner","html_url":"https://github.com/frankmorgner","followers_url":"https://api.github.com/users/frankmorgner/followers","following_url":"https://api.github.com/users/frankmorgner/following{/other_user}","gists_url":"https://api.github.com/users/frankmorgner/gists{/gist_id}","starred_url":"https://api.github.com/users/frankmorgner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankmorgner/subscriptions","organizations_url":"https://api.github.com/users/frankmorgner/orgs","repos_url":"https://api.github.com/users/frankmorgner/repos","events_url":"https://api.github.com/users/frankmorgner/events{/privacy}","received_events_url":"https://api.github.com/users/frankmorgner/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T07:25:50Z","updated_at":"2015-11-27T07:25:50Z","body":"You could remove `HAVE_OS_LOCKING` as well.\r\n\r\nI'll leave this open for a while, maybe some other developer (@dengert @martinpaljak ?) has an idea why locking used to be disabled."}}