phires / go-guerrilla

MIT License
104 stars 18 forks source link

Running guerillad without certificate #43

Open guilhem-martin opened 4 months ago

guilhem-martin commented 4 months ago

Hello,

the documentation states to set _tls_alwayson to false when wanting to run guerillad if you don't have a certificate yet.

Though, it looks like the program is still trying to read the private key file path:

"could not read config file: could not stat key for server [127.0.0.1:2526], stat /path/to/pem/file/test.com.key: no such file or directory

Should not the private key file path be ignored when we disable tls?

Thanks.

phires commented 4 months ago

Hi, might be a bug introduced by the TLS1.3 Support, I'll look into that!

phires commented 1 month ago

I have added some sanity checks for the configuration: If the server is not enabled, we'll not try to load any TLS file, regardless of the settings of "start_tls_on" and "tls_always_on". Also we won't try to load any certificate files if "start_tls_on = false" AND "tls_always_on = false".