diff options
Diffstat (limited to 'plugin/sign')
-rw-r--r-- | plugin/sign/keys.go | 4 | ||||
-rw-r--r-- | plugin/sign/signer.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/plugin/sign/keys.go b/plugin/sign/keys.go index 5fd1a4842..b99958442 100644 --- a/plugin/sign/keys.go +++ b/plugin/sign/keys.go @@ -66,7 +66,7 @@ func keyParse(c *caddy.Controller) ([]Pair, error) { } func readKeyPair(public, private string) (Pair, error) { - rk, err := os.Open(public) + rk, err := os.Open(filepath.Clean(public)) if err != nil { return Pair{}, err } @@ -86,7 +86,7 @@ func readKeyPair(public, private string) (Pair, error) { return Pair{}, fmt.Errorf("DNSKEY in %q is not a CSK/KSK", public) } - rp, err := os.Open(private) + rp, err := os.Open(filepath.Clean(private)) if err != nil { return Pair{}, err } diff --git a/plugin/sign/signer.go b/plugin/sign/signer.go index d1ea22356..95ce94b52 100644 --- a/plugin/sign/signer.go +++ b/plugin/sign/signer.go @@ -111,7 +111,7 @@ func (s *Signer) Sign(now time.Time) (*file.Zone, error) { // resign checks if the signed zone exists, or needs resigning. func (s *Signer) resign() error { signedfile := filepath.Join(s.directory, s.signedfile) - rd, err := os.Open(signedfile) + rd, err := os.Open(filepath.Clean(signedfile)) if err != nil && os.IsNotExist(err) { return err } |