@@ -15,7 +15,7 @@ func ValidateConfig(config *Config, onPremise bool) error {
1515 if * config .File == "" && ! * config .Serve {
1616 return errors .New ("No file path/url provided, example usage: getsum /tmp/file " )
1717 }
18- if * config .RemoteOnly {
18+ if ! onPremise && * config .RemoteOnly {
1919 if * config .LocalOnly {
2020 return errors .New ("You can not set -localOnly and -remoteOnly at the same time" )
2121 }
@@ -40,7 +40,7 @@ func ValidateConfig(config *Config, onPremise bool) error {
4040 return errors .New ("Unrecognized algorithm, [" + a + "] supported types: " + supportedAlgs )
4141 }
4242 }
43- if * config .Dir != "" {
43+ if ! onPremise && * config .Dir != "" {
4444 fi , err := os .Stat (* config .Dir )
4545 if os .IsNotExist (err ) {
4646 return errors .New ("Given -dir parameter " + * config .Dir + "doesnt exist" )
@@ -49,14 +49,14 @@ func ValidateConfig(config *Config, onPremise bool) error {
4949 return errors .New ("Given -dir parameter is not a directory!" )
5050 }
5151 }
52- if * config .TLSKey != "" && * config .TLSCert == "" {
52+ if ! onPremise && * config .TLSKey != "" && * config .TLSCert == "" {
5353 return errors .New ("You specified -tlskey but not -tlscert, both parameter required for https/tls mode" )
5454 }
55- if * config .TLSKey == "" && * config .TLSCert != "" {
55+ if ! onPremise && * config .TLSKey == "" && * config .TLSCert != "" {
5656 return errors .New ("You specified -tlscert but not -tlskey, both parameter required for https/tls mode" )
5757 }
5858
59- if * config .Key != "" && * config .Supplier != "go" {
59+ if ! onPremise && * config .Key != "" && * config .Supplier != "go" {
6060 return errors .New ("-key parameter only used on go libs currently, set -lib go" )
6161 }
6262
0 commit comments