(keyFile string)
| 24 | ) |
| 25 | |
| 26 | func checkKeyFilePermissions(keyFile string) error { |
| 27 | if fileInfo, err := os.Stat(keyFile); err != nil { |
| 28 | return fmt.Errorf("Checking for key file permissions %v: %v", keyFile, err) |
| 29 | } else if fileInfo.Mode().Perm()&0077 != 0 { |
| 30 | return fmt.Errorf("Key file permissions are too permissive (%o), they should be 600", fileInfo.Mode().Perm()) |
| 31 | } |
| 32 | return nil |
| 33 | } |
no test coverage detected