Add basic amenities for implementing TLS
This commit is contained in:
parent
a0e4e5f12d
commit
824f52c80e
|
@ -27,6 +27,7 @@ var serverCmd = &cobra.Command{
|
|||
func init() {
|
||||
rootCmd.AddCommand(serverCmd)
|
||||
serverCmd.PersistentFlags().StringP("clients", "c", "", "File to recover clients from")
|
||||
serverCmd.Flags().Bool("insecure", false, "[UNSAFE] Do not use TLS encryption")
|
||||
}
|
||||
|
||||
func setServerParameters(cmd *cobra.Command) error {
|
||||
|
@ -38,5 +39,9 @@ func setServerParameters(cmd *cobra.Command) error {
|
|||
isUsingJSONParameter = true
|
||||
clientJSONPath = parameterClients
|
||||
}
|
||||
insecure, err := cmd.Flags().GetBool("insecure")
|
||||
if insecure == true {
|
||||
servInsecure = true
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -21,6 +21,8 @@ var (
|
|||
|
||||
heartbeatRate time.Duration = 15
|
||||
|
||||
servInsecure bool
|
||||
|
||||
isUsingJSONParameter bool
|
||||
clientJSONPath string = "/.config/tiamat/clients.json"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue