diff options
Diffstat (limited to 'solve_webroot.go')
-rw-r--r-- | solve_webroot.go | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/solve_webroot.go b/solve_webroot.go index 096ca4a..12720f3 100644 --- a/solve_webroot.go +++ b/solve_webroot.go @@ -1,7 +1,7 @@ package acme import ( - "io" + "io/ioutil" "log" "os" "path" @@ -23,13 +23,7 @@ func (s *webrootSolver) Solve(ch Challenge) error { if err != nil { return err } - fd, err := CreateFile(s.file, 0644) - if err != nil { - return err - } - defer fd.Close() - _, err = io.WriteString(fd, ch.KeyAuthorization) - return err + return ioutil.WriteFile(s.file, []byte(ch.KeyAuthorization), 0644) } func (s *webrootSolver) Solved() error { |