tech5usa / TLSential

A server for providing short-lived TLS certificates to all services within a firewall restricted network.
GNU General Public License v3.0
15 stars 2 forks source link

Add some basic server and TLS config. When running in HTTPS mode make… #50

Closed debus closed 4 years ago

debus commented 4 years ago

… sure to also try to spawn an HTTP server that just redirects to HTTPS

This PR addresses the following issues:

https://github.com/ImageWare/TLSential/issues/45

Context

The server has the default TLS configuration and has no timeouts set. Which means connections can't timeout and can hang forever.

Approach

Set some best guess timeouts for reading, writing, and idle time. Set up basic TLS config. When running in HTTPS mode, spawn an HTTP server whose sole purpose is to redirect HTTP requests to their HTTPS version.

Testing

Hit the server in HTTP mode to make sure it gets told to redirect. Haven't actually wrote anything that would connect and hang to test timeouts. Might be a good TODO.