fix: api.rest and https.server certificates are now correctly generated with IsCA to false

This commit is contained in:
evilsocket 2019-04-21 19:55:53 +02:00
parent 070708c307
commit 8257d25ff3
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
23 changed files with 8876 additions and 14 deletions

View file

@ -42,12 +42,12 @@ func NewHttpsServer(s *session.Session) *HttpsServer {
"Port to bind the http server to."))
mod.AddParam(session.NewStringParameter("https.server.certificate",
"~/.bettercap-https.cert.pem",
"~/.bettercap-httpd.cert.pem",
"",
"TLS certificate file (will be auto generated if filled but not existing)."))
mod.AddParam(session.NewStringParameter("https.server.key",
"~/.bettercap-https.key.pem",
"~/.bettercap-httpd.key.pem",
"",
"TLS key file (will be auto generated if filled but not existing)."))
@ -137,7 +137,7 @@ func (mod *HttpsServer) Configure() error {
mod.Debug("%+v", cfg)
mod.Info("generating server TLS key to %s", keyFile)
mod.Info("generating server TLS certificate to %s", certFile)
if err := tls.Generate(cfg, certFile, keyFile); err != nil {
if err := tls.Generate(cfg, certFile, keyFile, false); err != nil {
return err
}
} else {