aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-12-20 16:52:36 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-12-20 16:52:36 +0100
commit0a7fe63f7f8f844f7a9b150202b309894cc9477f (patch)
tree523a447afe5e3a2bdb1b0181e82b12ec8c70b66e
parent99bbc824ee4ee87da5aa86451aa9af4a632b59fd (diff)
Drop save and load
-rw-r--r--account.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/account.go b/account.go
index 8ab9d1c..e3a0392 100644
--- a/account.go
+++ b/account.go
@@ -2,9 +2,7 @@ package acme
import (
"crypto/rsa"
- "encoding/json"
"io"
- "io/ioutil"
"net/mail"
"strings"
@@ -53,24 +51,6 @@ func NewAccount(email, phone string, key *rsa.PrivateKey) (*Account, error) {
}, nil
}
-func LoadAccount(fname string) (*Account, error) {
- body, err := ioutil.ReadFile(fname)
- if err != nil {
- return nil, err
- }
- a := new(Account)
- err = json.Unmarshal(body, a)
- return a, err
-}
-
-func (a Account) SaveAccount(fname string) error {
- body, err := json.MarshalIndent(a, "", "\t")
- if err != nil {
- return err
- }
- return ioutil.WriteFile(fname, body, 0600)
-}
-
// Signer describes a signing interface
type Signer interface {
Sign([]byte, jose.NonceSource) (io.Reader, error)