Make secret unlocker add pgp work on Linux (closes #88)
check / check (push) Failing after 1s
check / check (push) Failing after 1s
CreatePGPUnlocker got the vault's long-term key from the keychain unlocker's helper, which on every platform but macOS is a stub that always fails. It now calls the vault's GetOrDeriveLongTermKey, as adding a passphrase unlocker does: from the mnemonic, checked against the vault, or else from the current unlocker. That method joins VaultInterface. The test GPG key gains an encryption subkey, and a new test adds a PGP unlocker with the long-term key from the mnemonic and from a passphrase unlocker, then reads a secret through it. Model: opus-5-5
This commit was merged in pull request #95.
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"errors"
|
||||
|
||||
"filippo.io/age"
|
||||
"github.com/awnumar/memguard"
|
||||
"github.com/spf13/afero"
|
||||
)
|
||||
|
||||
@@ -79,10 +78,3 @@ func (k *KeychainUnlocker) Remove() error {
|
||||
func CreateKeychainUnlocker(_ afero.Fs, _ string) (*KeychainUnlocker, error) {
|
||||
return nil, errKeychainNotSupported
|
||||
}
|
||||
|
||||
// getLongTermPrivateKey returns an error on non-Darwin platforms
|
||||
func getLongTermPrivateKey(
|
||||
_ afero.Fs, _ VaultInterface,
|
||||
) (*memguard.LockedBuffer, error) {
|
||||
return nil, errKeychainNotSupported
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user