[Gpg4win-commits] [git] Gpg4win - branch, master, updated. gpg4win-2.3.0-27-gca3adc9
by Andre Heinecke
cvs at cvs.gnupg.org
Tue Dec 8 17:31:41 CET 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG for Windows".
The branch, master has been updated
via ca3adc942a2527e4a7cf690d17a58538bd61598e (commit)
via 2e6e968964aebde7d4879009bd231f6145a5001c (commit)
via 5985b927e7ee2274cefcb1a32718f75d82078be9 (commit)
via 54f03068cf01a80ebc7717f22f67b66762b280c7 (commit)
from edb5ba81a7cb4523d02ed8619f1ad157c09ff443 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ca3adc942a2527e4a7cf690d17a58538bd61598e
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Tue Dec 8 17:28:32 2015 +0100
Uninstall old version on update
* src/inst-gpg4win.nsi (CheckExistingVersion): Remove message boxes.
* src/installer.nsi: Call uninstaller of old version if neccessary.
* src/uninst-gnupg-w32.nsi: Fix waiting for the uninstaller.
--
The messages provided no real information or choices. Uninstalling
is also cleaner then the usual case of overwriting.
diff --git a/src/inst-gpg4win.nsi b/src/inst-gpg4win.nsi
index 0e63295..a7be820 100644
--- a/src/inst-gpg4win.nsi
+++ b/src/inst-gpg4win.nsi
@@ -24,6 +24,19 @@ Section "-gpg4win" SEC_gpg4win
SetOutPath "$INSTDIR"
File "${BUILD_DIR}/../gpg4win-${VERSION}.tar.bz2"
!else
+
+# Uninstall an old version if found.
+ ClearErrors
+ ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPG4Win" "DisplayVersion"
+ IfErrors skip_uninst 0
+ StrCmp $0 "" skip_uninst
+ DetailPrint "$(T_UninstallingOldVersion)$0"
+ ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPG4Win" "UninstallString"
+ ReadRegStr $1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPG4Win" "InstallLocation"
+ ExecWait '$0 /S _?=$1'
+ Delete "$0"
+ RmDir "$1"
+skip_uninst:
SetOutPath "$INSTDIR\share\gpg4win"
File "${BUILD_DIR}/README.en.txt"
diff --git a/src/installer.nsi b/src/installer.nsi
index 865e6bf..ab89c33 100644
--- a/src/installer.nsi
+++ b/src/installer.nsi
@@ -375,7 +375,7 @@ FunctionEnd
Function CheckExistingVersion
ClearErrors
FileOpen $0 "$INSTDIR\VERSION" r
- IfErrors nexttest
+ IfErrors leave
FileRead $0 $R0
FileRead $0 $R1
FileClose $0
@@ -386,32 +386,10 @@ Function CheckExistingVersion
# Extract major version.
StrCpy $0 $R1 2
- StrCmp $0 "1." 0 secondtest
+ StrCmp $0 "1." 0 leave
MessageBox MB_YESNO "$(T_FoundExistingOldVersion)" IDYES leave
Abort
- secondtest:
- MessageBox MB_YESNO "$(T_FoundExistingVersion)" IDYES leave
- Abort
-
- nexttest:
- ClearErrors
- ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPG4Win" "DisplayVersion"
- IfErrors leave 0
- StrCmp $0 ${VERSION} sameversion otherversion
- otherversion:
- MessageBox MB_YESNO "$(T_FoundExistingOldVersion)" IDYES uninstall
- Abort
- sameversion:
- MessageBox MB_YESNO "$(T_FoundExistingVersionB)" IDYES leave
- Abort
-
- uninstall:
- ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPG4Win" "UninstallString"
- ExecWait '$0 /S'
-
- # TODO This is the normal update case. Handle more gracefully.
- # Especially the install path change from 2.x to 3.x
leave:
FunctionEnd
@@ -522,12 +500,8 @@ LangString T_FoundExistingOldVersion ${LANG_ENGLISH} \
strongly recommended to deinstall previous versions on \
major upgrades. $\r$\n\
Do you want to continue installing Gpg4win ${VERSION} anyway?"
-LangString T_FoundExistingVersionB ${LANG_ENGLISH} \
- "A version of Gpg4Win has already been installed on the system. \
- There will be no problem installing and thus overwriting this \
- Version. $\r$\n\
- $\r$\n\
- Do you want to continue installing Gpg4win?"
+LangString T_UninstallingOldVersion ${LANG_ENGLISH} \
+ "Uninstalling Gpg4win-"
#---------------------------------------------
diff --git a/src/uninst-gnupg-w32.nsi b/src/uninst-gnupg-w32.nsi
index c7cea5a..0ec906e 100644
--- a/src/uninst-gnupg-w32.nsi
+++ b/src/uninst-gnupg-w32.nsi
@@ -29,12 +29,16 @@ Section "un.gnupg_w32"
Push "${gpg4win_pkg_gnupg_w32}"
Call un.SourceDelete
!else
+ ClearErrors
ReadRegStr $0 HKLM "Software\GnuPG" "Install Directory"
+ IfErrors gnupg_w32_not_installed 0
# It is possible that someone uninstalled gnupg without uninstalling
# gpg4win
StrCmp $0 "" gnupg_w32_not_installed
DetailPrint "$(T_Uninstalling_GnuPG) ${gpg4win_pkg_gnupg_w32_version}"
- ExecWait '"$0\gnupg-uninstall.exe" /S'
+ ExecWait '"$0\gnupg-uninstall.exe" /S _?=$0'
+ Delete "$0\gnupg-uninstall.exe"
+ RmDir "$0"
gnupg_w32_not_installed:
!endif
SectionEnd
commit 2e6e968964aebde7d4879009bd231f6145a5001c
Author: Sean Engelhardt <sean.engelhardt at intevation.de>
Date: Tue Dec 8 11:02:23 2015 +0100
Update mkportable
* src/mkportable-full.h: remove references to non existing files,
link existing files to their new file-path
* src/mkportable-light.h: remove references to non existing files,
link existing files to their new file-path
* src/mkportable-vanilla.h: remove references to non existing files,
link existing files to their new file-path
* src/mkportable.c: adjust the new path of gpgconf.exe
diff --git a/src/mkportable-full.h b/src/mkportable-full.h
index f2df2fe..3d0d1c8 100644
--- a/src/mkportable-full.h
+++ b/src/mkportable-full.h
@@ -11,9 +11,7 @@ const char * const full_files[] =
"dbus-launch.exe",
"dbus-monitor.exe",
"dbus-send.exe",
- "dirmngr-client.exe",
- "dirmngr.exe",
- "dirmngr_ldap.exe",
+ "../GnuPG/bin/dirmngr.exe",
"etc/fonts/fonts.conf",
"etc/gtk-2.0/im-multipress.conf",
"etc/pango/pango.modules",
@@ -29,33 +27,24 @@ const char * const full_files[] =
"glib-genmarshal.exe",
"gobject-query.exe",
"gpa.exe",
- "gpg-agent.exe",
- "gpg-connect-agent.exe",
+ "../GnuPG/bin/gpg-agent.exe",
+ "../GnuPG/bin/gpg-connect-agent.exe",
"gpg-error.exe",
- "gpg-preset-passphrase.exe",
- "gpg-protect-tool.exe",
- "gpg2.exe",
- "gpg2keys_curl.exe",
- "gpg2keys_finger.exe",
- "gpg2keys_hkp.exe",
- "gpg2keys_kdns.exe",
- "gpg2keys_ldap.exe",
- "gpgconf.exe",
+ "../GnuPG/bin/gpgconf.exe",
"gpgme-w32spawn.exe",
- "gpgsm.exe",
- "gpgtar.exe",
- "gpgv2.exe",
+ "../GnuPG/bin/gpgsm.exe",
+ "../GnuPG/bin/gpgtar.exe",
"gresource.exe",
"gsettings.exe",
"gspawn-win32-helper-console.exe",
"gspawn-win32-helper.exe",
"gtk-query-immodules-2.0.exe",
"gtk-update-icon-cache.exe",
- "include/assuan.h",
- "include/gcrypt.h",
+ "../GnuPG/include/assuan.h",
+ "../GnuPG/include/gcrypt.h",
"include/gpg-error.h",
"include/gpgme.h",
- "include/ksba.h",
+ "../GnuPG/include/ksba.h",
"intl.dll",
"kbuildsycoca4.exe",
"kdebugdialog.exe",
@@ -77,14 +66,13 @@ const char * const full_files[] =
"lib/gtk-2.0/2.10.0/immodules/im-viqr.dll",
"lib/gtk-2.0/modules/libgail.dll",
"lib/kde4/kcm_kleopatra.dll",
- "libadns-1.dll",
- "libassuan-0.dll",
+ "../GnuPG/bin/libadns-1.dll",
+ "../GnuPG/bin/libassuan-0.dll",
"libatk-1.0-0.dll",
"libattica.dll",
"libcairo-2.dll",
"libcairo-gobject-2.dll",
"libcairo-script-interpreter-2.dll",
- "libcurl-4.dll",
"libdbus-1.dll",
"libdbusmenu-qt.dll",
"libexpat-1.dll",
@@ -93,21 +81,17 @@ const char * const full_files[] =
"libfontconfig-1.dll",
"libgailutil-18.dll",
"libgcc_s_sjlj-1.dll",
- "libgcrypt-20.dll",
+ "../GnuPG/bin/libgcrypt-20.dll",
"libgdk-win32-2.0-0.dll",
"libgdk_pixbuf-2.0-0.dll",
"libgio-2.0-0.dll",
"libglib-2.0-0.dll",
"libgmodule-2.0-0.dll",
- "libgnutls-26.dll",
- "libgnutls-extra-26.dll",
- "libgnutls-openssl-27.dll",
"libgobject-2.0-0.dll",
"libgpg-error-0.dll",
"libgpgme++.dll",
"libgpgme-11.dll",
"libgpgme-glib-11.dll",
- "libgsasl-7.dll",
"libgthread-2.0-0.dll",
"libgtk-win32-2.0-0.dll",
"libiconv-2.dll",
@@ -120,20 +104,18 @@ const char * const full_files[] =
"libkleopatraclientcore.dll",
"libkleopatraclientgui.dll",
"libkmime.dll",
- "libksba-8.dll",
+ "../GnuPG/bin/libksba-8.dll",
"libpango-1.0-0.dll",
"libpangocairo-1.0-0.dll",
"libpangoft2-1.0-0.dll",
"libpangowin32-1.0-0.dll",
"libpng14-14.dll",
"libqgpgme.dll",
- "libtasn1-3.dll",
- "libw32pth-0.dll",
"md5sum.exe",
"pango-querymodules.exe",
"paperkey.exe",
"pinentry-gtk-2.exe",
- "pinentry-qt4.exe",
+ "pinentry-qt.exe",
"pinentry-w32.exe",
"plugins/imageformats/qgif4.dll",
"plugins/imageformats/qico4.dll",
@@ -142,14 +124,10 @@ const char * const full_files[] =
"plugins/imageformats/qsvg4.dll",
"plugins/imageformats/qtiff4.dll",
"pub/gpa.exe",
- "pub/gpg-connect-agent.exe",
- "pub/gpg.exe",
- "pub/gpg2.exe",
- "pub/gpgconf.exe",
- "pub/gpgsm.exe",
- "pub/gpgv.exe",
- "pub/libgcc_s_sjlj-1.dll",
- "pub/libstdc++-6.dll",
+ "../GnuPG/bin/gpg-connect-agent.exe",
+ "../GnuPG/bin/gpg.exe",
+ "../GnuPG/bin/gpgsm.exe",
+ "../GnuPG/bin/gpgv.exe",
"qdbus.exe",
"qt.conf",
"QtCore4.dll",
@@ -158,8 +136,7 @@ const char * const full_files[] =
"QtNetwork4.dll",
"QtSvg4.dll",
"QtXml4.dll",
- "scdaemon.exe",
- "scute.dll",
+ "../GnuPG/bin/scdaemon.exe",
"sha1sum.exe",
"sha256sum.exe",
"share/applications/kde4/kleopatra.desktop",
@@ -318,17 +295,9 @@ const char * const full_files[] =
"share/doc/HTML/en/kleopatra/menuview.html",
"share/doc/HTML/en/kleopatra/menuwindow.html",
"share/glib-2.0/schemas/gschema.dtd",
- "share/gnupg/gpg-agent.man",
- "share/gnupg/gpg-conf.skel",
- "share/gnupg/gpg-connect-agent.man",
- "share/gnupg/gpg2.man",
- "share/gnupg/gpgconf.man",
- "share/gnupg/gpgsm.man",
- "share/gnupg/gpgv2.man",
+ "../GnuPG/share/gnupg/gpg-conf.skel",
"share/gnupg/help.*.txt",
"share/gnupg/paperkey.man",
- "share/gnupg/qualified.txt",
- "share/gnupg/scdaemon.man",
"share/gpa/gpa-logo.ppm",
"share/gpa/gpa.png",
"share/gpg4win/gpg4win-compendium-de.pdf",
diff --git a/src/mkportable-light.h b/src/mkportable-light.h
index 91ee2f1..7405c4b 100644
--- a/src/mkportable-light.h
+++ b/src/mkportable-light.h
@@ -1,8 +1,6 @@
const char * const light_files[] =
{
- "dirmngr-client.exe",
- "dirmngr.exe",
- "dirmngr_ldap.exe",
+ "../GnuPG/bin/dirmngr.exe",
"etc/fonts/fonts.conf",
"etc/gtk-2.0/im-multipress.conf",
"etc/pango/pango.modules",
@@ -16,22 +14,13 @@ const char * const light_files[] =
"glib-genmarshal.exe",
"gobject-query.exe",
"gpa.exe",
- "gpg-agent.exe",
- "gpg-connect-agent.exe",
+ "../GnuPG/bin/gpg-agent.exe",
+ "../GnuPG/bin/gpg-connect-agent.exe",
"gpg-error.exe",
- "gpg-preset-passphrase.exe",
- "gpg-protect-tool.exe",
- "gpg2.exe",
- "gpg2keys_curl.exe",
- "gpg2keys_finger.exe",
- "gpg2keys_hkp.exe",
- "gpg2keys_kdns.exe",
- "gpg2keys_ldap.exe",
- "gpgconf.exe",
+ "../GnuPG/bin/gpgconf.exe",
"gpgme-w32spawn.exe",
- "gpgsm.exe",
- "gpgtar.exe",
- "gpgv2.exe",
+ "../GnuPG/bin/gpgsm.exe",
+ "../GnuPG/bin/gpgtar.exe",
"gresource.exe",
"gsettings.exe",
"gspawn-win32-helper-console.exe",
@@ -53,73 +42,53 @@ const char * const light_files[] =
"lib/gtk-2.0/2.10.0/immodules/im-ti-et.dll",
"lib/gtk-2.0/2.10.0/immodules/im-viqr.dll",
"lib/gtk-2.0/modules/libgail.dll",
- "libadns-1.dll",
- "libassuan-0.dll",
+ "../GnuPG/bin/libadns-1.dll",
+ "../GnuPG/bin/libassuan-0.dll",
"libatk-1.0-0.dll",
"libcairo-2.dll",
"libcairo-gobject-2.dll",
"libcairo-script-interpreter-2.dll",
- "libcurl-4.dll",
"libexpat-1.dll",
"libffi-6.dll",
"libfontconfig-1.dll",
"libgailutil-18.dll",
- "libgcrypt-20.dll",
+ "../GnuPG/bin/libgcrypt-20.dll",
"libgdk-win32-2.0-0.dll",
"libgdk_pixbuf-2.0-0.dll",
"libgio-2.0-0.dll",
"libglib-2.0-0.dll",
"libgmodule-2.0-0.dll",
- "libgnutls-26.dll",
- "libgnutls-extra-26.dll",
- "libgnutls-openssl-27.dll",
"libgobject-2.0-0.dll",
"libgpg-error-0.dll",
"libgpgme-11.dll",
"libgpgme-glib-11.dll",
- "libgsasl-7.dll",
"libgthread-2.0-0.dll",
"libgtk-win32-2.0-0.dll",
"libiconv-2.dll",
"libintl-8.dll",
- "libksba-8.dll",
+ "../GnuPG/bin/libksba-8.dll",
"libpango-1.0-0.dll",
"libpangocairo-1.0-0.dll",
"libpangoft2-1.0-0.dll",
"libpangowin32-1.0-0.dll",
"libpng14-14.dll",
- "libtasn1-3.dll",
- "libw32pth-0.dll",
"md5sum.exe",
"pango-querymodules.exe",
"paperkey.exe",
"pinentry-gtk-2.exe",
"pinentry-w32.exe",
"pub/gpa.exe",
- "pub/gpg-connect-agent.exe",
- "pub/gpg.exe",
- "pub/gpg2.exe",
- "pub/gpgconf.exe",
- "pub/gpgsm.exe",
- "pub/gpgv.exe",
- "pub/libgcc_s_sjlj-1.dll",
- "pub/libstdc++-6.dll",
- "scdaemon.exe",
- "scute.dll",
+ "../GnuPG/bin/gpg-connect-agent.exe",
+ "../GnuPG/bin/gpg.exe",
+ "../GnuPG/bin/gpgsm.exe",
+ "../GnuPG/bin/gpgv.exe",
+ "../GnuPG/bin/scdaemon.exe",
"sha1sum.exe",
"sha256sum.exe",
"share/glib-2.0/schemas/gschema.dtd",
- "share/gnupg/gpg-agent.man",
- "share/gnupg/gpg-conf.skel",
- "share/gnupg/gpg-connect-agent.man",
- "share/gnupg/gpg2.man",
- "share/gnupg/gpgconf.man",
- "share/gnupg/gpgsm.man",
- "share/gnupg/gpgv2.man",
+ "../GnuPG/share/gnupg/gpg-conf.skel",
"share/gnupg/help.*.txt",
"share/gnupg/paperkey.man",
- "share/gnupg/qualified.txt",
- "share/gnupg/scdaemon.man",
"share/gpa/gpa-logo.ppm",
"share/gpa/gpa.png",
"share/gpg4win/HOWTO-SMIME.*.txt",
diff --git a/src/mkportable-vanilla.h b/src/mkportable-vanilla.h
index cbed38e..a401c57 100644
--- a/src/mkportable-vanilla.h
+++ b/src/mkportable-vanilla.h
@@ -1,67 +1,37 @@
const char * const vanilla_files[] =
{
- "dirmngr-client.exe",
- "dirmngr.exe",
- "dirmngr_ldap.exe",
+ "../GnuPG/bin/dirmngr.exe",
"gdk-pixbuf-pixdata.exe",
"gdk-pixbuf-query-loaders.exe",
- "gpg-agent.exe",
- "gpg-connect-agent.exe",
+ "../GnuPG/bin/gpg-agent.exe",
+ "../GnuPG/bin/gpg-connect-agent.exe",
"gpg-error.exe",
- "gpg-preset-passphrase.exe",
- "gpg-protect-tool.exe",
- "gpg2.exe",
- "gpg2keys_curl.exe",
- "gpg2keys_finger.exe",
- "gpg2keys_hkp.exe",
- "gpg2keys_kdns.exe",
- "gpg2keys_ldap.exe",
- "gpgconf.exe",
- "gpgsm.exe",
- "gpgtar.exe",
- "gpgv2.exe",
+ "../GnuPG/bin/gpgconf.exe",
+ "../GnuPG/bin/gpgsm.exe",
+ "../GnuPG/bin/gpgtar.exe",
"intl.dll",
- "libadns-1.dll",
- "libassuan-0.dll",
- "libcurl-4.dll",
+ "../GnuPG/bin/libadns-1.dll",
+ "../GnuPG/bin/libassuan-0.dll",
"libffi-6.dll",
- "libgcrypt-20.dll",
+ "../GnuPG/bin/libgcrypt-20.dll",
"libgdk_pixbuf-2.0-0.dll",
- "libgnutls-26.dll",
- "libgnutls-extra-26.dll",
- "libgnutls-openssl-27.dll",
"libgpg-error-0.dll",
"libiconv-2.dll",
"libintl-8.dll",
- "libksba-8.dll",
- "libtasn1-3.dll",
- "libw32pth-0.dll",
+ "../GnuPG/bin/libksba-8.dll",
"md5sum.exe",
"paperkey.exe",
"pinentry-w32.exe",
- "pub/gpg-connect-agent.exe",
- "pub/gpg.exe",
- "pub/gpg2.exe",
- "pub/gpgconf.exe",
- "pub/gpgsm.exe",
- "pub/gpgv.exe",
- "pub/libgcc_s_sjlj-1.dll",
- "pub/libstdc++-6.dll",
- "scdaemon.exe",
- "scute.dll",
+ "../GnuPG/bin/gpg-connect-agent.exe",
+ "../GnuPG/bin/gpg.exe",
+ "../GnuPG/bin/gpgsm.exe",
+ "../GnuPG/bin/gpgv.exe",
+ "../GnuPG/bin/scdaemon.exe",
"sha1sum.exe",
"sha256sum.exe",
- "share/gnupg/gpg-agent.man",
- "share/gnupg/gpg-conf.skel",
- "share/gnupg/gpg-connect-agent.man",
- "share/gnupg/gpg2.man",
- "share/gnupg/gpgconf.man",
- "share/gnupg/gpgsm.man",
- "share/gnupg/gpgv2.man",
+ "../GnuPG/share/gnupg/gpg-conf.skel",
"share/gnupg/help.*.txt",
"share/gnupg/paperkey.man",
- "share/gnupg/qualified.txt",
- "share/gnupg/scdaemon.man",
"share/gpg4win/HOWTO-SMIME.*.txt",
"share/gpg4win/README.*.txt",
"share/gpg4win/versioninfo.txt",
diff --git a/src/mkportable.c b/src/mkportable.c
index 2bf11aa..c28b048 100644
--- a/src/mkportable.c
+++ b/src/mkportable.c
@@ -347,7 +347,7 @@ check_all_files (void)
int i;
/* First a quick check for gpgconf. */
- name = "gpgconf.exe";
+ name = "../GnuPG/bin/gpgconf.exe";
if (access_sourcename (name))
{
err ("file '%s' not found in the source directory", name);
@@ -594,7 +594,7 @@ copy_all_files (void)
to install a copy under the name pinentry.exe. */
switch (install_type)
{
- case iFULL: copy_file ("pinentry-qt4.exe", "pinentry.exe"); break;
+ case iFULL: copy_file ("pinentry-qt.exe", "pinentry.exe"); break;
case iLIGHT: copy_file ("pinentry-gtk-2.exe", "pinentry.exe"); break;
case iVANILLA: copy_file ("pinentry-w32.exe", "pinentry.exe"); break;
}
commit 5985b927e7ee2274cefcb1a32718f75d82078be9
Author: Sean Engelhardt <sean.engelhardt at intevation.de>
Date: Tue Dec 8 15:12:01 2015 +0100
Ask to uninstall old versions on upgrade
* src/installer.nsi (CheckExistingVersion): Ask to uninstall
old version.
--
If an other version was detected, the user will receive an
accordingly information. If the user chooses to proceed the
installation, the uninstaller of the old version will be executed.
Commit message amended by Andre Heinecke <aheinecke at intevation.de>
diff --git a/src/installer.nsi b/src/installer.nsi
index 88a735e..865e6bf 100644
--- a/src/installer.nsi
+++ b/src/installer.nsi
@@ -398,8 +398,17 @@ Function CheckExistingVersion
ClearErrors
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPG4Win" "DisplayVersion"
IfErrors leave 0
- MessageBox MB_YESNO "$(T_FoundExistingVersionB)" IDYES leave
- Abort
+ StrCmp $0 ${VERSION} sameversion otherversion
+ otherversion:
+ MessageBox MB_YESNO "$(T_FoundExistingOldVersion)" IDYES uninstall
+ Abort
+ sameversion:
+ MessageBox MB_YESNO "$(T_FoundExistingVersionB)" IDYES leave
+ Abort
+
+ uninstall:
+ ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPG4Win" "UninstallString"
+ ExecWait '$0 /S'
# TODO This is the normal update case. Handle more gracefully.
# Especially the install path change from 2.x to 3.x
commit 54f03068cf01a80ebc7717f22f67b66762b280c7
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Mon Nov 30 15:40:24 2015 +0100
Remove obsolete patches from 2.x merge
* patches/gnupg2-2.0.29: Removed.
diff --git a/patches/gnupg2-2.0.29/0001-Enable-wildcard-expansion-with-mingw-w64.patch b/patches/gnupg2-2.0.29/0001-Enable-wildcard-expansion-with-mingw-w64.patch
deleted file mode 100755
index 6c5b9f8..0000000
--- a/patches/gnupg2-2.0.29/0001-Enable-wildcard-expansion-with-mingw-w64.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-patch -p1 -l -f $* < $0
-exit $?
-
-From f80d5af3ad8705cf439db380cc846a647d67bcbd Mon Sep 17 00:00:00 2001
-From: Andre Heinecke <aheinecke at intevation.de>
-Date: Tue, 12 Aug 2014 21:22:23 +0200
-Subject: [PATCH] Enable wildcard expansion with mingw-w64
-
- * g10/gpg.c: Define _dowildcard = -1;
-
---
- If this value is defined wildcard support in the c runtime
- is enabled again. See mingw-w64 crt/CRT_glob.c
----
- g10/gpg.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/g10/gpg.c b/g10/gpg.c
-index 1a8e6e7..437e7f0 100644
---- a/g10/gpg.c
-+++ b/g10/gpg.c
-@@ -68,6 +68,9 @@
- #define MY_O_BINARY 0
- #endif
-
-+#ifdef __MINGW32__
-+int _dowildcard = -1;
-+#endif
-
- enum cmd_and_opt_values
- {
---
-1.9.1
diff --git a/patches/gnupg2-2.0.29/0002-Let-wchar_to_native-convert-to-console-codepage.patch b/patches/gnupg2-2.0.29/0002-Let-wchar_to_native-convert-to-console-codepage.patch
deleted file mode 100755
index 4765cd2..0000000
--- a/patches/gnupg2-2.0.29/0002-Let-wchar_to_native-convert-to-console-codepage.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-#! /bin/sh
-patch -p1 -l -f $* < $0
-exit $?
-
-From ba62c8e78bc4d14cfe8c69928ec10fa14e8c6cd8 Mon Sep 17 00:00:00 2001
-From: Andre Heinecke <aheinecke at intevation.de>
-Date: Thu, 21 Aug 2014 12:05:12 +0200
-Subject: [PATCH] Let wchar_to_native convert to console codepage
-
- * jnlib/w32-gettext.c (wchar_to_native): Use GetConsoleOutputCP.
-
---
- Just using CP_ACP does not neccessarily convert to the correct
- codepage as codepages might differ between ConsoleOutput and
- GUI output (which it usually does).
-
- GnuPG-bug-id: 1691, 1373, 1674
----
- jnlib/w32-gettext.c | 19 +++++++++++++++----
- 1 file changed, 15 insertions(+), 4 deletions(-)
-
-diff --git a/jnlib/w32-gettext.c b/jnlib/w32-gettext.c
-index 14cb1e1..a1b7e90 100644
---- a/jnlib/w32-gettext.c
-+++ b/jnlib/w32-gettext.c
-@@ -1299,7 +1299,7 @@ utf8_to_wchar (const char *string, size_t length, size_t *retlen)
- }
-
-
--/* Return a malloced string encoded in UTF-8 from the wide char input
-+/* Return a malloced string encoded for the native codepage from the wide char input
- string STRING. Caller must free this value. On failure returns
- NULL. The result of calling this function with STRING set to NULL
- is not defined. */
-@@ -1308,8 +1308,19 @@ wchar_to_native (const wchar_t *string, size_t length, size_t *retlen)
- {
- int n;
- char *result;
--
-- n = WideCharToMultiByte (CP_ACP, 0, string, length, NULL, 0, NULL, NULL);
-+ /* We are a console program thus we need to use the
-+ GetConsoleOutputCP function and not the the GetACP which
-+ would give the codepage for a GUI program. Note this is not
-+ a bulletproof detection because GetConsoleCP might return a
-+ different one for console input. Not sure how to cope with
-+ that. If the console Code page is not known we fall back to
-+ the system code page. This is how utf8conv does resolve this. */
-+ unsigned int cpno = GetConsoleOutputCP ();
-+
-+ if (!cpno)
-+ cpno = GetACP ();
-+
-+ n = WideCharToMultiByte (cpno, 0, string, length, NULL, 0, NULL, NULL);
- if (n < 0 || (n+1) <= 0)
- return NULL;
-
-@@ -1317,7 +1328,7 @@ wchar_to_native (const wchar_t *string, size_t length, size_t *retlen)
- if (!result)
- return NULL;
-
-- n = WideCharToMultiByte (CP_ACP, 0, string, length, result, n, NULL, NULL);
-+ n = WideCharToMultiByte (cpno, 0, string, length, result, n, NULL, NULL);
- if (n < 0)
- {
- jnlib_free (result);
---
-1.9.1
diff --git a/patches/gnupg2-2.0.29/0005-Fix-gpgtar-8-bit-encoding-handling-on-Win32.patch b/patches/gnupg2-2.0.29/0005-Fix-gpgtar-8-bit-encoding-handling-on-Win32.patch
deleted file mode 100755
index 2d4b70c..0000000
--- a/patches/gnupg2-2.0.29/0005-Fix-gpgtar-8-bit-encoding-handling-on-Win32.patch
+++ /dev/null
@@ -1,187 +0,0 @@
-#! /bin/sh
-patch -p1 -l -f $* < $0
-exit $?
-
-From 70c387b523fa115f02a7d545fb1f503e9b86f913 Mon Sep 17 00:00:00 2001
-From: Andre Heinecke <aheinecke at intevation.de>
-Date: Fri, 24 Oct 2014 18:05:29 +0200
-Subject: [PATCH] Fix gpgtar 8 bit encoding handling on Win32
-
- * tools/gpgtar-create.c (fillup_entry_w32, scan_directory): Convert
- to and from local encoding.
- * tools/gpgtar.c (wchar_to_cp, cp_to_wchar): New. Generalized
- conversion functions.
- (utf8_to_wchar, wchar_to_utf8): Removed.
- (wchar_to_native, native_to_wchar): New.
- * tools/gpgtar.h: Update accordingly.
-
---
-
- Gpgtar needs to handle filenames in the local 8 bit encoding on
- Windows as it uses the 8 bit file io functions.
-
- GnuPG-bug-id: 1624, 1746
----
- tools/gpgtar-create.c | 10 +++++-----
- tools/gpgtar.c | 48 ++++++++++++++++++++++++++++++++++--------------
- tools/gpgtar.h | 4 ++--
- 3 files changed, 41 insertions(+), 21 deletions(-)
-
-diff --git a/tools/gpgtar-create.c b/tools/gpgtar-create.c
-index 09587e4..b586243 100644
---- a/tools/gpgtar-create.c
-+++ b/tools/gpgtar-create.c
-@@ -72,13 +72,13 @@ fillup_entry_w32 (tar_header_t hdr)
- for (p=hdr->name; *p; p++)
- if (*p == '/')
- *p = '\\';
-- wfname = utf8_to_wchar (hdr->name);
-+ wfname = native_to_wchar (hdr->name);
- for (p=hdr->name; *p; p++)
- if (*p == '\\')
- *p = '/';
- if (!wfname)
- {
-- log_error ("error utf8-ing `%s': %s\n", hdr->name, w32_strerror (-1));
-+ log_error ("error converting `%s': %s\n", hdr->name, w32_strerror (-1));
- return gpg_error_from_syserror ();
- }
- if (!GetFileAttributesExW (wfname, GetFileExInfoStandard, &fad))
-@@ -299,7 +299,7 @@ scan_directory (const char *dname, scanctrl_t scanctrl)
- for (p=fname; *p; p++)
- if (*p == '/')
- *p = '\\';
-- wfname = utf8_to_wchar (fname);
-+ wfname = native_to_wchar (fname);
- xfree (fname);
- if (!wfname)
- {
-@@ -322,11 +322,11 @@ scan_directory (const char *dname, scanctrl_t scanctrl)
-
- do
- {
-- char *fname = wchar_to_utf8 (fi.cFileName);
-+ char *fname = wchar_to_native (fi.cFileName);
- if (!fname)
- {
- err = gpg_error_from_syserror ();
-- log_error ("error utf8-ing filename: %s\n", w32_strerror (-1));
-+ log_error ("error converting filename: %s\n", w32_strerror (-1));
- break;
- }
- for (p=fname; *p; p++)
-diff --git a/tools/gpgtar.c b/tools/gpgtar.c
-index f88964f..644cdd0 100644
---- a/tools/gpgtar.c
-+++ b/tools/gpgtar.c
-@@ -465,18 +465,19 @@ gnupg_mkdir (const char *name, const char *modestr)
- #endif
- }
-
-+
- #ifdef HAVE_W32_SYSTEM
--/* Return a malloced string encoded in UTF-8 from the wide char input
-- string STRING. Caller must free this value. Returns NULL and sets
-- ERRNO on failure. Calling this function with STRING set to NULL is
-- not defined. */
--char *
--wchar_to_utf8 (const wchar_t *string)
-+/* Return a malloced string encoded for the codepage CODEPAGE from the wide
-+ char input string STRING. Caller must free this value. Returns NULL
-+ and sets ERRNO on failure. Calling this function with STRING set to
-+ NULL is not defined. */
-+static char *
-+wchar_to_cp (const wchar_t *string, unsigned int codepage)
- {
- int n;
- char *result;
-
-- n = WideCharToMultiByte (CP_UTF8, 0, string, -1, NULL, 0, NULL, NULL);
-+ n = WideCharToMultiByte (codepage, 0, string, -1, NULL, 0, NULL, NULL);
- if (n < 0)
- {
- errno = EINVAL;
-@@ -487,7 +488,7 @@ wchar_to_utf8 (const wchar_t *string)
- if (!result)
- return NULL;
-
-- n = WideCharToMultiByte (CP_UTF8, 0, string, -1, result, n, NULL, NULL);
-+ n = WideCharToMultiByte (codepage, 0, string, -1, result, n, NULL, NULL);
- if (n < 0)
- {
- xfree (result);
-@@ -497,19 +498,18 @@ wchar_to_utf8 (const wchar_t *string)
- return result;
- }
-
--
--/* Return a malloced wide char string from an UTF-8 encoded input
-+/* Return a malloced wide char string from an CODEPAGE encoded input
- string STRING. Caller must free this value. Returns NULL and sets
- ERRNO on failure. Calling this function with STRING set to NULL is
- not defined. */
--wchar_t *
--utf8_to_wchar (const char *string)
-+static wchar_t*
-+cp_to_wchar (const char *string, unsigned int codepage)
- {
- int n;
- size_t nbytes;
- wchar_t *result;
-
-- n = MultiByteToWideChar (CP_UTF8, 0, string, -1, NULL, 0);
-+ n = MultiByteToWideChar (codepage, 0, string, -1, NULL, 0);
- if (n < 0)
- {
- errno = EINVAL;
-@@ -526,7 +526,7 @@ utf8_to_wchar (const char *string)
- if (!result)
- return NULL;
-
-- n = MultiByteToWideChar (CP_UTF8, 0, string, -1, result, n);
-+ n = MultiByteToWideChar (codepage, 0, string, -1, result, n);
- if (n < 0)
- {
- free (result);
-@@ -535,4 +535,24 @@ utf8_to_wchar (const char *string)
- }
- return result;
- }
-+
-+/* Return a malloced string encoded in the active code page from the
-+ wide char input string STRING. Caller must free this value.
-+ Returns NULL and sets ERRNO on failure.
-+ Calling this function with STRING set to NULL is not defined. */
-+char *
-+wchar_to_native (const wchar_t *string)
-+{
-+ return wchar_to_cp (string, CP_ACP);
-+}
-+
-+/* Return a malloced wide char string from an UTF-8 encoded input
-+ string STRING. Caller must free this value. Returns NULL and sets
-+ ERRNO on failure. Calling this function with STRING set to NULL is
-+ not defined. */
-+wchar_t *
-+native_to_wchar (const char *string)
-+{
-+ return cp_to_wchar(string, CP_ACP);
-+}
- #endif /*HAVE_W32_SYSTEM*/
-diff --git a/tools/gpgtar.h b/tools/gpgtar.h
-index 5790894..8c0de85 100644
---- a/tools/gpgtar.h
-+++ b/tools/gpgtar.h
-@@ -113,8 +113,8 @@ gpg_error_t write_record (estream_t stream, const void *record);
-
- int gnupg_mkdir (const char *name, const char *modestr);
- #ifdef HAVE_W32_SYSTEM
--char *wchar_to_utf8 (const wchar_t *string);
--wchar_t *utf8_to_wchar (const char *string);
-+char *wchar_to_native (const wchar_t *string);
-+wchar_t *native_to_wchar (const char *string);
- #endif
-
- /*-- gpgtar-create.c --*/
---
-1.9.1
diff --git a/patches/gnupg2-2.0.29/0006-gpgsm-Add-command-option-offline.patch b/patches/gnupg2-2.0.29/0006-gpgsm-Add-command-option-offline.patch
deleted file mode 100755
index 4427417..0000000
--- a/patches/gnupg2-2.0.29/0006-gpgsm-Add-command-option-offline.patch
+++ /dev/null
@@ -1,340 +0,0 @@
-#! /bin/sh
-patch -p1 -l -f $* < $0
-exit $?
-
-From fa16fba7c5e6c139bbc0556d6316d32c4d9f1e22 Mon Sep 17 00:00:00 2001
-From: Werner Koch <wk at gnupg.org>
-Date: Mon, 29 Jun 2015 11:03:58 +0200
-Subject: [PATCH] gpgsm: Add command option "offline".
-
-* sm/server.c (option_handler): Add "offline".
-(cmd_getinfo): Ditto.
-* sm/certchain.c (is_cert_still_valid):
-(do_validate_chain):
-* sm/gpgsm.c (gpgsm_init_default_ctrl): Default "offline" to the value
-of --disable-dirmngr.
-* sm/call-dirmngr.c (start_dirmngr_ext): Better also check for
-ctrl->offline.
---
-
-Adding this option makes it easier to implement the corresponding
-feature in gpgme.
-
-Signed-off-by: Werner Koch <wk at gnupg.org>
-(cherry picked from commit 2c9c46e2a2b8f9a1bdc1ef46a135b5fc7d1a8073)
-
-Conflicts:
- sm/gpgsm.h
----
- doc/gpgsm.texi | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
- sm/call-dirmngr.c | 2 +-
- sm/certchain.c | 6 +--
- sm/gpgsm.c | 1 +
- sm/gpgsm.h | 1 +
- sm/server.c | 19 +++++++-
- 6 files changed, 151 insertions(+), 8 deletions(-)
-
-diff --git a/doc/gpgsm.texi b/doc/gpgsm.texi
-index b0882b8..32fbe38 100644
---- a/doc/gpgsm.texi
-+++ b/doc/gpgsm.texi
-@@ -462,6 +462,7 @@ will not have on your local keybox), the operator can tell both your IP
- address and the time when you verified the signature.
-
-
-+ at anchor{gpgsm-option --validation-model}
- @item --validation-model @var{name}
- @opindex validation-model
- This option changes the default validation model. The only possible
-@@ -554,6 +555,7 @@ may be given (@pxref{how-to-specify-a-user-id}).
- Write output to @var{file}. The default is to write it to stdout.
-
-
-+ at anchor{gpgsm-option --with-key-data}
- @item --with-key-data
- @opindex with-key-data
- Displays extra information with the @code{--list-keys} commands. Especially
-@@ -561,6 +563,7 @@ a line tagged @code{grp} is printed which tells you the keygrip of a
- key. This string is for example used as the file name of the
- secret key.
-
-+ at anchor{gpgsm-option --with-validation}
- @item --with-validation
- @opindex with-validation
- When doing a key listing, do a full validation check for each key and
-@@ -1160,7 +1163,9 @@ Assuan manual for details.
- * GPGSM EXPORT:: Export certificates.
- * GPGSM IMPORT:: Import certificates.
- * GPGSM DELETE:: Delete certificates.
-+* GPGSM GETAUDITLOG:: Retrieve an audit log.
- * GPGSM GETINFO:: Information about the process
-+* GPGSM OPTION:: Session options.
- @end menu
-
-
-@@ -1350,6 +1355,7 @@ may be issued as a progress indicator.
-
- @node GPGSM LISTKEYS
- @subsection List available keys
-+ at anchor{gpgsm-cmd listkeys}
-
- To list the keys in the internal database or using an external key
- provider, the command:
-@@ -1449,6 +1455,23 @@ this requires that the usual escape quoting rules are done.
- The certificates must be specified unambiguously otherwise an error is
- returned.
-
-+ at node GPGSM GETAUDITLOG
-+ at subsection Retrieve an audit log.
-+ at anchor{gpgsm-cmd getauditlog}
-+
-+This command is used to retrieve an audit log.
-+
-+ at example
-+GETAUDITLOG [--data] [--html]
-+ at end example
-+
-+If @option{--data} is used, the audit log is send using D-lines
-+instead of being sent to the file descriptor given by an OUTPUT
-+command. If @option{--html} is used, the output is formated as an
-+XHTML block. This is designed to be incorporated into a HTML
-+document.
-+
-+
- @node GPGSM GETINFO
- @subsection Return information about the process
-
-@@ -1465,10 +1488,113 @@ Return the version of the program.
- @item pid
- Return the process id of the process.
- @item agent-check
--Return success if the agent is running.
-+Return OK if the agent is running.
- @item cmd_has_option @var{cmd} @var{opt}
--Return success if the command @var{cmd} implements the option @var{opt}.
-+Return OK if the command @var{cmd} implements the option @var{opt}.
- The leading two dashes usually used with @var{opt} shall not be given.
-+ at item offline
-+Return OK if the connection is in offline mode. This may be either
-+due to a @code{OPTION offline=1} or due to @command{gpgsm} being
-+started with option @option{--disable-dirmngr}.
-+ at end table
-+
-+ at node GPGSM OPTION
-+ at subsection Session options.
-+
-+The standard Assuan option handler supports these options.
-+
-+ at example
-+OPTION @var{name}[=@var{value}]
-+ at end example
-+
-+These @var{name}s are recognized:
-+
-+ at table @code
-+
-+ at item putenv
-+Change the session's environment to be passed via gpg-agent to
-+Pinentry. @var{value} is a string of the form
-+ at code{<KEY>[=[<STRING>]]}. If only @code{<KEY>} is given the
-+environment variable @code{<KEY>} is removed from the session
-+environment, if @code{<KEY>=} is given that environment variable is
-+set to the empty string, and if @code{<STRING>} is given it is set to
-+that string.
-+
-+ at item display
-+Set the session environment variable @code{DISPLAY} is set to @var{value}.
-+ at item ttyname
-+Set the session environment variable @code{GPG_TTY} is set to @var{value}.
-+ at item ttytype
-+Set the session environment variable @code{TERM} is set to @var{value}.
-+ at item lc-ctype
-+Set the session environment variable @code{LC_CTYPE} is set to @var{value}.
-+ at item lc-messages
-+Set the session environment variable @code{LC_MESSAGES} is set to @var{value}.
-+ at item xauthority
-+Set the session environment variable @code{XAUTHORITY} is set to @var{value}.
-+ at item pinentry-user-data
-+Set the session environment variable @code{PINENTRY_USER_DATA} is set
-+to @var{value}.
-+
-+ at item include-certs
-+This option overrides the command line option
-+ at option{--include-certs}. A @var{value} of -2 includes all
-+certificates except for the root certificate, -1 includes all
-+certicates, 0 does not include any certicates, 1 includes only the
-+signers certicate and all other positive values include up to
-+ at var{value} certificates starting with the signer cert.
-+
-+ at item list-mode
-+ at xref{gpgsm-cmd listkeys}.
-+
-+ at item list-to-output
-+If @var{value} is true the output of the list commands
-+(@pxref{gpgsm-cmd listkeys}) is written to the file descriptor set
-+with the last OUTPUT command. If @var{value} is false the output is
-+written via data lines; this is the default.
-+
-+ at item with-validation
-+If @var{value} is true for each listed certificate the validation
-+status is printed. This may result in the download of a CRL or the
-+user being asked about the trustworthiness of a root certificate. The
-+default is given by a command line option (@pxref{gpgsm-option
-+--with-validation}).
-+
-+
-+ at item with-secret
-+If @var{value} is true certificates with a corresponding private key
-+are marked by the list commands.
-+
-+ at item validation-model
-+This option overrides the command line option
-+ at option{validation-model} for the session.
-+(@pxref{gpgsm-option --validation-model}.)
-+
-+ at item with-key-data
-+This option globally enables the command line option
-+ at option{--with-key-data}. (@pxref{gpgsm-option --with-key-data}.)
-+
-+ at item enable-audit-log
-+If @var{value} is true data to write an audit log is gathered.
-+(@pxref{gpgsm-cmd getauditlog}.)
-+
-+ at item allow-pinentry-notify
-+If this option is used notifications about the launch of a Pinentry
-+are passed back to the client.
-+
-+ at item with-ephemeral-keys
-+If @var{value} is true ephemeral certificates are included in the
-+output of the list commands.
-+
-+ at item no-encrypt-to
-+If this option is used all keys set by the command line option
-+ at option{--encrypt-to} are ignored.
-+
-+ at item offline
-+If @var{value} is true or @var{value} is not given all network access
-+is disabled for this session. This is the same as the command line
-+option @option{--disable-dirmngr}.
-+
- @end table
-
- @mansect see also
-diff --git a/sm/call-dirmngr.c b/sm/call-dirmngr.c
-index 6540a8f..2517e7d 100644
---- a/sm/call-dirmngr.c
-+++ b/sm/call-dirmngr.c
-@@ -201,7 +201,7 @@ start_dirmngr_ext (ctrl_t ctrl, assuan_context_t *ctx_r)
- assuan_context_t ctx = NULL;
- int try_default = 0;
-
-- if (opt.disable_dirmngr)
-+ if (opt.disable_dirmngr || ctrl->offline)
- return gpg_error (GPG_ERR_NO_DIRMNGR);
-
- if (*ctx_r)
-diff --git a/sm/certchain.c b/sm/certchain.c
-index 1fbe9ca..9d7a9d8 100644
---- a/sm/certchain.c
-+++ b/sm/certchain.c
-@@ -959,7 +959,7 @@ is_cert_still_valid (ctrl_t ctrl, int force_ocsp, int lm, estream_t fp,
- {
- gpg_error_t err;
-
-- if (opt.no_crl_check && !ctrl->use_ocsp)
-+ if (ctrl->offline || (opt.no_crl_check && !ctrl->use_ocsp))
- {
- audit_log_ok (ctrl->audit, AUDIT_CRL_CHECK,
- gpg_error (GPG_ERR_NOT_ENABLED));
-@@ -1727,9 +1727,9 @@ do_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime_arg,
- if (opt.no_policy_check)
- log_info ("policies not checked due to %s option\n",
- "--disable-policy-checks");
-- if (opt.no_crl_check && !ctrl->use_ocsp)
-+ if (ctrl->offline || (opt.no_crl_check && !ctrl->use_ocsp))
- log_info ("CRLs not checked due to %s option\n",
-- "--disable-crl-checks");
-+ ctrl->offline ? "offline" : "--disable-crl-checks");
- }
-
- if (!rc)
-diff --git a/sm/gpgsm.c b/sm/gpgsm.c
-index ef01a5c..9069bc7 100644
---- a/sm/gpgsm.c
-+++ b/sm/gpgsm.c
-@@ -1991,6 +1991,7 @@ gpgsm_init_default_ctrl (struct server_control_s *ctrl)
- ctrl->include_certs = default_include_certs;
- ctrl->use_ocsp = opt.enable_ocsp;
- ctrl->validation_model = default_validation_model;
-+ ctrl->offline = opt.disable_dirmngr;
- }
-
-
-diff --git a/sm/gpgsm.h b/sm/gpgsm.h
-index 25a2e5b..98ab81c 100644
---- a/sm/gpgsm.h
-+++ b/sm/gpgsm.h
-@@ -196,6 +196,7 @@ struct server_control_s
- signer) */
- int use_ocsp; /* Set to true if OCSP should be used. */
- int validation_model; /* Set to 1 for the chain model. */
-+ int offline; /* If true gpgsm won't do any network access. */
- };
-
-
-diff --git a/sm/server.c b/sm/server.c
-index 6ba5e58..7adb09a 100644
---- a/sm/server.c
-+++ b/sm/server.c
-@@ -301,6 +301,16 @@ option_handler (assuan_context_t ctx, const char *key, const char *value)
- {
- ctrl->server_local->no_encrypt_to = 1;
- }
-+ else if (!strcmp (key, "offline"))
-+ {
-+ /* We ignore this option if gpgsm has been started with
-+ --disable-dirmngr (which also sets offline). */
-+ if (!opt.disable_dirmngr)
-+ {
-+ int i = *value? !!atoi (value) : 1;
-+ ctrl->offline = i;
-+ }
-+ }
- else
- err = gpg_error (GPG_ERR_UNKNOWN_OPTION);
-
-@@ -1079,10 +1089,12 @@ static const char hlp_getinfo[] =
- " pid - Return the process id of the server.\n"
- " agent-check - Return success if the agent is running.\n"
- " cmd_has_option CMD OPT\n"
-- " - Returns OK if the command CMD implements the option OPT.";
-+ " - Returns OK if the command CMD implements the option OPT.\n"
-+ " offline - Returns OK if the conenction is in offline mode.";
- static gpg_error_t
- cmd_getinfo (assuan_context_t ctx, char *line)
- {
-+ ctrl_t ctrl = assuan_get_pointer (ctx);
- int rc = 0;
-
- if (!strcmp (line, "version"))
-@@ -1099,7 +1111,6 @@ cmd_getinfo (assuan_context_t ctx, char *line)
- }
- else if (!strcmp (line, "agent-check"))
- {
-- ctrl_t ctrl = assuan_get_pointer (ctx);
- rc = gpgsm_agent_send_nop (ctrl);
- }
- else if (!strncmp (line, "cmd_has_option", 14)
-@@ -1134,6 +1145,10 @@ cmd_getinfo (assuan_context_t ctx, char *line)
- }
- }
- }
-+ else if (!strcmp (line, "offline"))
-+ {
-+ rc = ctrl->offline? 0 : gpg_error (GPG_ERR_GENERAL);
-+ }
- else
- rc = set_error (GPG_ERR_ASS_PARAMETER, "unknown value for WHAT");
-
---
-1.9.1
-----------------------------------------------------------------------
Summary of changes:
...-Enable-wildcard-expansion-with-mingw-w64.patch | 34 ---
...har_to_native-convert-to-console-codepage.patch | 67 ----
...x-gpgtar-8-bit-encoding-handling-on-Win32.patch | 187 ------------
.../0006-gpgsm-Add-command-option-offline.patch | 340 ---------------------
src/inst-gpg4win.nsi | 13 +
src/installer.nsi | 25 +-
src/mkportable-full.h | 71 ++---
src/mkportable-light.h | 63 +---
src/mkportable-vanilla.h | 62 +---
src/mkportable.c | 4 +-
src/uninst-gnupg-w32.nsi | 6 +-
11 files changed, 76 insertions(+), 796 deletions(-)
delete mode 100755 patches/gnupg2-2.0.29/0001-Enable-wildcard-expansion-with-mingw-w64.patch
delete mode 100755 patches/gnupg2-2.0.29/0002-Let-wchar_to_native-convert-to-console-codepage.patch
delete mode 100755 patches/gnupg2-2.0.29/0005-Fix-gpgtar-8-bit-encoding-handling-on-Win32.patch
delete mode 100755 patches/gnupg2-2.0.29/0006-gpgsm-Add-command-option-offline.patch
hooks/post-receive
--
GnuPG for Windows
http://git.gnupg.org
More information about the Gpg4win-commits
mailing list