Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange protocol issue #72

Closed
ghost opened this issue Apr 4, 2016 · 6 comments
Closed

Strange protocol issue #72

ghost opened this issue Apr 4, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Apr 4, 2016

Hello,

I have strange problem using luasec for site https://www.sk-nic.sk

Site returns code:
"tlsv1 alert protocol version"

For other protocols returns:
"invalid protocol"

Correct reply code should be 301 (there is a redirect)

Lua code is here:
https://gist.github.com/is73/d50fa12718812e0f0c76c991030b8583

Using by ex. Go, Tcl, PHP (even with simple file_get_contents() request) everything works fine.

@brunoos
Copy link
Member

brunoos commented Apr 4, 2016

Server does not accept TLS 1.0, only TLS 1.2.

@brunoos brunoos closed this as completed Apr 4, 2016
@ghost
Copy link
Author

ghost commented Apr 4, 2016

Does it mean that tlsv1_2 is not supported in luasec? Or my ssl libraries doesn't have support for this protocol?

@brunoos
Copy link
Member

brunoos commented Apr 4, 2016

I means that you have to select the protocol in https.request().

Default for https in LuaSec 0.5 is "tlsv1". Version 0.6 changed to "any" supported protocol.

@ghost
Copy link
Author

ghost commented Apr 4, 2016

I already tried that, all available protoicols, it doesnt work. On Linux, on Windows, using lua 5.3,Lua 5.1 luasec 0.4, 0.6, everything comes to your mind.

@daurnimator
Copy link
Contributor

@is73 FWIW have you checked out lua-http? https://github.com/daurnimator/lua-http

I wrote a short blog post about how you might move over: http://daurnimator.com/post/142323715859/migrating-from-luasocket-to-lua-http

@ghost
Copy link
Author

ghost commented Apr 5, 2016

@daurnimator thanks for your suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants