{"action":"closed","issue":{"url":"https://api.github.com/repos/zhaozg/lua-openssl/issues/39","labels_url":"https://api.github.com/repos/zhaozg/lua-openssl/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/zhaozg/lua-openssl/issues/39/comments","events_url":"https://api.github.com/repos/zhaozg/lua-openssl/issues/39/events","html_url":"https://github.com/zhaozg/lua-openssl/issues/39","id":56514707,"number":39,"title":"`openssl.stack_of_XXX` 1-based indexing","user":{"login":"moteus","id":1804306,"avatar_url":"https://avatars.githubusercontent.com/u/1804306?v=3","gravatar_id":"","url":"https://api.github.com/users/moteus","html_url":"https://github.com/moteus","followers_url":"https://api.github.com/users/moteus/followers","following_url":"https://api.github.com/users/moteus/following{/other_user}","gists_url":"https://api.github.com/users/moteus/gists{/gist_id}","starred_url":"https://api.github.com/users/moteus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moteus/subscriptions","organizations_url":"https://api.github.com/users/moteus/orgs","repos_url":"https://api.github.com/users/moteus/repos","events_url":"https://api.github.com/users/moteus/events{/privacy}","received_events_url":"https://api.github.com/users/moteus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-04T11:25:44Z","updated_at":"2015-02-12T05:17:37Z","closed_at":"2015-02-12T05:17:37Z","body":"I think it more Lua way to start index from 1\r\n```Lua\r\npeer, stack = ssl_ctx:peer()\r\n-- Currently\r\nfor i = 1, #stack do local cert = stack:get(i-1) ... end\r\n-- \r\nfor i = 1, #stack do local cert = stack:get(i) ... end\r\n-- or even\r\nfor i = 1, #stack do local cert = stack[i] ... end\r\n```\r\n\r\n\r\n"}}