Skip to content

Better error messages for problems with SSL #92

Open

Description

@sigrlami

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?

Activity

  1. mightybyte commented on Nov 6, 2016

    @mightybyte
    Member

    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.

  2. changed the title [-]SSL support[/-] [+]Better error messages for problems with SSL[/+] on Dec 28, 2016
  3. mightybyte commented on Dec 28, 2016

    @mightybyte
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions