mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 14:16:21 +00:00
0babdad17b
* chore: upgrade go-waku to v0.5 * chore: add println and logs to check what's being stored in the enr, and preemptively delete the multiaddr field (#3219) * feat: add wakuv2 test (#3218)
22 lines
448 B
Go
22 lines
448 B
Go
//go:build !windows
|
|
// +build !windows
|
|
|
|
package pq
|
|
|
|
import "os"
|
|
|
|
// sslKeyPermissions checks the permissions on user-supplied ssl key files.
|
|
// The key file should have very little access.
|
|
//
|
|
// libpq does not check key file permissions on Windows.
|
|
func sslKeyPermissions(sslkey string) error {
|
|
info, err := os.Stat(sslkey)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if info.Mode().Perm()&0077 != 0 {
|
|
return ErrSSLKeyHasWorldPermissions
|
|
}
|
|
return nil
|
|
}
|