Compare commits
3 Commits
596027f210
...
3e1390d92e
| Author | SHA1 | Date | |
|---|---|---|---|
| 3e1390d92e | |||
|
|
79ae572cc3 | ||
|
|
2a4ceb2045 |
@ -320,9 +320,7 @@ func ResolveGPGKeyFingerprint(keyID string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use GPG to get the full fingerprint for the key
|
// Use GPG to get the full fingerprint for the key
|
||||||
cmd := exec.Command( // #nosec G204 -- keyID validated
|
cmd := exec.Command("gpg", "--list-keys", "--with-colons", "--fingerprint", keyID)
|
||||||
"gpg", "--list-keys", "--with-colons", "--fingerprint", keyID,
|
|
||||||
)
|
|
||||||
output, err := cmd.Output()
|
output, err := cmd.Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("failed to resolve GPG key fingerprint: %w", err)
|
return "", fmt.Errorf("failed to resolve GPG key fingerprint: %w", err)
|
||||||
@ -361,9 +359,7 @@ func gpgEncryptDefault(data *memguard.LockedBuffer, keyID string) ([]byte, error
|
|||||||
return nil, fmt.Errorf("invalid GPG key ID: %w", err)
|
return nil, fmt.Errorf("invalid GPG key ID: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd := exec.Command( // #nosec G204 -- keyID validated
|
cmd := exec.Command("gpg", "--trust-model", "always", "--armor", "--encrypt", "-r", keyID)
|
||||||
"gpg", "--trust-model", "always", "--armor", "--encrypt", "-r", keyID,
|
|
||||||
)
|
|
||||||
cmd.Stdin = strings.NewReader(data.String())
|
cmd.Stdin = strings.NewReader(data.String())
|
||||||
|
|
||||||
output, err := cmd.Output()
|
output, err := cmd.Output()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user