{"action":"opened","issue":{"url":"https://api.github.com/repos/miekg/pkcs11/issues/27","repository_url":"https://api.github.com/repos/miekg/pkcs11","labels_url":"https://api.github.com/repos/miekg/pkcs11/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/miekg/pkcs11/issues/27/comments","events_url":"https://api.github.com/repos/miekg/pkcs11/issues/27/events","html_url":"https://github.com/miekg/pkcs11/issues/27","id":146476280,"number":27,"title":"fails horribly with softhsm2","user":{"login":"oerdnj","id":130731,"avatar_url":"https://avatars.githubusercontent.com/u/130731?v=3","gravatar_id":"","url":"https://api.github.com/users/oerdnj","html_url":"https://github.com/oerdnj","followers_url":"https://api.github.com/users/oerdnj/followers","following_url":"https://api.github.com/users/oerdnj/following{/other_user}","gists_url":"https://api.github.com/users/oerdnj/gists{/gist_id}","starred_url":"https://api.github.com/users/oerdnj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oerdnj/subscriptions","organizations_url":"https://api.github.com/users/oerdnj/orgs","repos_url":"https://api.github.com/users/oerdnj/repos","events_url":"https://api.github.com/users/oerdnj/events{/privacy}","received_events_url":"https://api.github.com/users/oerdnj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-07T00:46:52Z","updated_at":"2016-04-07T00:46:52Z","closed_at":null,"body":"Hi Miek, I am in process of removing softhsm(1) from Debian, and your package is one of the two that depends on the old one. Could you please switch to libsofthsm2.so and fix this?\r\n```\r\n\tgo test -v github.com/miekg/pkcs11\r\n=== RUN   TestSetenv\r\n--- PASS: TestSetenv (0.00s)\r\n=== RUN   TestInitialize\r\n--- FAIL: TestInitialize (0.00s)\r\n\tpkcs11_test.go:32: loading /usr/lib/softhsm/libsofthsm2.so\r\n\tpkcs11_test.go:77: init error pkcs11: 0x5: CKR_GENERAL_ERROR\r\n=== RUN   TestGetInfo\r\n--- FAIL: TestGetInfo (0.00s)\r\n\tpkcs11_test.go:32: loading /usr/lib/softhsm/libsofthsm2.so\r\n\tpkcs11_test.go:58: init error pkcs11: 0x5: CKR_GENERAL_ERROR\r\n=== RUN   TestFindObject\r\n--- FAIL: TestFindObject (0.00s)\r\n\tpkcs11_test.go:32: loading /usr/lib/softhsm/libsofthsm2.so\r\n\tpkcs11_test.go:58: init error pkcs11: 0x5: CKR_GENERAL_ERROR\r\n=== RUN   TestGetAttributeValue\r\n--- FAIL: TestGetAttributeValue (0.00s)\r\n\tpkcs11_test.go:32: loading /usr/lib/softhsm/libsofthsm2.so\r\n\tpkcs11_test.go:58: init error pkcs11: 0x5: CKR_GENERAL_ERROR\r\n=== RUN   TestDigest\r\n--- FAIL: TestDigest (0.00s)\r\n\tpkcs11_test.go:32: loading /usr/lib/softhsm/libsofthsm2.so\r\n\tpkcs11_test.go:58: init error pkcs11: 0x5: CKR_GENERAL_ERROR\r\n=== RUN   TestDigestUpdate\r\n--- FAIL: TestDigestUpdate (0.00s)\r\n\tpkcs11_test.go:32: loading /usr/lib/softhsm/libsofthsm2.so\r\n\tpkcs11_test.go:58: init error pkcs11: 0x5: CKR_GENERAL_ERROR\r\n=== RUN   TestGenerateKeyPair\r\n--- FAIL: TestGenerateKeyPair (0.00s)\r\n\tpkcs11_test.go:32: loading /usr/lib/softhsm/libsofthsm2.so\r\n\tpkcs11_test.go:58: init error pkcs11: 0x5: CKR_GENERAL_ERROR\r\n=== RUN   TestSign\r\n--- FAIL: TestSign (0.00s)\r\n\tpkcs11_test.go:32: loading /usr/lib/softhsm/libsofthsm2.so\r\n\tpkcs11_test.go:58: init error pkcs11: 0x5: CKR_GENERAL_ERROR\r\n=== RUN   ExampleSign\r\n--- FAIL: ExampleSign (0.00s)\r\npanic: runtime error: index out of range [recovered]\r\n\tpanic: runtime error: index out of range\r\n\r\ngoroutine 1 [running]:\r\npanic(0x5a2e80, 0xc820014060)\r\n\t/usr/lib/go/src/runtime/panic.go:464 +0x3e6\r\ntesting.runExample.func2(0xece97a492, 0xc81da65164, 0x8cd7a0, 0xc820076080, 0xc820076008, 0xc8200884e0, 0x5dbf60, 0xb, 0x629800, 0x5dc4b0, ...)\r\n\t/usr/lib/go/src/testing/example.go:93 +0x3fa\r\npanic(0x5a2e80, 0xc820014060)\r\n\t/usr/lib/go/src/runtime/panic.go:426 +0x4e9\r\ngithub.com/miekg/pkcs11.ExampleSign()\r\n\t/tmp/build-area/golang-github-miekg-pkcs11-0.0~git20160222.0.df8ae6ca/obj-x86_64-linux-gnu/src/github.com/miekg/pkcs11/pkcs11_test.go:292 +0x1149\r\ntesting.runExample(0x5dbf60, 0xb, 0x629800, 0x5dc4b0, 0xa, 0x0)\r\n\t/usr/lib/go/src/testing/example.go:98 +0x3d7\r\ntesting.RunExamples(0x629868, 0x8b7da0, 0x1, 0x1, 0x1)\r\n\t/usr/lib/go/src/testing/example.go:36 +0x314\r\ntesting.(*M).Run(0xc82004bef8, 0xc82004be88)\r\n\t/usr/lib/go/src/testing/testing.go:516 +0xbd\r\nmain.main()\r\n\tgithub.com/miekg/pkcs11/_test/_testmain.go:72 +0x117\r\nexit status 2\r\nFAIL\tgithub.com/miekg/pkcs11\t0.009s\r\n```"}}