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

How to set ca_bundle for ssl server #310

Closed
EstebanSannin opened this issue May 9, 2017 · 6 comments
Closed

How to set ca_bundle for ssl server #310

EstebanSannin opened this issue May 9, 2017 · 6 comments

Comments

@EstebanSannin
Copy link
Contributor

Hi,
I generated my ssl certificates on "Let's Encrypt" and now I have 3 files:
private.key (private key)
certificate.crt (certificate)
ca_bundle.crt (CA Bundle)

An example of configuration on Apache Web Server is like this:
SSLCertificateFile /path_to/certificate.crt
SSLCertificateKeyFile /path_to/private.key
SSLCACertificateFile /path_to/ca_bundle.crt

This is an example of my Turbo server:

TURBO_SSL = true

local app = turbo.web.Application:new({
   {"/hello", HelloNameHandler}
})
 -- Set the server to listen on port 443 and start the ioloop.
app:listen(443,nil,{
  ssl_options = {
    key_file = "./sslkeys/private.key",
    cert_file = "./sslkeys/certificate.crt"
}, max_body_size=1024*1024*500},{read_body=false})

turbo.ioloop.instance():start()

Can I configure my ca_bundle.crt for the ssl connection??
Because in the documentation and in the examples I have see only the key_file and cert_file

@kernelsauce
Copy link
Owner

kernelsauce commented May 10, 2017 via email

@EstebanSannin
Copy link
Contributor Author

Ok, I tried to combine the two files crt and the Server start correctly, but if I try the ssl check online for example here: https://www.sslchecker.com/sslchecker
or more simply try to use curl, I receive "server certificate verification failed"

The same two file (private key and combined crt) inside nginx work perfectly...

@kernelsauce
Copy link
Owner

That is strange. I will have to do my own tests. But I did test this when I created the functionality...

@luastoned
Copy link
Contributor

Might be related to #239

@kernelsauce
Copy link
Owner

Probably need to implement SSL_CTX_use_certificate_chain_file() usage.

EstebanSannin added a commit to EstebanSannin/turbo that referenced this issue May 25, 2017
@EstebanSannin
Copy link
Contributor Author

Fixed in #311

kernelsauce pushed a commit that referenced this issue May 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants