gnupg (14 files)

cvs user wk cvs at cvs.gnupg.org
Mon Mar 14 20:06:09 CET 2005


    Date: Monday, March 14, 2005 @ 20:19:21
  Author: wk
    Path: /cvs/gnupg/gnupg

Modified: TODO doc/ChangeLog doc/DETAILS doc/Makefile.am doc/README.W32
          g10/ChangeLog g10/card-util.c g10/cardglue.c g10/keygen.c
          g10/status.c g10/status.h scripts/ChangeLog scripts/mk-w32-dist
          scripts/w32installer.nsi

* cardglue.c (pin_cb): Disable debug output.

* mk-w32-dist: Check for patch files.
* w32installer.nsi: Translated a few more strings.  Print a
warning if permssions are not suitable for the installation.
Add Uninstaller entries.


--------------------------+
 TODO                     |   12 -----
 doc/ChangeLog            |    4 +
 doc/DETAILS              |    6 ++
 doc/Makefile.am          |    2 
 doc/README.W32           |    2 
 g10/ChangeLog            |   11 +++++
 g10/card-util.c          |    2 
 g10/cardglue.c           |    2 
 g10/keygen.c             |   16 +++++++
 g10/status.c             |    3 -
 g10/status.h             |    2 
 scripts/ChangeLog        |    7 +++
 scripts/mk-w32-dist      |   20 +++++----
 scripts/w32installer.nsi |   92 ++++++++++++++++++++++++++++++++++++++-------
 14 files changed, 141 insertions(+), 40 deletions(-)


Index: gnupg/TODO
diff -u gnupg/TODO:1.176 gnupg/TODO:1.177
--- gnupg/TODO:1.176	Thu Jan 27 11:30:28 2005
+++ gnupg/TODO	Mon Mar 14 20:19:21 2005
@@ -1,8 +1,3 @@
-* BACKUP Filename requires a status message. !!!!
-
-* Delete a card key as well as a wiping.
-
-
   * From: Nicolas Sierro 
     Date: Thu, 17 Jun 2004 12:31:24 +0200
     
@@ -11,12 +6,8 @@
     20% faster and the crc32 code about 50% faster. Some memory leaks were
     also fixed according to the ChangeLog.
     
-  * Reword the "Not enough entropy" messages.
-
   * Do we need a configure test for putenv?
 
-  * Replace "user id not found" in getkey.c by "no valid user ID found"?
- 
   * Describe some pitfalls when using EGD.  Check that ~/.gnupg/entropy
     really is the default.  What about needed permission?  
 
@@ -117,8 +108,7 @@
     given with an indication of the surname and the usable characters
     are also restricted.
 
-  * We status lines at least for bad PINs.  BAD_PASSPHARSE requires a
-    keyID though.
+  * Delete a card key as well as a wiping.
 
 
 Things we won't do
Index: gnupg/doc/ChangeLog
diff -u gnupg/doc/ChangeLog:1.98 gnupg/doc/ChangeLog:1.99
--- gnupg/doc/ChangeLog:1.98	Fri Mar 11 12:02:12 2005
+++ gnupg/doc/ChangeLog	Mon Mar 14 20:19:21 2005
@@ -1,3 +1,7 @@
+2005-03-14  Werner Koch  <wk at g10code.com>
+
+	* gnupg-w32.reg: Removed.
+
 2005-03-07  Werner Koch  <wk at g10code.com>
 
 	* gpg.sgml (comment): Add note to keep the comment short.
Index: gnupg/doc/DETAILS
diff -u gnupg/doc/DETAILS:1.89 gnupg/doc/DETAILS:1.90
--- gnupg/doc/DETAILS:1.89	Mon Mar  7 14:59:59 2005
+++ gnupg/doc/DETAILS	Mon Mar 14 20:19:21 2005
@@ -473,7 +473,7 @@
 
     SESSION_KEY  <algo>:<hexdigits>
 	The session key used to decrypt the message.  This message will
-	only be emmited when the special option --show-session-key
+	only be emitted when the special option --show-session-key
 	is used.  The format is suitable to be passed to the option
 	--override-session-key
 
@@ -583,6 +583,10 @@
         for certain operation and is mostly useful to check whether a
         PIN change really worked.
 
+    BACKUP_KEY_CREATED fingerprint fname
+        A backup key named FNAME has been created for the key wityh
+        KEYID.
+
 
 Format of the "--attribute-fd" output
 =====================================
