2
0
mirror of https://github.com/status-im/status-go.git synced 2025-01-11 07:07:24 +00:00
RichΛrd 0babdad17b
chore: upgrade go-waku to v0.5 ()
* 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 ()
* feat: add wakuv2 test ()
2023-02-22 17:58:17 -04:00

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
}