Skip to content

Commit 214da8a

Browse files
author
Ricky White
authored
Remove unused PublicKey in KeyPair (#47)
1 parent f1b4412 commit 214da8a

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

internal/vault/vault.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ type ConfigOptions struct {
1515

1616
type KeyPair struct {
1717
PrivateKey string
18-
PublicKey string
1918
Passphrase string
2019
}
2120

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

80-
publicKey, ok := keys.(map[string]interface{})["publicKey"].(string)
81-
if !ok || (publicKey == ""){
82-
return nil, fmt.Errorf("no public key found for UID: %s", uid)
83-
}
84-
8579
// If a passphrase is set, it is stored in the password field of the
8680
// SSH template. If no passphrase is set, passPhrase is set to an empty
8781
// string.
@@ -94,7 +88,6 @@ func FetchKeys(uid string) (*KeyPair, error) {
9488

9589
return &KeyPair{
9690
PrivateKey: privateKey,
97-
PublicKey: publicKey,
9891
Passphrase: passPhrase,
9992
}, nil
10093
}

0 commit comments

Comments
 (0)