Index: gnupg/doc/Makefile.am
diff -u gnupg/doc/Makefile.am:1.26 gnupg/doc/Makefile.am:1.27
--- gnupg/doc/Makefile.am:1.26	Thu Dec 16 11:28:50 2004
+++ gnupg/doc/Makefile.am	Mon Mar 14 20:19:21 2005
@@ -21,7 +21,7 @@
 AUTOMAKE_OPTIONS = no-texinfo.tex
 
 EXTRA_DIST = DETAILS gpg.sgml gpg.1 gpgv.sgml gpgv.1 faq.raw FAQ faq.html \
-             HACKING OpenPGP README.W32 samplekeys.asc gnupg.7 gnupg-w32.reg \
+             HACKING OpenPGP README.W32 samplekeys.asc gnupg.7 \
              TRANSLATE gpg.ru.sgml gpg.ru.1 highlights-1.4.txt
 
 man_MANS = gpg.1 gpgv.1 gnupg.7 gpg.ru.1
Index: gnupg/doc/README.W32
diff -u gnupg/doc/README.W32:1.8 gnupg/doc/README.W32:1.9
--- gnupg/doc/README.W32:1.8	Thu Feb  3 11:21:25 2005
+++ gnupg/doc/README.W32	Mon Mar 14 20:19:21 2005
@@ -33,7 +33,7 @@
 HKEY_CURRENT_USER\Software\GNU\GnuPG with the name "Lang".  This must
 match one of the installed languages files in the directory named
 "gnupg.nls" below the installation directory.  Note, that the ".mo"
-extension is not part of the lcoale id.
+extension is not part of the locale id.
 
 
 Home directory:
Index: gnupg/g10/ChangeLog
diff -u gnupg/g10/ChangeLog:1.703 gnupg/g10/ChangeLog:1.704
--- gnupg/g10/ChangeLog:1.703	Thu Mar 10 20:34:40 2005
+++ gnupg/g10/ChangeLog	Mon Mar 14 20:19:20 2005
@@ -1,3 +1,14 @@
+2005-03-14  Werner Koch  <wk at g10code.com>
+
+	* cardglue.c (pin_cb): Disable debug output.
+
+2005-03-11  Werner Koch  <wk at g10code.com>
+
+	* keygen.c (gen_card_key_with_backup): Write status line with the
+	backup filename.
+
+	* status.h, status.h (STATUS_BACKUP_KEY_CREATED): New.
+
 2005-03-10  David Shaw  <dshaw at jabberwocky.com>
 
 	* keyserver.c (parse_keyserver_options): Accept honor-http-proxy
Index: gnupg/g10/card-util.c
diff -u gnupg/g10/card-util.c:1.28 gnupg/g10/card-util.c:1.29
--- gnupg/g10/card-util.c:1.28	Mon Mar  7 14:59:59 2005
+++ gnupg/g10/card-util.c	Mon Mar 14 20:19:20 2005
@@ -578,7 +578,7 @@
 }
 
 
-/* Fetch the key from the URL given on teh card or try to get it from
+/* Fetch the key from the URL given on the card or try to get it from
    the default keyserver.  */
 static int
 fetch_url(void)
Index: gnupg/g10/cardglue.c
diff -u gnupg/g10/cardglue.c:1.23 gnupg/g10/cardglue.c:1.24
--- gnupg/g10/cardglue.c:1.23	Mon Mar  7 14:59:59 2005
+++ gnupg/g10/cardglue.c	Mon Mar 14 20:19:20 2005
@@ -659,7 +659,7 @@
   const char *ends, *s;
 
   *retstr = NULL;
-  log_debug ("asking for PIN '%s'\n", info);
+  /*   log_debug ("asking for PIN '%s'\n", info); */
 
   /* We use a special prefix to check whether the Admin PIN has been
      requested. */
Index: gnupg/g10/keygen.c
diff -u gnupg/g10/keygen.c:1.146 gnupg/g10/keygen.c:1.147
--- gnupg/g10/keygen.c:1.146	Tue Feb 15 12:02:31 2005
+++ gnupg/g10/keygen.c	Mon Mar 14 20:19:20 2005
@@ -3420,9 +3420,25 @@
       }
     else
       {
+        byte array[MAX_FINGERPRINT_LEN];
+        char *fprbuf, *p;
+       
         iobuf_close (fp);
         iobuf_ioctl (NULL, 2, 0, (char*)fname);
         log_info (_("NOTE: backup of card key saved to `%s'\n"), fname);
+
+        fingerprint_from_sk (sk, array, &n);
+        p = fprbuf = xmalloc (MAX_FINGERPRINT_LEN*2 + 1 + 1);
+        for (i=0; i < n ; i++, p += 2)
+          sprintf (p, "%02X", array[i]);
+        *p++ = ' ';
+        *p = 0;
+
+        write_status_text_and_buffer (STATUS_BACKUP_KEY_CREATED,
+                                      fprbuf,
+                                      fname, strlen (fname),
+                                      0);
+        xfree (fprbuf);
       }
     free_packet (pkt);
     m_free (pkt);
