Closed reddevilM closed 5 years ago
tried using curl.lua in the example folder.
I am getting below error
[root@ecmngr117 examples]# luajit curl.lua https://www.google.com [E 2019/03/11 19:27:36] [async.lua] Error code -11. Could not create SSL context. error:02001002:system library:fopen:No such file or directory Could not get URL: Could not create SSL context. error:02001002:system library:fopen:No such file or directory
Getting below error.
[E 2019/02/26 18:04:17] [async.lua] Error code -11. Could not create SSL context. error:02001002:system library:fopen:No such file or directory Could not get URL: Could not create SSL context. error:02001002:system library:fopen:No such file or directory
modified the example curl.lua to use ssl_options
TURBO_SSL = true -- Enable SSL local turbo = require "turbo" turbo.log.categories.success = false
local url = arg[1] -- First arg should be URL.
local tio = turbo.ioloop.instance()
tio:add_callback(function() -- Must place everything in a IOLoop callback. local client = turbo.async.HTTPClient({ ssl_options = { priv_file = "./sslkeys/clientPrivateKey.pem", cert_file = "./sslkeys/odclient.crt", ca_path = "./sslkeys/ottrootca.crt", verify_ca = false }})
end)
tio:start()