1
0
Fork 0

Challenge certs PEM encoding

Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
Emile Vauge 2016-09-23 18:27:01 +02:00
parent a42845502e
commit e72e65858f
No known key found for this signature in database
GPG key ID: D808B4C167352E59
25 changed files with 490 additions and 107 deletions

View file

@ -51,17 +51,6 @@ func (s *LocalStore) Load() (cluster.Object, error) {
return account, nil
}
// func (s *LocalStore) saveAccount(account *Account) error {
// s.storageLock.Lock()
// defer s.storageLock.Unlock()
// // write account to file
// data, err := json.MarshalIndent(account, "", " ")
// if err != nil {
// return err
// }
// return ioutil.WriteFile(s.file, data, 0644)
// }
// Begin creates a transaction with the KV store.
func (s *LocalStore) Begin() (cluster.Transaction, cluster.Object, error) {
s.storageLock.Lock()
@ -88,7 +77,7 @@ func (t *localTransaction) Commit(object cluster.Object) error {
if err != nil {
return err
}
return ioutil.WriteFile(t.file, data, 0644)
err = ioutil.WriteFile(t.file, data, 0644)
if err != nil {
return err
}