Index: gnupg/g10/status.c
diff -u gnupg/g10/status.c:1.49 gnupg/g10/status.c:1.50
--- gnupg/g10/status.c:1.49	Mon Mar  7 14:59:59 2005
+++ gnupg/g10/status.c	Mon Mar 14 20:19:20 2005
@@ -1,6 +1,6 @@
 /* status.c
  * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
- *               2004 Free Software Foundation, Inc.
+ *               2004, 2005 Free Software Foundation, Inc.
  *
  * This file is part of GnuPG.
  *
@@ -162,6 +162,7 @@
     case STATUS_SIG_SUBPACKET  : s = "SIG_SUBPACKET"; break;
     case STATUS_SC_OP_SUCCESS  : s = "SC_OP_SUCCESS"; break;
     case STATUS_SC_OP_FAILURE  : s = "SC_OP_FAILURE"; break;
+    case STATUS_BACKUP_KEY_CREATED:s="BACKUP_KEY_CREATED"; break;
     default: s = "?"; break;
     }
   return s;
Index: gnupg/g10/status.h
diff -u gnupg/g10/status.h:1.32 gnupg/g10/status.h:1.33
--- gnupg/g10/status.h:1.32	Mon Mar  7 14:59:59 2005
+++ gnupg/g10/status.h	Mon Mar 14 20:19:20 2005
@@ -113,6 +113,8 @@
 #define STATUS_SC_OP_FAILURE    79
 #define STATUS_SC_OP_SUCCESS    80
 
+#define STATUS_BACKUP_KEY_CREATED 81
+
 
 /*-- status.c --*/
 void set_status_fd ( int fd );
Index: gnupg/scripts/ChangeLog
diff -u gnupg/scripts/ChangeLog:1.65 gnupg/scripts/ChangeLog:1.66
--- gnupg/scripts/ChangeLog:1.65	Mon Mar  7 14:59:59 2005
+++ gnupg/scripts/ChangeLog	Mon Mar 14 20:19:20 2005
@@ -1,3 +1,10 @@
+2005-03-14  Werner Koch  <wk at g10code.com>
+
+	* mk-w32-dist: Check for patch files.
+	* w32installer.nsi: Translated a few more strings.  Print a
+	warning if permssions are not suitable for the installation.
+	Add Uninstaller entries.
+
 2005-02-16  David Shaw  <dshaw at jabberwocky.com>
 
 	* gnupg.spec.in: Fix problem with storing the gpgkeys helpers in
Index: gnupg/scripts/mk-w32-dist
diff -u gnupg/scripts/mk-w32-dist:1.18 gnupg/scripts/mk-w32-dist:1.19
--- gnupg/scripts/mk-w32-dist:1.18	Wed Feb 16 14:27:57 2005
+++ gnupg/scripts/mk-w32-dist	Mon Mar 14 20:19:20 2005
@@ -122,15 +122,17 @@
   cp ${srcdir}/$i $i.txt
   todos $i.txt
 done
-for i in README.W32 ; do
-  cp ${srcdir}/doc/$i $i.txt
-  todos $i.txt
-done
-for i in gnupg-w32.reg; do
-  cp ${srcdir}/doc/$i .
-  todos $i
+
+cp ${srcdir}/doc/README.W32 README-W32.txt
+todos README-W32.txt
+
+patches_defs=
+for i in `find "$topdir/patches" -type f -name '*.diff'`; do
+  cp $i .
+  patches_defs="-DWITH_PATCHES"
 done
 
+
 # We must distribute the MO files in UTF-8, the conversion is done by
 # gpg at runtime.  To include English at the right position in the list we 
 # need a special case.
@@ -217,11 +219,11 @@
   echo makensis -v2 -nocd -DVERSION="${version}" \
            -DPROD_VERSION="${prod_version}" \
            -DGNUPG_SRCDIR="${srcdir}" ${winpt_defs} ${src_defs} \
-           ${srcdir}/scripts/w32installer.nsi
+           ${patches_defs} ${srcdir}/scripts/w32installer.nsi
   BUILDINFO=$buildinfo makensis -v2 -nocd -DVERSION="${version}" \
            -DPROD_VERSION="${prod_version}" \
            -DGNUPG_SRCDIR="${srcdir}" ${winpt_defs} ${src_defs} \
-           ${srcdir}/scripts/w32installer.nsi
+           ${patches_defs} ${srcdir}/scripts/w32installer.nsi
   echo "Installer created" >&2
 else
   zip -9 "gnupg-w32cli-${version}.zip" *
Index: gnupg/scripts/w32installer.nsi
diff -u gnupg/scripts/w32installer.nsi:1.7 gnupg/scripts/w32installer.nsi:1.8
--- gnupg/scripts/w32installer.nsi:1.7	Wed Feb 16 21:08:12 2005
+++ gnupg/scripts/w32installer.nsi	Mon Mar 14 20:19:20 2005
@@ -83,20 +83,15 @@
 !insertmacro MUI_PAGE_WELCOME
 
 
-!define MUI_PAGE_HEADER_SUBTEXT \
-  "This software is licensed under the terms of the GNU General Public \
-   License (GPL) which guarantees your freedom to share and change Free \
-   Software."
+!define MUI_PAGE_HEADER_SUBTEXT "$(T_GPLHeader)"
 
-!define MUI_LICENSEPAGE_TEXT_BOTTOM \
-  "In short: You are allowed to run this software for any purpose. \
-   You may distribute it as long as you give the recipients the same \
-   rights you have received."
+!define MUI_LICENSEPAGE_TEXT_BOTTOM "$(T_GPLShort)"
 
 !define MUI_LICENSEPAGE_BUTTON "$(^NextBtn)"
 
 !insertmacro MUI_PAGE_LICENSE "COPYING.txt"
 
+!define MUI_PAGE_CUSTOMFUNCTION_SHOW PrintNonAdminWarning
 !insertmacro MUI_PAGE_COMPONENTS
 
 Page custom CustomPageOptions
@@ -111,10 +106,9 @@
 
 !insertmacro MUI_PAGE_INSTFILES
 
-!define MUI_FINISHPAGE_SHOWREADME "README.W32.txt"
+!define MUI_FINISHPAGE_SHOWREADME "README-W32.txt"
 !define MUI_FINISHPAGE_SHOWREADME_TEXT "$(T_ShowReadme)"
-!define MUI_FINISHPAGE_LINK \
-  "Visit the GnuPG website for latest news and support"
+!define MUI_FINISHPAGE_LINK "$(T_FiniLink)"
 !define MUI_FINISHPAGE_LINK_LOCATION "http://www.gnupg.org/"
 !insertmacro MUI_PAGE_FINISH
 
@@ -138,6 +132,8 @@
 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
 ReserveFile "opt.ini" 
 ReserveFile "COPYING.txt"
+ReserveFile "${NSISDIR}/Plugins/UserInfo.dll"
+
 
 ${StrStr} # Supportable for Install Sections and Functions
 ${StrTok} # Supportable for Install Sections and Functions
@@ -164,7 +160,7 @@
   SetOutPath "$INSTDIR\Doc"
 
   File "README.txt"
-  File "README.W32.txt"
+  File "README-W32.txt"
   File "COPYING.txt"
 
   Call InstallIconv
@@ -230,6 +226,11 @@
   File "NEWS.winpt.txt"
 !endif ; WITH_WINPT
 
+!ifdef WITH_PATCHES
+  SetOutPath "$INSTDIR\Src"
+  File '*.diff'
+!endif
+
 SectionEnd ; Section Documentation
 
 
@@ -260,6 +261,18 @@
   ;;--------------------------
   WriteUninstaller "$INSTDIR\uninst-gnupg.exe"
 
+  StrCpy $MYTMP "Software\Microsoft\Windows\CurrentVersion\Uninstall\GnuPG"
+  WriteRegExpandStr HKLM $MYTMP "UninstallString" '"$INSTDIR\uninst-gnupg.exe"'
+  WriteRegExpandStr HKLM $MYTMP "InstallLocation" "$INSTDIR"
+  WriteRegStr       HKLM $MYTMP "DisplayName"     "GNU Privacy Guard"
+  WriteRegStr       HKLM $MYTMP "DisplayIcon"     "$INSTDIR\gpg.exe,0"
+  WriteRegStr       HKLM $MYTMP "DisplayVersion"  "${VERSION}"
+  WriteRegStr       HKLM $MYTMP "Publisher"       "Free Software Foundation"
+  WriteRegStr       HKLM $MYTMP "URLInfoAbout"    "http://www.gnupg.org/"
+  WriteRegDWORD     HKLM $MYTMP "NoModify"        "1"
+  WriteRegDWORD     HKLM $MYTMP "NoRepair"        "1"
+
+
   ;;---------------------
   ;; Create Menu entries
   ;;---------------------
