Skip to content

Commit

Permalink
Remove unused PublicKey in KeyPair (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
EndlessTrax authored Jan 19, 2024
1 parent f1b4412 commit 214da8a
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions internal/vault/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ type ConfigOptions struct {

type KeyPair struct {
PrivateKey string
PublicKey string
Passphrase string
}

Expand Down Expand Up @@ -77,11 +76,6 @@ func FetchKeys(uid string) (*KeyPair, error) {
return nil, fmt.Errorf("no private key found for UID: %s", uid)
}

publicKey, ok := keys.(map[string]interface{})["publicKey"].(string)
if !ok || (publicKey == ""){
return nil, fmt.Errorf("no public key found for UID: %s", uid)
}

// If a passphrase is set, it is stored in the password field of the
// SSH template. If no passphrase is set, passPhrase is set to an empty
// string.
Expand All @@ -94,7 +88,6 @@ func FetchKeys(uid string) (*KeyPair, error) {

return &KeyPair{
PrivateKey: privateKey,
PublicKey: publicKey,
Passphrase: passPhrase,
}, nil
}

0 comments on commit 214da8a

Please sign in to comment.