Skip to content

Instantly share code, notes, and snippets.

@rphillips
Created April 23, 2015 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rphillips/43171929d032817302bc to your computer and use it in GitHub Desktop.
Save rphillips/43171929d032817302bc to your computer and use it in GitHub Desktop.
diff --git a/master/deps/coro-tls.lua b/master/deps/coro-tls.lua
index e839a05..d66d322 100644
--- a/master/deps/coro-tls.lua
+++ b/master/deps/coro-tls.lua
@@ -10,7 +10,7 @@ exports.wrap = function (read, write, options)
options = {}
end
- local ctx = openssl.ssl.ctx_new("TLSv1_2")
+ local ctx = openssl.ssl.ctx_new("TLSv1")
local key, cert, ca
if options.key then
@@ -49,7 +49,7 @@ exports.wrap = function (read, write, options)
-- Do handshake
while true do
- if ssl:handshake() then break end
+ if ssl:handshake() then flush() ; break end
flush()
local chunk = read()
if chunk then
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment