opentofu/vendor/github.com/lib/pq/ssl_permissions.go
James Bardin cfa299d2ee Update deps in unknown state and rever nomad
Nomad was manually updated, so revert that to the version in master,
remove it from vendor.json and add it to the ignore list.

Update all packages that were in an unknown state to their latest master
commits.
2017-01-19 20:10:17 -05:00

17 lines
387 B
Go

// +build !windows
package pq
import "os"
// sslCertificatePermissions checks the permissions on user-supplied certificate
// files. The key file should have very little access.
//
// libpq does not check key file permissions on Windows.
func sslCertificatePermissions(cert, key os.FileInfo) {
kmode := key.Mode()
if kmode != kmode&0600 {
panic(ErrSSLKeyHasWorldPermissions)
}
}