aboutsummaryrefslogtreecommitdiff
path: root/account.go
diff options
context:
space:
mode:
Diffstat (limited to 'account.go')
-rw-r--r--account.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/account.go b/account.go
index ccaf8ff..3fa1ae7 100644
--- a/account.go
+++ b/account.go
@@ -6,8 +6,6 @@ import (
"encoding/base64"
"io"
"net/mail"
- "os"
- "path"
"strings"
"github.com/square/go-jose"
@@ -91,11 +89,7 @@ func KeyAuthorization(s Thumber, token string) (string, error) {
}
func (a *Account) Save(fname string) error {
- if err := os.MkdirAll(path.Dir(fname), 0700); err != nil {
- return err
- }
- flags := os.O_WRONLY | os.O_CREATE | os.O_TRUNC
- fd, err := os.OpenFile(fname, flags, 0600)
+ fd, err := CreateKeyFile(fname)
if err != nil {
return err
}