@@ -270,7 +283,7 @@
   CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\GnuPG README.lnk" \
                  "$INSTDIR\Doc\README.txt"
   CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\GnuPG README.Windows.lnk" \
-                 "$INSTDIR\Doc\README.W32.txt"
+                 "$INSTDIR\Doc\README-W32.txt"
   CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\GnuPG NEWS.lnk" \
                  "$INSTDIR\Doc\NEWS.txt"
 
@@ -353,7 +366,7 @@
   Delete "$INSTDIR\gpgkeys_ldap.exe"
 
   Delete "$INSTDIR\Doc\README.txt"
-  Delete "$INSTDIR\Doc\README.W32.txt"
+  Delete "$INSTDIR\Doc\README-W32.txt"
   Delete "$INSTDIR\Doc\COPYING.txt"
   Delete "$INSTDIR\Doc\COPYING.LIB.txt"
   Delete "$INSTDIR\Doc\README.iconv.txt"
@@ -408,6 +421,7 @@
   DeleteRegValue HKCU "Software\GNU\GnuPG" "Start Menu Folder"
   DeleteRegValue HKLM "Software\GNU\GnuPG" "Install Directory"
   DeleteRegKey /ifempty HKLM "Software\GNU\GnuPG"
+  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GnuPG"
 
 SectionEnd ; Uninstall
 
@@ -438,6 +452,22 @@
 FunctionEnd
 
 
+;; Check whether the current user is in the Administrator group or
+;; an OS version without the need for an Administrator is in use.
+;; Print a warning if this is not the case.
+Function PrintNonAdminWarning
+  ClearErrors
+  UserInfo::GetName
+  IfErrors leave
+  Pop $0
+  UserInfo::GetAccountType
+  Pop $1
+  StrCmp $1 "Admin" leave +1
+  MessageBox MB_OK "$(T_AdminNeeded)"
+
+ leave:
+FunctionEnd
+
 
 Function CustomPageOptions  
   SectionGetFlags ${SecNLS} $R0 
@@ -531,6 +561,40 @@
    \r\n\r\n\r\n\r\n\r\nDies ist GnuPG version ${VERSION}\r\n\
    erstellt am $%BUILDINFO%"
 
+; Startup page
+LangString T_GPLHeader ${LANG_ENGLISH} \
+  "This software is licensed under the terms of the GNU General Public \
+   License (GPL) which guarantees your freedom to share and change Free \
+   Software."
+LangString T_GPLHeader ${LANG_GERMAN}} \
+  "Diese Software ist unter der GNU General Public License \
+   (GPL) lizensiert; dies gibt Ihnen die Freiheit, sie \
+   zu ändern und weiterzugeben."
+
+LangString T_GPLShort ${LANG_ENGLISH} \
+  "In short: You are allowed to run this software for any purpose. \
+   You may distribute it as long as you give the recipients the same \
+   rights you have received."
+LangString T_GPLShort ${LANG_GERMAN} \
+  "In aller Kürze: Sie haben das Recht, die Software zu jedem Zweck \
+   einzusetzen.  Sie können die Software weitergeben, sofern Sie dem \
+   Empfänger dieselben Rechte einräumen, die auch Sie erhalten haben."
+
+
+; Finish page
+LangString T_FiniLink ${LANG_ENGLISH} \
+  "Visit the GnuPG website for latest news and support"
+LangString T_FiniLink ${LANG_GERMAN}} \
+  "Zur GnuPG Website mit Neuigkeiten und Hilfsangeboten"
+
+; From Function PrintNonAdminWarning
+LangString T_AdminNeeded ${LANG_ENGLISH} \
+   "Warning: Administrator permissions required for a successful installation"
+LangString T_AdminNeeded ${LANG_GERMAN} \
+   "Warnung: Administrator Reche werden für eine erfolgreiche \
+    Installation benötigt."
+
+
 ; Installation options like language used for GnuPG
 LangString T_InstallOptions ${LANG_ENGLISH} "Install Options"
 LangString T_InstallOptions ${LANG_GERMAN}  "Installationsoptionen"




More information about the Gnupg-commits mailing list