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:
2
cache.go
2
cache.go
@ -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
|
||||
}
|
||||
|
@ -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()
|
||||
}
|
||||
|
||||
|
4
vault.go
4
vault.go
@ -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,
|
||||
|
Reference in New Issue
Block a user