web hooks: add mutual TLS support

This commit is contained in:
Nicola Murino
2021-02-13 14:41:37 +01:00
parent 1129a868a5
commit a21ccad174
12 changed files with 170 additions and 24 deletions

View File

@@ -90,7 +90,10 @@ Command-line flags should be specified in the Subsystem declaration.
os.Exit(1)
}
httpConfig := config.GetHTTPConfig()
httpConfig.Initialize(configDir)
if err := httpConfig.Initialize(configDir); err != nil {
logger.Error(logSender, connectionID, "unable to initialize http client: %v", err)
os.Exit(1)
}
user, err := dataprovider.UserExists(username)
if err == nil {
if user.HomeDir != filepath.Clean(homedir) && !preserveHomeDir {