1
0
mirror of https://github.com/ssh-vault/ssh-vault.git synced 2025-07-31 05:24:22 +03:00

fixed bug on cache (returning key instead of uKey)

This commit is contained in:
nbari
2016-10-07 11:26:41 +02:00
parent c49a38631c
commit 0eb0dd6ee1
3 changed files with 3 additions and 7 deletions

View File

@ -35,7 +35,7 @@ func (c *cache) Get(u string) (string, error) {
if err != nil {
log.Println(err)
}
return key, nil
return uKey, nil
}
return uKey, nil
}

View File

@ -32,8 +32,8 @@ func main() {
os.Args[0],
" Options:",
" create creates a new vault",
" edit open an existing vault",
" view open an existing vault")
" edit edit an existing vault",
" view view an existing vault")
flag.PrintDefaults()
}

View File

@ -9,7 +9,6 @@ import (
"encoding/base64"
"encoding/pem"
"fmt"
"os"
"os/exec"
"strings"
)
@ -48,9 +47,6 @@ func New(k, u, o, v string) (*vault, error) {
// PKCS8 convert ssh public key to PEM PKCS8
func (v *vault) PKCS8() error {
if _, err := os.Stat(v.key); os.IsNotExist(err) {
fmt.Printf("err = %+v\n", err)
}
out, err := exec.Command("ssh-keygen",
"-f",
v.key,