Page MenuHome GnuPG

No OneTemporary

This document is not UTF8. It was detected as ISO-8859-1 (Latin 1) and converted to UTF8 for display.
diff --git a/ChangeLog b/ChangeLog
index 668e0e4..0d96a0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,142 +1,151 @@
+2010-07-21 Marco A.G.Pinto <marcoagpinto@mail.telepac.pt> (wk)
+
+ * po/pt.po: New.
+ * po/LINGUAS: Add pt.
+
+2010-07-21 Werner Koch <wk@g10code.com>
+
+ * configure.ac: Require libgpg-error 1.9.
+
2010-04-21 Marcus Brinkmann <marcus@g10code.de>
Release 0.9.6.
2010-04-20 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Bump version to 0.9.6.
(NEED_LIBASSUAN_API): Bump to 2.
(NEED_LIBASSAUN_VERSION): Bump to 2.0.0.
2010-04-20 Emanuel Schütze <emanuel@intevation.de>
* po/de.po: Use "pruefen" instead "ueberpruefen" for signatures.
2010-01-08 Marcus Brinkmann <marcus@g10code.de>
* Release 0.9.5.
2009-12-26 Marcus Brinkmann <marcus@g10code.de>
* Release 0.9.4.
2009-08-04 Marcus Brinkmann <marcus@g10code.de>
* doc/gpgex-en.html, doc/gpgex-de.html: Add link to Kleo manual.
2009-07-31 Emanuel Schütze <emanuel@intevation.de>
* doc/gpgex-de.html, doc/gpgex-en.html: Remove checksum text,
improve documentation for debug message.
2009-03-24 Werner Koch <wk@g10code.com>
Release 0.9.3.
2009-03-10 Marcus Brinkmann <marcus@g10code.de>
* po/de.po, po/es.po, po/ru.po, po/ar.po: Change encrypt&sign to
sign&encrypt everywhere.
2009-01-28 Werner Koch <wk@g10code.com>
Release 0.9.2.
2009-01-22 Werner Koch <wk@g10code.com>
* po/de.po: Change "verifizeren" to "überprüfen".
2008-06-04 Werner Koch <wk@g10code.com>
* doc/gpgex.texi (Assuan Protocol): Replace the spec by a
reference to the gpgme manual.
2008-03-26 Marcus Brinkmann <marcus@g10code.de>
Released 0.9.0.
* po/LINGUAS: Add ar, es, ru.
* Makefile.am (AUTOMAKE_OPTIONS): Add no-dist-gzip.
* configure.ac: Prepare for release of 0.9.0.
* po/ar.po, po/es.po, po/ru.po: New files.
* po/de.po: Fix newline.
2007-11-26 Marcus Brinkmann <marcus@g10code.de>
* doc/gpgex-de.html, doc/gpgex-en.html: Add FIXME entries for
missing hyperlinks.
2007-11-12 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (WINVER): New symbol.
2007-11-08 Marcus Brinkmann <marcus@g10code.de>
* po/de.po: Update.
* doc/gpgex-de.html, doc/gpgex-en.html: New files.
* doc/Makefile.am (dist_doc_DATA): New variable.
* doc/gpgex.texi: Complete protocol change from INPUT FILE to
FILE. Also from IMPORT to IMPORT_FILES.
2007-11-02 Werner Koch <wk@g10code.com>
* autogen.sh: Add --force option.
* doc/gpgex.texi: Protocol change s/"INPUT FILE"/"FILE"/.
2007-10-08 Marcus Brinkmann <marcus@g10code.de>
* doc/gpgex.texi (Certificate management): New section
* po/de.po: Convert to UTF-8.
* autogen.sh: Add --add-missing to automake invocation.
* configure.ac (AC_CONFIG_FILES): Add doc/Makefile.
* Makefile.am (SUBDIRS): Add doc.
* doc/: New directory.
2007-10-05 Marcus Brinkmann <marcus@g10code.de>
* po/de.po: Fix translation.
* po/de.po: Update.
2007-09-11 Marcus Brinkmann <marcus@g10code.de>
* po/de.po: Update.
* po/de.po: New file.
* po/LINGUAS: Add de.
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Add
--with-libassuan-prefix and --with-gpg-error-prefix.
2007-09-04 Marcus Brinkmann <marcus@g10code.de>
* m4/libassuan.m4, m4/gpg-error.m4: New files.
* configure.ac: Check for libgpg-error and libassuan.
* po/POTFILES.in: Add src/client.cc, src/gpgex.h and src/gpgex.cc.
2007-09-03 Marcus Brinkmann <marcus@g10code.de>
* m4/Makefile.am (EXTRA_DIST): Remove gpgme.m4 and gpg-error.m4.
2007-08-23 Marcus Brinkmann <marcus@g10code.de>
* Initial commit.
Copyright 2007 g10 Code GmbH
This file is free software; as a special exception the author gives
unlimited permission to copy and/or distribute it, with or without
modifications, as long as this notice is preserved.
This file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/configure.ac b/configure.ac
index 94c938b..e27ea43 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,246 +1,246 @@
# configure.ac - for GpgEX
# Copyright (C) 2005, 2006, 2007 g10 Code GmbH
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
min_automake_version="1.9.4"
# Remember to change the version number immediately *after* a release.
# Set my_issvn to "yes" for non-released code. Remember to run an
# "svn up" and "autogen.sh" right before creating a distribution.
m4_define([my_version], [0.9.7])
m4_define([my_issvn], [yes])
m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
|| echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')]))
AC_INIT([gpgex], my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision]),
[bug-gpgex@g10code.com])
SVN_REVISION=svn_revision
PACKAGE=$PACKAGE_NAME
PACKAGE_GT=${PACKAGE_NAME}
VERSION=$PACKAGE_VERSION
-NEED_GPG_ERROR_VERSION=1.4
+NEED_GPG_ERROR_VERSION=1.9
NEED_LIBASSUAN_API=2
NEED_LIBASSUAN_VERSION=2.0.0
AC_CONFIG_SRCDIR(src/gpgex.def)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AC_GNU_SOURCE
have_gpg_error=no
have_libassuan=no
AC_SUBST(PACKAGE)
AC_SUBST(PACKAGE_GT)
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
AC_DEFINE_UNQUOTED(PACKAGE_GT, "$PACKAGE_GT",
[Name of this package for gettext])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$PACKAGE_BUGREPORT",
[Bug report address])
BUILD_TIMESTAMP=`date --iso-8601=minutes`
AC_SUBST(BUILD_TIMESTAMP)
changequote(,)dnl
BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
changequote([,])dnl
BUILD_FILEVERSION="${BUILD_FILEVERSION}${SVN_REVISION}"
AC_SUBST(BUILD_FILEVERSION)
AH_BOTTOM([
/* Some global constants. */
/* Force using of NLS for W32 even if no libintl has been found. This is
okay because we have our own gettext implementation for W32. */
#if defined(HAVE_W32_SYSTEM) && !defined(ENABLE_NLS)
#define ENABLE_NLS 1
#endif
])
AM_MAINTAINER_MODE
# Checks for programs.
AC_PROG_MAKE_SET
AM_SANITY_CHECK
missing_dir=`cd $ac_aux_dir && pwd`
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_CHECK_TOOL(AR, ar, :)
AC_CHECK_TOOL(DLLTOOL, dlltool, :)
AC_CHECK_TOOL(WINDRES, windres, :)
have_dosish_system=no
have_w32_system=no
case "${host}" in
*-mingw32*)
# special stuff for Windoze NT
AC_DEFINE(HAVE_DRIVE_LETTERS,1,
[defined if we must run on a stupid file system])
have_dosish_system=yes
have_w32_system=yes
;;
*)
AC_MSG_ERROR([[
***
*** This software my only be build for W32 systems. Use
*** ./autogen.sh --build-w32
*** to prepare it for such a build.
***]])
;;
esac
if test "$have_dosish_system" = yes; then
AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
[Defined if we run on some of the PCDOS like systems
(DOS, Windoze. OS/2) with special properties like
no file modes])
fi
AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
if test "$have_w32_system" = yes; then
AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
fi
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
#
# Checks for libraries.
#
# Note, that autogen.sh greps for the next line.
AM_GNU_GETTEXT_VERSION(0.12.1)
AM_GNU_GETTEXT([external])
# We always want NLs, despite what the above macro figures out.
USE_NLS=yes
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(string.h unistd.h langinfo.h termio.h locale.h)
AC_CHECK_FUNCS(stpcpy)
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL
AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
# Add some extra libs here so that previous tests don't fail for
# mysterious reasons - the final link step should bail out.
if test "$have_w32_system" = yes; then
W32LIBS="-lwsock32"
fi
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -mms-bitfields"
CXXFLAGS="$CXXFLAGS -Wall -mms-bitfields"
if test "$USE_MAINTAINER_MODE" = "yes"; then
CFLAGS="$CFLAGS -Wcast-align -Wshadow -Wstrict-prototypes"
CFLAGS="$CFLAGS -Wno-format-y2k -Wformat-security"
CXXFLAGS="$CXXFLAGS -Wcast-align -Wshadow"
CXXFLAGS="$CXXFLAGS -Wno-format-y2k -Wformat-security"
fi
fi
AC_SUBST(W32LIBS)
#
# libgpg-error is a library with error codes shared between GnuPG
# related projects.
#
AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
have_gpg_error=yes,have_gpg_error=no)
AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_USER_1,
[The default error source for GpgEX.])
# We need the declaration for the function GetUserDefaultUILanguage
# and AllowSetForegroundWindow.
AC_DEFINE(WINVER, 0x500, [Version of Windows API])
#
# libassuan is used for IPC
#
AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
have_libassuan=yes,have_libassuan=no)
AH_BOTTOM([
/* We don't want the old assuan codes anymore. */
#define _ASSUAN_ONLY_GPG_ERRORS 1
])
#
# Print errors here so that they are visible all
# together and the user can acquire them all together.
#
die=no
if test "$have_gpg_error" = "no"; then
die=yes
AC_MSG_NOTICE([[
***
*** You need libgpg-error to build this program.
** This library is for example available at
*** ftp://ftp.gnupg.org/pub/gcrypt/libgpg-error
*** (at least version $NEED_GPG_ERROR_VERSION is required.)
***]])
fi
if test "$have_libassuan" = "no"; then
die=yes
AC_MSG_NOTICE([[
***
*** You need libassuan to build this program.
*** This library is for example available at
*** ftp://ftp.gnupg.org/pub/gcrypt/libassuan/
*** (at least version $NEED_LIBASSUAN_VERSION is required).
***]])
fi
if test "$die" = "yes"; then
AC_MSG_ERROR([[
***
*** Required libraries not found. Please consult the above messages
*** and install them before running configure again.
***]])
fi
AC_CONFIG_FILES([ Makefile
doc/Makefile
src/Makefile
src/versioninfo.rc
po/Makefile.in
m4/Makefile
])
AC_OUTPUT
diff --git a/po/LINGUAS b/po/LINGUAS
index 6dad9e4..713ea71 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1,2 +1,2 @@
# Set of available languages.
-de ar es ru
+de ar es pt ru
diff --git a/po/pt.po b/po/pt.po
new file mode 100644
index 0000000..2e07911
--- /dev/null
+++ b/po/pt.po
@@ -0,0 +1,118 @@
+# translation of GPGex.
+# Copyright (C) 2008 g10 Code GmbH
+# This file is distributed under the same license as the FIXME:GPGex package.
+# Diego Escalante Urrelo <diegoe@gnome.org>, 2008.
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GpgEX\n"
+"Report-Msgid-Bugs-To: bug-gpgex@g10code.com\n"
+"POT-Creation-Date: 2009-03-24 20:00+0100\n"
+"PO-Revision-Date: 2010-07-18 18:51-0000\n"
+"Last-Translator: Marco A.G.Pinto <marcoagpinto@mail.telepac.pt>\n"
+"Language-Team: Portuguese <marcoagpinto@mail.telepac.pt>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Portuguese\n"
+"X-Poedit-Country: PORTUGAL\n"
+"X-Poedit-SourceCharset: iso-8859-1\n"
+
+#: src/client.cc:350
+#, c-format
+msgid ""
+"Can not access Kleopatra:\r\n"
+"%s"
+msgstr ""
+"Não é possível aceder a Kleopatra:\r\n"
+"%s"
+
+#: src/gpgex.cc:58
+msgid "Help on GpgEX"
+msgstr "Ajuda de GpgEX"
+
+#: src/gpgex.cc:59
+msgid "Decrypt and verify"
+msgstr "Desencriptar e verificar"
+
+#: src/gpgex.cc:60
+msgid "Decrypt"
+msgstr "Desencriptar"
+
+#: src/gpgex.cc:61
+msgid "Verify"
+msgstr "Verificar"
+
+#: src/gpgex.cc:62
+msgid "Sign and encrypt"
+msgstr "Assinar e encriptar"
+
+#: src/gpgex.cc:63
+msgid "Encrypt"
+msgstr "Encriptar"
+
+#: src/gpgex.cc:64
+msgid "Sign"
+msgstr "Assinar"
+
+#: src/gpgex.cc:65
+msgid "Import keys"
+msgstr "Importar chaves"
+
+#: src/gpgex.cc:66
+msgid "Create checksums"
+msgstr "Criar checksums"
+
+#: src/gpgex.cc:67
+msgid "Verify checksums"
+msgstr "Verificar checksums"
+
+#: src/gpgex.cc:311
+msgid "More GpgEX options"
+msgstr "Mais opções do GpgEX"
+
+#: src/gpgex.cc:407
+msgid "Invoke the GpgEX documentation."
+msgstr "Invocar a documentação do GpgEX."
+
+#: src/gpgex.cc:411
+msgid "Decrypt and verify the marked files."
+msgstr "Desencriptar e verificar os ficheiros marcados."
+
+#: src/gpgex.cc:415
+msgid "Decrypt the marked files."
+msgstr "Desencriptar os ficheiros marcados."
+
+#: src/gpgex.cc:419
+msgid "Verify the marked files."
+msgstr "Verificar os ficheiros marcados."
+
+#: src/gpgex.cc:423
+msgid "Sign and encrypt the marked files."
+msgstr "Assinar e encriptar os ficheiros marcados."
+
+#: src/gpgex.cc:427
+msgid "Encrypt the marked files."
+msgstr "Encriptar os ficheiros marcados."
+
+#: src/gpgex.cc:431
+msgid "Sign the marked files."
+msgstr "Assinar os ficheiros marcados."
+
+#: src/gpgex.cc:435
+msgid "Import the marked files."
+msgstr "Importar os ficheiros marcados."
+
+#: src/gpgex.cc:439
+msgid "Create checksums."
+msgstr "Criar checksums."
+
+#: src/gpgex.cc:443
+msgid "Verify checksums."
+msgstr "Verificar checksums."
+
+#: src/gpgex.cc:447
+msgid "Show more GpgEX options."
+msgstr "Mostrar mais opções do GpgEX."
+
diff --git a/src/ChangeLog b/src/ChangeLog
index 074718e..cded8db 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,303 +1,307 @@
+2010-07-21 Werner Koch <wk@g10code.com>
+
+ * main.cc (DllMain): Add explicit init and deinit of libgpg-error.
+
2010-04-20 Marcus Brinkmann <marcus@g10code.de>
* client.cc (getinfo_pid_cb): Return gpg_error_t.
(uiserver_connect): Port to new assuan interface.
* main.cc (DllMain): Likewise.
2010-02-10 Marcus Brinkmann <marcus@g10code.de>
* gpgex.cc (gpgex_t::Initialize): Default to sign/encrypt if a
file or directory name has no suffix.
2010-01-08 Marcus Brinkmann <marcus@g10code.de>
* icon-lock-12.bmp, icon-lock-16.bmp: Update.
2009-12-26 Marcus Brinkmann <marcus@g10code.de>
* icon-lock-12.bmp, icon-lock-16.bmp: New files.
* Makefile.am (ICON_NAMES): Add lock.
* icons.rc: Add lock icons.
* gpgex.h (class gpgex_t): Use "Lock" icon instead of "Key".
2009-07-17 Marcus Brinkmann <marcus@g10code.de>
* gpgex.cc (start_help): Do not cripple the browser window.
2009-03-10 Marcus Brinkmann <marcus@g10code.de>
* client.h, client.cc, gpgex.cc: Change encrypt&sign to
sign&encrypt everywhere (except in the protocol, of course).
2009-02-11 Marcus Brinkmann <marcus@g10code.de>
* bitmaps.cc (load_bitmap): Change minus to underscore.
* icons.rc: Likewise in identifiers.
2008-09-01 Marcus Brinkmann <marcus@g10code.com>
* gpgex.cc (Initialize): Also pay attention to endings pem, p7m
and p7s.
2008-03-26 Marcus Brinkmann <marcus@g10code.de>
* client.cc (default_uiserver_cmdline): Fall back to GPA if
Kleopatra is not installed.
2008-02-19 Marcus Brinkmann <marcus@g10code.de>
* client.cc (default_uiserver_cmdline): Change default uiserver
path and remove work-around.
2008-02-05 Marcus Brinkmann <marcus@g10code.de>
* debug.h: Include <stdio.h>.
(debug_file, debug_flags): New prototypes.
* main.cc (debug_file, debug_flags): Make not static.
* client.cc (uiserver_connect): Fix last change. Set debug log
stream.
2008-02-04 Marcus Brinkmann <marcus@g10code.de>
* client.cc (send_one_option, getinfo_pid_cb, send_options): New
functions.
(uiserver_connect): Take new argument HWND. Call send_options.
(client_t::call_assuan): Pass window handle to uiserver_connect.
2008-01-07 Marcus Brinkmann <marcus@g10code.de>
* client.cc (default_uiserver_cmdline): Invoke GUI server with
--daemon.
(replace_dollar_s): Remove obsolete function.
2007-11-30 Marcus Brinkmann <marcus@g10code.de>
* gpgex.cc (start_help): Fix URL string format.
2007-11-16 Marcus Brinkmann <marcus@g10code.de>
* gpgex.cc (start_help): Fix URL for Windows Exploder.
2007-11-12 Marcus Brinkmann <marcus@g10code.de>
* gpgex.cc (get_lang_name): Fix last change.
* gpgex.cc (get_lang_name): Get preferred language.
(start_help): Invoke language specific help.
2007-11-08 Marcus Brinkmann <marcus@g10code.de>
* gpgex.cc: Include registry.h.
(start_help): Launch gpgex help from install directory.
* client.cc (client_t::call_assuan): Fix bug in last change.
* client.cc (client_t::call_assuan): Fix FILE command and rename
all commands to the protocol version.
(client_t::call_assuan): Report the actual error and remove log
file reference.
2007-11-02 Werner Koch <wk@g10code.com>
* w32-gettext.c (SUBLANG_BENGALI_BANGLADESH): Fix to 2 as per MSDN.
(SUBLANG_PUNJABI_PAKISTAN): Remove as it is not in MSDN.
(SUBLANG_ROMANIAN_MOLDOVA): Remove as it is not in MSDN.
(SUBLANG_ROMANIAN_ROMANIA): Change to value 1 as per MSDN.
* client.cc (call_assuan): Now use "FILE" instead of "INPUT FILE".
2007-10-22 Marcus Brinkmann <marcus@g10code.de>
* exechelp.h (gpgex_spawn_detached): Change signature to just a
command line.
* exechelp.c: Rewritten.
* client.cc (replace_dollar_s): New function.
(default_uiserver_cmdline): Use it.
(uiserver_connect): Change caller of gpgex_spawn_detached.
2007-10-17 Marcus Brinkmann <marcus@g10code.de>
* client.cc (default_uiserver_name): Fix check for dirty hack.
2007-10-16 Marcus Brinkmann <marcus@g10code.de>
* client.cc (default_uiserver_name): Fall back to HKLM for UI Server.
* client.cc (default_uiserver_name): Get UI Server from HKCU.
2007-10-15 Marcus Brinkmann <marcus@g10code.de>
(client_t::call_assuan): Call uiserver_connect.
* registry.c: Include assert.h. Check return value of malloc.
* exechelp.h, exechelp.c: New files.
* Makefile.am (gpgex_SOURCES): Add exechelp.h and exechelp.c.
* main.h (REGKEY): Move to ...
* registry.h (REGKEY): ... here.
* main.cc (_gpgme_debug): Put into extern C.
* main.h: Move debug stuff into ...
* debug.h: ... this new file.
* client.cc (default_uiserver_name, uiserver_connect): New functions.
2007-10-05 Marcus Brinkmann <marcus@g10code.de>
* main.cc (DllMain): Call WSACleanup.
* main.cc (DllMain): Initialize winsock.
* client.cc (percent_escape): Also escape ':' again.
* gpgex.cc (start_help): Do not sleep.
* client.h (class client_t): Two new member functions
create_checksums and verify_checksums.
* client.cc (client_t::create_checksums, client_t::verify_checksums): New functions.
(client_t::encrypt_sign, client_t::encrypt): Fix spelling.
* gpgex.cc (ID_CMD_CREATE_CHECKSUMS, ID_CMD_VERIFY_CHECKSUMS,
ID_CMD_STR_CREATE_CHECKSUMS, ID_CMD_STR_VERIFY_CHECKSUMS): New macros.
(gpgex_t::QueryContextMenu): Add create and verify checksums menu entries.
(gpgex_t::GetCommandString): Support these here as well. Translate all strings.
2007-10-03 Marcus Brinkmann <marcus@g10code.de>
* client.cc (percent_escape, escape): New functions.
(client_t::call_assuan): Fix INPUT command.
2007-09-21 Werner Koch <wk@g10code.com>
* registry.c (default_homedir): Make registry works. Reported by
Marc Mutz.
2007-09-16 Marcus Brinkmann <marcus@g10code.de>
* gpgex.cc (gpgex_t::QueryContextMenu): Implement popup menu
correctly, such that the explorer can clean up correctly (in the
file dialog).
(gpgex_t::GetCommandString): Implement help texts.
(start_help): New function.
(gpgex_t::InvokeCommand): Call start_help.
* Makefile.am (gpgex_LDADD): Add -loleaut32.
2007-09-11 Marcus Brinkmann <marcus@g10code.de>
* client.cc (client_t::call_assuan): Send --nohup as argument to
command.
* client.h (class client_t): New members decrypt, verify, encrypt,
and sign.
* client.cc: Add implementations for these.
* gpgex.h: Move all ID_CMD_* macros to ...
* gpgex.cc: ... here. Add new macros for new commands.
(gpgex_t::InvokeCommand, gpgex_t::QueryContextMenu): Implement new
commands.
* Makefile.am (libgpg-error.a, libassuan.a): Use -f flag with ln.
* registry.h (default_dir): New prototype.
* registry.c (default_dir, standard_homedir): New functions.
* client.cc (default_socket_name): Use default home dir instead
install directory.
2007-09-05 Marcus Brinkmann <marcus@g10code.de>
* gpgex.h (class gpgex_t): Make destructor virtual to silence
compiler warning.
* Makefile.am (ICON_NAMES, ICON_SIZES, ICONS): New variables.
(gpgex_SOURCES): Add $(ICONS).
* Makefile.am (gpgex_LDADD): More -lws2_32 after ./libassuan.a.
2007-09-04 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (AM_CFLAGS, AM_CXXFLAGS): Remove $(GPGME_CFLAGS),
add $(LIBASSUAN_CFLAGS) and $(GPG_ERROR_CFLAGS).
(gpgex_SOURCES): Add client.h and client.cc.
(libgpg-error.a, libassuan.a, clean-local): New targets.
(gpgex_LDADD): Add ./libassuan.a and ./libgpg-error.a.
* client.h, client.cc: New files.
* gpgex.cc: Include client.h.
(gpgex_t::InvokeCommand): Use client class to implement bunch of
functionality.
* main.h: Include <gpg-error.h>.
(DEBUG_ASSUAN, REGKEY, TRACE_GPGERR): New macros.
* main.cc: Include <gpg-error.h> and <assuan.h>.
(REGKEY): Deleted.
(debug_init): Free filename and add DEBUG_ASSUAN to debug flags.
(DllMain): Set assuan log stream and prefix, and the error source.
2007-09-03 Marcus Brinkmann <marcus@g10code.de>
* bitmaps.h, bitmaps.cc, icons.rc, icon-key-12.bmp,
icon-key-16.bmp: New files.
* Makefile.am (gpgex_SOURCES): Add icons.rc, bitmaps.h and
bitmaps.cc.
(noinst_gpgex_SOURCES): Add versioninfo.rc.
(gpgex_LDADD): Add -lgdi32.
(resource.o): Remove target.
* gpgex.h: Include bitmaps.h.
(class gpgex_t): New member key_bitmap.
(gpgex_t::gpgex_t, gpgex_t::~gpgex_t): Initialize and deinitialize
it.
* gpgex.cc (gpgex_t::QueryContextMenu): Add dummy bitmap for menu.
2007-08-31 Marcus Brinkmann <marcus@g10code.de>
* gpgex.cc (gpgex_t::QueryContextMenu): Fix menu separators.
2007-08-30 Marcus Brinkmann <marcus@g10code.de>
* gpgex.h (ID_CMD_HELP, ID_CMD_VERIFY_DECRYPT)
(ID_CMD_SIGN_ENCRYPT, ID_CMD_IMPORT, ID_CMD_MAX)
(ID_CMD_STR_HELP, ID_CMD_STR_VERIFY_DECRYPT)
(ID_CMD_STR_SIGN_ENCRYPT, ID_CMD_STR_IMPORT): New macros.
(class gpgex_t): New member ALL_FILES_GPG.
* gpgex.cc (gpgex_t::reset): Initialize THIS->all_files_gpg.
(gpgex_t::Initialize): Check ending of added files.
(gpgex_t::QueryContextMenu): Create a more involved dummy menu.
(gpgex_t::InvokeCommand): Show different commands being invoked.
* gpgex-class.cc (gpgex_class::init): Also register the shell
extension for directories.
(gpgex_class::deinit): Unregister shell extension for directories.
2007-08-28 Marcus Brinkmann <marcus@g10code.de>
* main.cc (DllRegisterServer): Do not trash gpgex_server::instance.
* gpgex-class.cc (gpgex_class::init): Now that DllMain loads, we
can access the DLL file name.
* main.cc (DllMain): Change return type to "STADPI" to get an
extern "C" declaration.
(_gpgex_debug): Remove lazy initialization cruft. DllMain is
called now, and initialization works properly.
* Makefile.am (gpgex_LDADD): Add -lole32.
* gpgex.def: Rename functions to not carry the @NR thingie.
* main.h: Many TRACE macros added.
(DEBUG_INIT, DEBUG_CONTEXT_MENU, STRINGIFY, GUID_FMT, GUID_ARG):
New macros.
(_gpgex_debug): New prototype.
* main.cc: Include <stdarg.h>, <stdio.h> and <shlobj.h>. Add
debugging traces.
(debug_lock, debug_flags, debug_file): New statics.
(get_debug_file, debug_init, debug_deinit): New static functions.
(_gpgex_debug): New function.
(DllMain): Call debug_init.
(DllRegisterServer, DllUnregisterServer): Call SHChangeNotify.
* gpgex.h: Include <vector> and <string>. Use std::vector and
std::string namespaces.
(class gpgex_t): New member filenames, and new method reset.
* gpgex.cc: Include <vector>, <string>, <stdexcept> and use
std::vector and std::string namespaces. Add debugging traces.
(gpgex_t::reset): New function.
(gpgex_t::Initialize): Implement dummy function.
(gpgex_t::QueryContextMenu): Implement dummy function.
(gpgex_t::GetCommandString): Implement dummy function.
(gpgex_t::InvokeCommand): Implement dummy function.
* gpgex-factory.cc: Add debugging traces.
* gpgex-class.cc (gpgex_class::init): Implement registration of
shell extension.
(gpgex_class::deinit): Implement corresponding unregistration.
2007-08-23 Marcus Brinkmann <marcus@g10code.de>
* Initial commit.
diff --git a/src/main.cc b/src/main.cc
index 102c931..8801903 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -1,310 +1,316 @@
/* main.cc - DLL entry point
Copyright (C) 2007 g10 Code GmbH
This file is part of GpgEX.
GpgEX is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.
GpgEX is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with GpgEX; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdarg.h>
#include <stdio.h>
#include <windows.h>
#include <shlobj.h>
#include <gpg-error.h>
#include <assuan.h>
#include "registry.h"
#include "gpgex-class.h"
#include "gpgex-factory.h"
#include "main.h"
/* This is the main part of the COM server component. The component
is an in-process server DLL. */
/* The instance of this DLL. */
HINSTANCE gpgex_server::instance;
/* The number of references to this component. */
LONG gpgex_server::refcount;
static char *
get_locale_dir (void)
{
char *instdir;
char *p;
char *dname;
instdir = read_w32_registry_string ("HKEY_LOCAL_MACHINE", REGKEY,
"Install Directory");
if (!instdir)
return NULL;
/* Build the key: "<instdir>/share/locale". */
#define SLDIR "\\share\\locale"
dname = static_cast<char *> (malloc (strlen (instdir) + strlen (SLDIR) + 1));
if (!dname)
{
free (instdir);
return NULL;
}
p = dname;
strcpy (p, instdir);
p += strlen (instdir);
strcpy (p, SLDIR);
free (instdir);
return dname;
}
static void
drop_locale_dir (char *locale_dir)
{
free (locale_dir);
}
static void
i18n_init (void)
{
char *locale_dir;
#ifdef ENABLE_NLS
# ifdef HAVE_LC_MESSAGES
setlocale (LC_TIME, "");
setlocale (LC_MESSAGES, "");
# else
setlocale (LC_ALL, "" );
# endif
#endif
locale_dir = get_locale_dir ();
if (locale_dir)
{
bindtextdomain (PACKAGE_GT, locale_dir);
drop_locale_dir (locale_dir);
}
textdomain (PACKAGE_GT);
}
static CRITICAL_SECTION debug_lock;
/* No flags on means no debugging. */
unsigned int debug_flags = 0;
/* Debug log file. */
FILE *debug_file;
/* Get the filename of the debug file, if any. */
static char *
get_debug_file (void)
{
return read_w32_registry_string ("HKEY_LOCAL_MACHINE", REGKEY,
"GpgEX Debug File");
}
static void
debug_init (void)
{
char *filename;
/* Sanity check. */
if (debug_file)
return;
InitializeCriticalSection (&debug_lock);
filename = get_debug_file ();
if (!filename)
return;
debug_file = fopen (filename, "a");
free (filename);
if (!debug_file)
return;
/* FIXME: Make this configurable eventually. */
debug_flags = DEBUG_INIT | DEBUG_CONTEXT_MENU | DEBUG_ASSUAN;
}
static void
debug_deinit (void)
{
if (debug_file)
{
fclose (debug_file);
debug_file = NULL;
}
}
#ifdef __cplusplus
extern "C" {
#if 0
}
#endif
#endif
/* Log the formatted string FORMAT at debug level LEVEL or higher. */
extern
void
_gpgex_debug (unsigned int flags, const char *format, ...)
{
va_list arg_ptr;
int saved_errno;
saved_errno = errno;
if (! (debug_flags & flags))
return;
va_start (arg_ptr, format);
EnterCriticalSection (&debug_lock);
vfprintf (debug_file, format, arg_ptr);
va_end (arg_ptr);
if (format && *format && format[strlen (format) - 1] != '\n')
putc ('\n', debug_file);
LeaveCriticalSection (&debug_lock);
fflush (debug_file);
errno = saved_errno;
}
#ifdef __cplusplus
#if 0
{
#endif
}
#endif
/* Entry point called by DLL loader. */
STDAPI
DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved)
{
if (reason == DLL_PROCESS_ATTACH)
{
gpgex_server::instance = hinst;
/* Early initializations of our subsystems. */
+ gpg_err_init ();
+
i18n_init ();
debug_init ();
if (debug_flags & DEBUG_ASSUAN)
{
assuan_set_assuan_log_stream (debug_file);
assuan_set_assuan_log_prefix ("gpgex:assuan");
}
assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT);
(void) TRACE0 (DEBUG_INIT, "DllMain", hinst,
"reason=DLL_PROCESS_ATTACH");
{
WSADATA wsadat;
WSAStartup (0x202, &wsadat);
}
}
else if (reason == DLL_PROCESS_DETACH)
{
WSACleanup ();
(void) TRACE0 (DEBUG_INIT, "DllMain", hinst,
"reason=DLL_PROCESS_DETACH");
debug_deinit ();
+ /* We are linking statically to libgpg-error which means there
+ is no DllMain in libgpg-error. Thus we call the deinit
+ function to cleanly deinitialize libgpg-error. */
+ gpg_err_deinit (0);
}
return TRUE;
}
/* Check if the server component, the DLL, can be unloaded. This is
called by the client of this in-process server (for example through
CoFreeUnusedLibrary) whenever it is considered to unload this
server component. */
STDAPI
DllCanUnloadNow (void)
{
(void) TRACE (DEBUG_INIT, "DllCanUnloadNow", gpgex_server::refcount);
return (gpgex_server::refcount == 0 ? S_OK : S_FALSE);
}
/* Registry handling. The DLL is registered with regsvr32.exe. */
/* Register the DLL. */
STDAPI
DllRegisterServer (void)
{
gpgex_class::init ();
/* Notify the shell about the change. */
SHChangeNotify (SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);
return S_OK;
}
/* Unregister the DLL. */
STDAPI
DllUnregisterServer (void)
{
gpgex_class::deinit ();
/* Notify the shell about the change. */
SHChangeNotify (SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);
return S_OK;
}
/* Acquire a reference for the class factory of object class RCLSID
with the interface RIID (typically IID_IClassFactory) and return it
in PPVOUT. Typically called by CoGetClassObject for in-process
server components. */
STDAPI
DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
/* We have to evaluate the arguments first. */
#define _TRACE_BEG22(a,b,c,d,e,f) TRACE_BEG22(a,b,c,d,e,f)
_TRACE_BEG22 (DEBUG_INIT, "DllGetClassObject", ppv,
"rclsid=" GUID_FMT ", riid=" GUID_FMT,
GUID_ARG (rclsid), GUID_ARG (riid));
if (rclsid == CLSID_gpgex)
{
HRESULT err = gpgex_factory.QueryInterface (riid, ppv);
return TRACE_RES (err);
}
/* Be nice to broken software. */
*ppv = NULL;
return TRACE_RES (CLASS_E_CLASSNOTAVAILABLE);
}

File Metadata

Mime Type
text/x-diff
Expires
Thu, Feb 26, 7:06 PM (9 h, 14 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
90/1a/05b3dac0a40b1b183101f0a7f3cf

Event Timeline