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

Better error messages for problems with SSL #92

Open
sigrlami opened this issue Oct 18, 2016 · 2 comments
Open

Better error messages for problems with SSL #92

sigrlami opened this issue Oct 18, 2016 · 2 comments

Comments

@sigrlami
Copy link

Documentation outlines http://snapframework.com/faq#how-do-i-enable-ssl that to include ssl support I need to recompile it.

I'm working withing stack, so I do

stack build --flag snap-server:openssl

Which seems like downloading openssl-streams and rebuilding server with flag, but running server with command

stack exec -- lumper -p 9000 --ssl-port=443 --ssl-cert=cert.pem --ssl-key=privkey.pem 
  1. gives no indication of working ssl (https://localhost:443 gives nothing)
  2. doesn't notify if there is wrong paths to certificates

I would like to know if I'm missing something and how can I enable truly ssl?

@mightybyte
Copy link
Member

mightybyte commented Nov 6, 2016

We're still working on overhauled command line config support. Can you try setting your config explicitly something like this?

main :: IO ()
main = httpServe cfg site
  where
    cfg = defaultConfig
            & setSSLBind "0.0.0.0"
            & setSSLPort 4443
            & setSSLKey "keys/key.pem"
            & setSSLCert "keys/cert.pem"
            & setSSLChainCert False

Make sure you specify all 5 setSSL... options.

@mightybyte mightybyte changed the title SSL support Better error messages for problems with SSL Dec 28, 2016
@mightybyte
Copy link
Member

I changed the title of this issue because I got another comment about an incorrect cert path resulting in a silent failure with no clue as to the problem. We should probably fix that.

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

2 participants