Commit Graph

71 Commits

Author SHA1 Message Date
Markus Braun
a817a3bfa1 Tim Swast patch for signed files 2011-07-06 08:05:40 +02:00
Markus Braun
da53fc98f0 Added section "Known Issues:" to documentation. 2011-07-06 08:05:40 +02:00
Markus Braun
b426430ff8 This is just a stupid change, more ore less to update Id and Revision keywords 2011-07-06 08:05:40 +02:00
Markus Braun
666d1e10f5 Unix/windows specific settings done right :-) 2011-07-06 08:05:40 +02:00
Markus Braun
54faa743b2 Correct error in redirection. 2011-07-06 08:05:40 +02:00
Markus Braun
12ac7f9f03 Use has("unix") to determine between windows and unix. 2011-07-06 08:05:39 +02:00
Markus Braun
478aeb9196 Correctly use backticks for determining the tty 2011-07-06 08:05:39 +02:00
Markus Braun
aecfdde11d Make sure that sensitive data is never written unencrypted.
It is better to write an empty buffer to the file instead.
2011-07-06 08:05:39 +02:00
Markus Braun
6a0bdcf05c added function to cleanup on leaving vim
For now create a new, empty buffer before leaving to wipe out data on console.
2011-07-06 08:05:39 +02:00
Markus Braun
9425fd6754 Code beautification 2011-07-06 08:05:39 +02:00
Markus Braun
c4b203d17c Patch from Sebastian Luettich
Fix issue with symmetric encryption and set recipients.
2011-07-06 08:05:39 +02:00
Markus Braun
a3f589f5e2 Make sure the variable "g:GPGDefaultRecipients" exists 2011-07-06 08:05:39 +02:00
Markus Braun
9278fb2d33 Added support for default recipients. 2011-07-06 08:05:39 +02:00
Markus Braun
31a518148b Updated documentation. 2011-07-06 08:05:38 +02:00
Markus Braun
eebc52cbe1 Get rid of b:GPGUnknownRecipients
Introduce s:GPGCheckRecipients() and do _always_ check the recipients before using them.
2011-07-06 08:05:38 +02:00
Markus Braun
71645fcb3a Check the recipient list again before writing the file
Detect a recipient that has been removed between GPGEditRecipients() and GPGEncrypt()
2011-07-06 08:05:38 +02:00
Markus Braun
594ac054a8 Go back from fnameescape() to escape()
fnameescape() is supported only by later patch levels of Vim 7.1
2011-07-06 08:05:38 +02:00
Markus Braun
8998ff3bde Did two substitution which overwrote each other 2011-07-06 08:05:38 +02:00
Markus Braun
733c2ce362 Yet another use of vim lists 2011-07-06 08:05:38 +02:00
Markus Braun
c3f898827a Move initialization of variables to the places where they are used. 2011-07-06 08:05:38 +02:00
Markus Braun
7afa048df7 Make use of fnameescape() 2011-07-06 08:05:38 +02:00
Markus Braun
4340361541 Recipients and unknownRecipients was not ensured to be a list 2011-07-06 08:05:37 +02:00
Markus Braun
b4be3c10e2 Add menu for GVim 2011-07-06 08:05:37 +02:00
Markus Braun
f5b4b9a754 Write whole vim keywords
endi -> endif
endw -> endwhile
endf -> endfunction
fun -> function
com -> command
2011-07-06 08:05:37 +02:00
Markus Braun
6c6b8b156c Unique recipient list and option list. 2011-07-06 08:05:37 +02:00
Markus Braun
3aa8e8d1dd Don't use explicit join() in match() calls. 2011-07-06 08:05:37 +02:00
Markus Braun
96f3901aa0 Conversion from self implemented "list" to vim builtin lists. 2011-07-06 08:05:37 +02:00
Markus Braun
921d99fd88 Use echom instead of plain echo
This way warnings and errors are stored in message list.
2011-07-06 08:05:37 +02:00
Markus Braun
6fdd1667ec Patch by Giel van Schijndel to get GPG_TTY dynamically:
Hi,

      I'm using your gnupg Vim script [1] and found a minor problem involving
      GPG_TTY not being set, which is no problem on my system because I use
      pinentry-gtk to get passphrases with.

      Secondly it is possible to use whatever tty is current by using the
      output from the `tty' command.

      Thus I have made a patch that addresses this problem. See attached.

      [1] http://www.vim.org/scripts/script.php?script_id=661

      --
      Giel
2011-07-06 08:05:37 +02:00
Markus Braun
cce39d13b2 Give Karl-Heinz Ruskowski his credit. 2011-07-06 08:05:36 +02:00
Markus Braun
c7ab1464da Patch from Karl-Heinz Ruskowski.
Here his message:

      Hallo,
      uns sind hier zwei Fehler an dem gnupg.vim-script aufgefallen die wir hier
      erstmal vorsorglich umgangen haben. (Patch hängt an)

      1. Wenn wenn Einträge in der in der Empfängerliste waren die einen Trustlevel
      < 4 hatten frage Gnupg nochmal nach ob denn nun dieser Schlüssel übernommen
      werden sollte wenn man dies verneinte wurde die Datei dennoch gespeichert,
      aber unverschlüsselt - was sicher die schlechteste lösung ist.
      Kleiner auszug aus der Schell darüber:
      =========================================
      pub  1024g/6E4DF128 2006-12-06 Sascha L. Teichmann
      <s-l-teichmann@users.sourceforge.net>
      Haupt-Fingerabdruck  = 4F52 9526 6786 0497 4390  676F B2BB CE94 57FC 1337
      Unter-Fingerabdruck  = AD32 F49A C4AD 7113 CF0D  0303 548A 53F3 6E4D F128

      It is NOT certain that the key belongs to the person named
      in the user ID.  If you *really* know what you are doing,
      you may answer the next question with yes.

      Use this key anyway? (y/N)

      --> Vorgabe (also nein) führt zu

      "Zugang/Zugang.gpg" 0L, 0C geschrieben
      =========================================

      Mittels "--trust-model always" erzwingen wir die zustimung und die Daten
      bleiben verschlüsselt.

      2. Wenn man die Empfänger einer Datei bearbeitet hat und man verlässt den
      Puffer zur eingabe und nun wird ein eingetragener Schlüssel gelöscht
      speichert man wieder eine kaputte gpg Datei.

      Ich habe eine zusätzliche prüfung auf unbekannte Empfänger hinzugefügt und
      lösche diese Unbekannten Keys vor er verschlüsselung.

      In beiden fällen war es mir nicht möglich bei einem aufgetretenen Fehler
      wieder zurück in den Editormodus zu wechseln, was sicher an meinen schlechten
      Vimscript Kenntnissen liegt. Dies wäre aus meiner Sicht natürlich die beste
      Lösung.

      Hoffe ich konnte helfen.

      Mit freundlichen Grüßen

      Karl-Heinz Ruskowski
      --
      Karl-Heinz Ruskowski                              OpenPGP key: FB8DA3BF
      Intevation GmbH, Osnabrück
      Amtsgericht Osnabrück, HR B 18998             http://www.intevation.de/
      Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
2011-07-06 08:05:36 +02:00
Markus Braun
9cb02c800a Vim version compatibility
Wrap winsaveview() and winrestview() with v:version > 700 to make the plugin run under older vim versions.
2011-07-06 08:05:36 +02:00
Markus Braun
9f4f083367 Little reindenting. 2011-07-06 08:05:36 +02:00
Markus Braun
febf2d4685 Changed recipient and option buffer handling
This allows ':w' to close (besides ':q' and ':x')
2011-07-06 08:05:36 +02:00
Markus Braun
6a32435246 Revert last commit. 2011-07-06 08:05:36 +02:00
Markus Braun
de5ea9f6bd New commands ":GPGRecipients" and ":GPGOptions"
Aliases for ":GPGEditRecipients" and ":GPGEditOptions" for better tab completion.
2011-07-06 08:05:36 +02:00
Markus Braun
b98c3fbd4a Convert the output of gpg to the correct encoding. 2011-07-06 08:05:36 +02:00
Markus Braun
ac6ec713e6 Added an option to set the gpg executable. 2011-07-06 08:05:35 +02:00
Markus Braun
fceb8855f9 Save/restore view of saved window instead of cursor position. 2011-07-06 08:05:35 +02:00
Markus Braun
bfdc09a732 Print debug message only after debug level had been defined. 2011-07-06 08:05:35 +02:00
Markus Braun
874bd187f2 Made gnupg.vim hopefully encoding safe, needs testing. 2011-07-06 08:05:35 +02:00
Markus Braun
479e79d3be Print plugin version in verbose mode 2011-07-06 08:05:35 +02:00
Markus Braun
acdf9e096d Restructured autocommand triggers, merged in functions. 2011-07-06 08:05:35 +02:00
Markus Braun
5aabc38ec2 Restore cursor position after write. 2011-07-06 08:05:35 +02:00
Markus Braun
780d1ed91e Make use of "--list-only" option. 2011-07-06 08:05:35 +02:00
Markus Braun
f5e107f596 Added a debug command and some debug messages 2011-07-06 08:05:35 +02:00
Markus Braun
c069e0f21d Modified to work with gpg2 correctly. 2011-07-06 08:05:34 +02:00
Markus Braun
bf868fb9a1 Use revision number for multiple load guard. 2011-07-06 08:05:34 +02:00
Markus Braun
f786031299 Ignore tty for gvim 2011-07-06 08:05:34 +02:00
Markus Braun
63dff1cd4b shellredir wasn't restored.
Instead of restore it was set again to s:shellredir
2011-07-06 08:05:34 +02:00