{"action":"closed","issue":{"url":"https://api.github.com/repos/brunoos/luasec/issues/88","repository_url":"https://api.github.com/repos/brunoos/luasec","labels_url":"https://api.github.com/repos/brunoos/luasec/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/brunoos/luasec/issues/88/comments","events_url":"https://api.github.com/repos/brunoos/luasec/issues/88/events","html_url":"https://github.com/brunoos/luasec/issues/88","id":189330989,"number":88,"title":"tlsv1 alert internal error when trying to API query https://bittrex.com","user":{"login":"greatwolf","id":1663586,"avatar_url":"https://avatars.githubusercontent.com/u/1663586?v=3","gravatar_id":"","url":"https://api.github.com/users/greatwolf","html_url":"https://github.com/greatwolf","followers_url":"https://api.github.com/users/greatwolf/followers","following_url":"https://api.github.com/users/greatwolf/following{/other_user}","gists_url":"https://api.github.com/users/greatwolf/gists{/gist_id}","starred_url":"https://api.github.com/users/greatwolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greatwolf/subscriptions","organizations_url":"https://api.github.com/users/greatwolf/orgs","repos_url":"https://api.github.com/users/greatwolf/repos","events_url":"https://api.github.com/users/greatwolf/events{/privacy}","received_events_url":"https://api.github.com/users/greatwolf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-15T08:41:58Z","updated_at":"2016-11-15T21:23:02Z","closed_at":"2016-11-15T21:23:02Z","body":"Here's a short code snippet to reproduce the problem:\r\n\r\n    local req = require 'ssl.https'.request\r\n    local resp = {}\r\n    local url = 'https://bittrex.com/api/v1.1/public/getmarketsummaries'\r\n\r\n    print( req { method = \"GET\", url = url, sink = ltn12.sink.table (resp) } )\r\n    print( table.concat(resp) )\r\n\r\nFor me, this gives the output:\r\n\r\n    nil tlsv1 alert internal error nil nil\r\n\r\nMy setup\r\n\r\n* luajit 2.1.0\r\n* luasocket 3.0rc1\r\n* luasec 0.6-1\r\n* openssl 1.0.1g used when building luasec\r\n* mingw 4.9.1\r\n\r\nIt's important to mention that this problem started happening today. Before today, this use to work just fine which suggests that bittrex might have changed something with their ssl certificate or the cipher suite used. I posted about this problem over on [/r/bitcoinmarkets](https://www.reddit.com/r/BitcoinMarkets/comments/5czb0m/getting_tls_handshake_problems_with_bittrexs_api/)\r\n\r\nAnother interesting observation, I tested the same get request on curl 7.23.1:\r\n\r\n    curl -v -k \"https://bittrex.com/api/v1.1/public/getmarkethistory?market=BTC-XMR\"\r\n\r\ngiving me this output:\r\n\r\n    * About to connect() to bittrex.com port 443 (#0)\r\n    *   Trying 104.18.56.9... connected\r\n    * SSLv3, TLS handshake, Client hello (1):\r\n    * error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure\r\n    * Closing connection #0\r\n    curl: (35) error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure\r\n\r\n*However*, if I perform the same operation on curl 7.51.0 that works! And of course, testing this in the chrome browser works fine.\r\n\r\nAny ideas on what the tlsv1 error means and how to fix it? A search shows this same error message has happened on other languages too like python which likely suggests an error that's emanating from openssl or the way luasec is using openssl."}}
{"actor":{"display_login":"greatwolf"}}