You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By reading the source I got the impression that when writing files are only signed if the variable g:GPGPreferSign is set to 1, regardless of whether the file was signed to begin with. Assuming my interpretation of the code is right (I don't know any vimscript), I was wondering if the plugin should check if the encrypted file is signed while decrypting it and let b:GPGOptions += ["sign"] accordingly. gpg --decrypt tells you if the signature could be verified in the last 2 lines written to stderr:
gpg: Signature made ... using ... key ID ...
gpg: Good signature from ...
Using this same information signed files can be verified when opening them :)
Files that aren't signed just don't write those last 2 lines to stderr.
Cheers,
Ricardo
The text was updated successfully, but these errors were encountered:
I have noticed as well that signed GPG files lose their signature when modified with the plugin. Like @rhz suggested, I believe signed files should remain signed after being edited.
When editing an existing file, check if the source file was signed,
and if so, enable signing when we save it.
When writing out a file, moved the "should we sign" check so that
it always happens. When saving an existing file, b:GPGOptions
exists already, so g:GPGPreferSign was not being checked previously.
This partially addresses
jamessan#34
If we wanted to support selecting between different private keys to
sign with, then checking _which_ key had signed a file and looking
for a corresponding private key in our keyring could be done in
the --list-packets check. But that is another future issue & PR.
Hi James,
By reading the source I got the impression that when writing files are only signed if the variable
g:GPGPreferSign
is set to 1, regardless of whether the file was signed to begin with. Assuming my interpretation of the code is right (I don't know any vimscript), I was wondering if the plugin should check if the encrypted file is signed while decrypting it andlet b:GPGOptions += ["sign"]
accordingly.gpg --decrypt
tells you if the signature could be verified in the last 2 lines written to stderr:Using this same information signed files can be verified when opening them :)
Files that aren't signed just don't write those last 2 lines to stderr.
Cheers,
Ricardo
The text was updated successfully, but these errors were encountered: