Karsten Hopp 1435dc
To: vim_dev@googlegroups.com
Karsten Hopp 1435dc
Subject: Patch 7.3.133
Karsten Hopp 1435dc
Fcc: outbox
Karsten Hopp 1435dc
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 1435dc
Mime-Version: 1.0
Karsten Hopp 1435dc
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 1435dc
Content-Transfer-Encoding: 8bit
Karsten Hopp 1435dc
------------
Karsten Hopp 1435dc
Karsten Hopp 1435dc
Patch 7.3.133
Karsten Hopp 1435dc
Problem:    When using encryption it's not clear what method was used.
Karsten Hopp 1435dc
Solution:   In the file message show "blowfish" when using blowfish.
Karsten Hopp 1435dc
Files:	    src/fileio.c
Karsten Hopp 1435dc
Karsten Hopp 1435dc
Karsten Hopp 1435dc
*** ../vim-7.3.132/src/fileio.c	2011-02-15 17:39:14.000000000 +0100
Karsten Hopp 1435dc
--- src/fileio.c	2011-02-25 16:30:19.000000000 +0100
Karsten Hopp 1435dc
***************
Karsten Hopp 1435dc
*** 250,255 ****
Karsten Hopp 1435dc
--- 250,256 ----
Karsten Hopp 1435dc
  #ifdef FEAT_CRYPT
Karsten Hopp 1435dc
      char_u	*cryptkey = NULL;
Karsten Hopp 1435dc
      int		did_ask_for_key = FALSE;
Karsten Hopp 1435dc
+     int		crypt_method_used;
Karsten Hopp 1435dc
  #endif
Karsten Hopp 1435dc
  #ifdef FEAT_PERSISTENT_UNDO
Karsten Hopp 1435dc
      context_sha256_T sha_ctx;
Karsten Hopp 1435dc
***************
Karsten Hopp 1435dc
*** 2289,2294 ****
Karsten Hopp 1435dc
--- 2290,2296 ----
Karsten Hopp 1435dc
  	save_file_ff(curbuf);		/* remember the current file format */
Karsten Hopp 1435dc
  
Karsten Hopp 1435dc
  #ifdef FEAT_CRYPT
Karsten Hopp 1435dc
+     crypt_method_used = use_crypt_method;
Karsten Hopp 1435dc
      if (cryptkey != NULL)
Karsten Hopp 1435dc
      {
Karsten Hopp 1435dc
  	crypt_pop_state();
Karsten Hopp 1435dc
***************
Karsten Hopp 1435dc
*** 2483,2489 ****
Karsten Hopp 1435dc
  #ifdef FEAT_CRYPT
Karsten Hopp 1435dc
  	    if (cryptkey != NULL)
Karsten Hopp 1435dc
  	    {
Karsten Hopp 1435dc
! 		STRCAT(IObuff, _("[crypted]"));
Karsten Hopp 1435dc
  		c = TRUE;
Karsten Hopp 1435dc
  	    }
Karsten Hopp 1435dc
  #endif
Karsten Hopp 1435dc
--- 2485,2494 ----
Karsten Hopp 1435dc
  #ifdef FEAT_CRYPT
Karsten Hopp 1435dc
  	    if (cryptkey != NULL)
Karsten Hopp 1435dc
  	    {
Karsten Hopp 1435dc
! 		if (crypt_method_used == 1)
Karsten Hopp 1435dc
! 		    STRCAT(IObuff, _("[blowfish]"));
Karsten Hopp 1435dc
! 		else
Karsten Hopp 1435dc
! 		    STRCAT(IObuff, _("[crypted]"));
Karsten Hopp 1435dc
  		c = TRUE;
Karsten Hopp 1435dc
  	    }
Karsten Hopp 1435dc
  #endif
Karsten Hopp 1435dc
***************
Karsten Hopp 1435dc
*** 3199,3204 ****
Karsten Hopp 1435dc
--- 3204,3212 ----
Karsten Hopp 1435dc
      int		    write_undo_file = FALSE;
Karsten Hopp 1435dc
      context_sha256_T sha_ctx;
Karsten Hopp 1435dc
  #endif
Karsten Hopp 1435dc
+ #ifdef FEAT_CRYPT
Karsten Hopp 1435dc
+     int		    crypt_method_used;
Karsten Hopp 1435dc
+ #endif
Karsten Hopp 1435dc
  
Karsten Hopp 1435dc
      if (fname == NULL || *fname == NUL)	/* safety check */
Karsten Hopp 1435dc
  	return FAIL;
Karsten Hopp 1435dc
***************
Karsten Hopp 1435dc
*** 4728,4733 ****
Karsten Hopp 1435dc
--- 4736,4742 ----
Karsten Hopp 1435dc
  	mch_set_acl(wfname, acl);
Karsten Hopp 1435dc
  #endif
Karsten Hopp 1435dc
  #ifdef FEAT_CRYPT
Karsten Hopp 1435dc
+     crypt_method_used = use_crypt_method;
Karsten Hopp 1435dc
      if (wb_flags & FIO_ENCRYPTED)
Karsten Hopp 1435dc
  	crypt_pop_state();
Karsten Hopp 1435dc
  #endif
Karsten Hopp 1435dc
***************
Karsten Hopp 1435dc
*** 4882,4888 ****
Karsten Hopp 1435dc
  #ifdef FEAT_CRYPT
Karsten Hopp 1435dc
  	if (wb_flags & FIO_ENCRYPTED)
Karsten Hopp 1435dc
  	{
Karsten Hopp 1435dc
! 	    STRCAT(IObuff, _("[crypted]"));
Karsten Hopp 1435dc
  	    c = TRUE;
Karsten Hopp 1435dc
  	}
Karsten Hopp 1435dc
  #endif
Karsten Hopp 1435dc
--- 4891,4900 ----
Karsten Hopp 1435dc
  #ifdef FEAT_CRYPT
Karsten Hopp 1435dc
  	if (wb_flags & FIO_ENCRYPTED)
Karsten Hopp 1435dc
  	{
Karsten Hopp 1435dc
! 	    if (crypt_method_used == 1)
Karsten Hopp 1435dc
! 		STRCAT(IObuff, _("[blowfish]"));
Karsten Hopp 1435dc
! 	    else
Karsten Hopp 1435dc
! 		STRCAT(IObuff, _("[crypted]"));
Karsten Hopp 1435dc
  	    c = TRUE;
Karsten Hopp 1435dc
  	}
Karsten Hopp 1435dc
  #endif
Karsten Hopp 1435dc
*** ../vim-7.3.132/src/version.c	2011-02-25 15:18:46.000000000 +0100
Karsten Hopp 1435dc
--- src/version.c	2011-02-25 16:42:58.000000000 +0100
Karsten Hopp 1435dc
***************
Karsten Hopp 1435dc
*** 716,717 ****
Karsten Hopp 1435dc
--- 716,719 ----
Karsten Hopp 1435dc
  {   /* Add new patch number below this line */
Karsten Hopp 1435dc
+ /**/
Karsten Hopp 1435dc
+     133,
Karsten Hopp 1435dc
  /**/
Karsten Hopp 1435dc
Karsten Hopp 1435dc
-- 
Karsten Hopp 1435dc
    [clop clop]
Karsten Hopp 1435dc
GUARD #1:  Halt!  Who goes there?
Karsten Hopp 1435dc
ARTHUR:    It is I, Arthur, son of Uther Pendragon, from the castle of
Karsten Hopp 1435dc
           Camelot.  King of the Britons, defeator of the Saxons, sovereign of
Karsten Hopp 1435dc
           all England!
Karsten Hopp 1435dc
GUARD #1:  Pull the other one!
Karsten Hopp 1435dc
                                  The Quest for the Holy Grail (Monty Python)
Karsten Hopp 1435dc
Karsten Hopp 1435dc
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 1435dc
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 1435dc
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 1435dc
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///