aboutsummaryrefslogtreecommitdiff
path: root/plugin/dnssec/dnskey.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/dnssec/dnskey.go')
-rw-r--r--plugin/dnssec/dnskey.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugin/dnssec/dnskey.go b/plugin/dnssec/dnskey.go
index 11e18fdc6..161db9471 100644
--- a/plugin/dnssec/dnskey.go
+++ b/plugin/dnssec/dnskey.go
@@ -6,6 +6,7 @@ import (
"crypto/rsa"
"errors"
"os"
+ "path/filepath"
"time"
"github.com/coredns/coredns/request"
@@ -25,7 +26,7 @@ type DNSKEY struct {
// ParseKeyFile read a DNSSEC keyfile as generated by dnssec-keygen or other
// utilities. It adds ".key" for the public key and ".private" for the private key.
func ParseKeyFile(pubFile, privFile string) (*DNSKEY, error) {
- f, e := os.Open(pubFile)
+ f, e := os.Open(filepath.Clean(pubFile))
if e != nil {
return nil, e
}
@@ -35,7 +36,7 @@ func ParseKeyFile(pubFile, privFile string) (*DNSKEY, error) {
return nil, e
}
- f, e = os.Open(privFile)
+ f, e = os.Open(filepath.Clean(privFile))
if e != nil {
return nil, e
}