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

ENHANCED: HTTP Unix daemon now also works without certificate and key. #80

Closed
wants to merge 1 commit into from
Closed

ENHANCED: HTTP Unix daemon now also works without certificate and key. #80

wants to merge 1 commit into from

Conversation

triska
Copy link
Member

@triska triska commented Dec 25, 2016

This is a simpler way to implement #76.

After applying this pull request, all that remains to accommodate SWISH (using server.crt and server.key as default parameters) and servers with multiple certificates is a new hook that lets us set additional certificates (using the new ssl_add_certificate_key/3) in a strategic place, by providing access to the server's SSL context after it is created.

Please see #77 for the discussion and naming suggestion.

This is important to launch servers that rely exclusively on SNI,
where clients that do not support SNI should be rejected.

Certificates and keys can be added with ssl_add_certificate_key/3,
in a suitable hook that is yet to be added to HTTP or the SSL plugin.
@JanWielemaker
Copy link
Member

If I see things correctly, this doesn't give us back the default certificate in the same way. If we want to have that we need to use ssl_server_create_hook/3, no? It gets a little hacky to find out that the context has no certificate though. Even if we do find out, we must now load the certificate as an unprivileged user instead of root.

Well, I think we can hack something acceptable using http_daemon/1 after some reorganization. I'll have a look at that.

@JanWielemaker
Copy link
Member

Merged after changing http_daemon/1 to be a viable alternative to be called by applications with suitable defaults.

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

Successfully merging this pull request may close these issues.

2 participants