From scm-commit at wald.intevation.org Sat Aug 18 12:55:15 2007 From: scm-commit at wald.intevation.org (scm-commit@wald.intevation.org) Date: Sat, 18 Aug 2007 12:55:15 +0200 (CEST) Subject: [Gpgoe-commits] r23 - in trunk: . init po src Message-ID: <20070818105515.9BD6F400A0@pyrosoma.intevation.org> Author: twoaday Date: 2007-08-18 12:55:14 +0200 (Sat, 18 Aug 2007) New Revision: 23 Removed: trunk/GPGOE.dsp trunk/GPGOE.dsw trunk/init/Init.dsp Modified: trunk/Makefile.am trunk/README trunk/TODO trunk/init/GPGOEInit.c trunk/init/Makefile.am trunk/po/de.po trunk/po/it.po trunk/src/GPGOE.c trunk/src/GPGOE.def trunk/src/GPGOE.h trunk/src/OECrypto.c trunk/src/OEDlgEncrypt.c trunk/src/OEMisc.c trunk/src/OEPassphraseCBDlg.c trunk/src/OEProc.c Log: Deleted: trunk/GPGOE.dsp =================================================================== --- trunk/GPGOE.dsp 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/GPGOE.dsp 2007-08-18 10:55:14 UTC (rev 23) @@ -1,143 +0,0 @@ -# Microsoft Developer Studio Project File - Name="GPGOE" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=GPGOE - Win32 Debug -!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "GPGOE.mak". -!MESSAGE -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "GPGOE.mak" CFG="GPGOE - Win32 Debug" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "GPGOE - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE "GPGOE - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "GPGOE - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "release" -# PROP Intermediate_Dir "release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GPGOE_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "Src" /I "." /I "c:\oss\w32root\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GPGOE_EXPORTS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x407 /d "NDEBUG" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib shell32.lib c:\oss\w32root\lib\libgpgme-11.lib /nologo /dll /machine:I386 - -!ELSEIF "$(CFG)" == "GPGOE - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "debug" -# PROP Intermediate_Dir "debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GPGOE_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "Src" /I "." /I "c:\oss\w32root\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "GPGOE_EXPORTS" /D "HAVE_DOSISH_SYSTEM" /D "__MINGW32__" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x407 /d "_DEBUG" -# ADD RSC /l 0x407 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib shell32.lib c:\oss\w32root\lib\libgpgme-11.lib /nologo /dll /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "GPGOE - Win32 Release" -# Name "GPGOE - Win32 Debug" -# Begin Group "Resourcen" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\Src\ChangeLog -# End Source File -# Begin Source File - -SOURCE=.\src\GPGOE.def -# End Source File -# Begin Source File - -SOURCE=.\src\GPGOE.rc -# End Source File -# End Group -# Begin Source File - -SOURCE=.\Src\GPGOE.c -# End Source File -# Begin Source File - -SOURCE=.\Src\GPGOE.h -# End Source File -# Begin Source File - -SOURCE=.\Src\OECrypto.c -# End Source File -# Begin Source File - -SOURCE=.\Src\OEDlgEncrypt.c -# End Source File -# Begin Source File - -SOURCE=.\Src\OEDlgVerify.c -# End Source File -# Begin Source File - -SOURCE=.\Src\OEDlgViewer.c -# End Source File -# Begin Source File - -SOURCE=.\Src\OEMisc.c -# End Source File -# Begin Source File - -SOURCE=.\Src\OEPassphraseCBDlg.c -# End Source File -# Begin Source File - -SOURCE=.\Src\OEProc.c -# End Source File -# End Target -# End Project Deleted: trunk/GPGOE.dsw =================================================================== --- trunk/GPGOE.dsw 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/GPGOE.dsw 2007-08-18 10:55:14 UTC (rev 23) @@ -1,41 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELÖSCHT WERDEN! - -############################################################################### - -Project: "GPGOE"=.\GPGOE.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "Init"=.\Init\Init.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/Makefile.am 2007-08-18 10:55:14 UTC (rev 23) @@ -7,7 +7,7 @@ AUTOMAKE_OPTIONS = dist-bzip2 -EXTRA_DIST = autogen.sh GPGOE.dsp GPGOE.dsw +EXTRA_DIST = autogen.sh SUBDIRS = src m4 init doc po Modified: trunk/README =================================================================== --- trunk/README 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/README 2007-08-18 10:55:14 UTC (rev 23) @@ -9,7 +9,9 @@ works and be prepared for some unexpected behvaiours! So please use it with some caution. Even so I tested the plugin several times and what I can say is, that it -seems to work with W2K/WXP and Outlook Express (6.X). +seems to work with W2K/WXP and Outlook Express (6.X). Because I don't +have any access to a machine with Vista, I cannot say anything how it +works with the new Outlook Express version. Installation @@ -64,14 +66,9 @@ in a separate text viewer. Or in the case it was a signature, the signature status is shown. -If you've trouble to install or use the plugin, feel free to mail me. -But I recommend to subscribe to winpt-users and to post your question -there because then you will also help all the other users. To subscribe -to the mailing list, please visit wald.intevation.org and select the -WinPT project. Alternatively, you may also visit -http://wald.intevation.org/projects/gpgoe -the site provides a forum and a bug tracker so you can see if someone -else already reported the problem and if there is a solution for it. +If you've trouble to install or use the plugin, you can use the forum +at wald.intevation.org. But please, check the existing threads there +to make sure you questions wasn't already answered by someone else. Hint Modified: trunk/TODO =================================================================== --- trunk/TODO 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/TODO 2007-08-18 10:55:14 UTC (rev 23) @@ -5,6 +5,3 @@ * check the gpgBinary entry or a generic check to make sure that GPG is useable on the machine. - - - Modified: trunk/init/GPGOEInit.c =================================================================== --- trunk/init/GPGOEInit.c 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/init/GPGOEInit.c 2007-08-18 10:55:14 UTC (rev 23) @@ -12,10 +12,6 @@ * 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 GPGOE; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CONFIG_H @@ -46,6 +42,8 @@ /* Global module handle. */ static HINSTANCE glob_hinst = NULL; + +/* Valid options for the plug-in. */ struct { int decrypt_replies; int cache_passwd; @@ -70,7 +68,8 @@ PROCESSENTRY32 pe; HANDLE hd; BOOL next; - int fnd = 0; + size_t i; + int fnd; hd = CreateToolhelp32Snapshot (TH32CS_SNAPPROCESS, 0); if (hd == (HANDLE)-1) @@ -79,9 +78,8 @@ memset (&pe, 0, sizeof (pe)); pe.dwSize = sizeof (pe); next = Process32First (hd, &pe); + fnd = 0; while (next) { - size_t i; - for (i=0; i < strlen (pe.szExeFile); i++) pe.szExeFile[i] = (char)toupper (pe.szExeFile[i]); for (i=0; conflict_apps[i] != NULL; i++) { @@ -91,8 +89,6 @@ } } next = Process32Next (hd, &pe); - if (!next) - break; } CloseHandle (hd); return fnd; @@ -235,8 +231,7 @@ /* Main window procedure for the taskbar program. */ LRESULT CALLBACK gpgoe_main_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -{ - +{ NOTIFYICONDATA NID; POINT p; HMENU hm, popup; @@ -249,7 +244,7 @@ NID.uCallbackMessage = WM_USER; NID.hWnd = hwnd; NID.hIcon = LoadIcon (glob_hinst, MAKEINTRESOURCE (IDI_GPGOE)); - strcpy(NID.szTip, "GPG for Outlook Express"); + strcpy (NID.szTip, "GPG for Outlook Express"); Shell_NotifyIcon (NIM_ADD, &NID); DestroyIcon (NID.hIcon); @@ -260,7 +255,8 @@ if (opt.cache_passwd) gpgoe_set_active_modes (GPGOE_MODE_CACHEPASS); if (gpgoe_initialize ()) { - MessageBox (hwnd, "Couldn't register GPG OE hook", "Error", MB_ICONERROR|MB_OK); + MessageBox (hwnd, "Could not register GPG OE hook", + "Error", MB_ICONERROR|MB_OK); ExitProcess (0); } break; @@ -292,7 +288,8 @@ switch (lparam) { case WM_LBUTTONDBLCLK: SetForegroundWindow (hwnd); - id = MessageBox (NULL, "Remove the GPG OE plug-in from the system?", + id = MessageBox (NULL, + "Remove the GPG OE plug-in from the system?", "Are you sure?", MB_YESNO|MB_ICONINFORMATION); if (id == IDYES) SendMessage (hwnd, WM_DESTROY, 0, 0); @@ -357,9 +354,11 @@ return 1; } - hwnd = CreateWindow ("GPGOE", "GPGOE", 0, 0, 0, 0, 0, NULL, NULL, hinst, NULL); + hwnd = CreateWindow ("GPGOE", "GPGOE", 0, 0, 0, 0, 0, + NULL, NULL, hinst, NULL); if (!hwnd) { - MessageBox (NULL, "Couldn't create window", "Error", MB_ICONERROR|MB_OK); + MessageBox (NULL, "Could not create window", + "Error", MB_ICONERROR|MB_OK); return 1; } UpdateWindow (hwnd); Deleted: trunk/init/Init.dsp =================================================================== --- trunk/init/Init.dsp 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/init/Init.dsp 2007-08-18 10:55:14 UTC (rev 23) @@ -1,107 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Init" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Application" 0x0101 - -CFG=Init - Win32 Debug -!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "Init.mak". -!MESSAGE -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "Init.mak" CFG="Init - Win32 Debug" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "Init - Win32 Release" (basierend auf "Win32 (x86) Application") -!MESSAGE "Init - Win32 Debug" (basierend auf "Win32 (x86) Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Init - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "release" -# PROP Intermediate_Dir "release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x407 /d "NDEBUG" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 ../release/gpgoe.lib user32.lib shell32.lib /nologo /subsystem:windows /machine:I386 /out:"Release/GPGOEInit.exe" - -!ELSEIF "$(CFG)" == "Init - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x407 /d "_DEBUG" -# ADD RSC /l 0x407 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 ../debug/gpgoe.lib kernel32.lib user32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "Init - Win32 Release" -# Name "Init - Win32 Debug" -# Begin Group "Resourcen" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\gpgoe.ico -# End Source File -# Begin Source File - -SOURCE=.\init.rc -# End Source File -# End Group -# Begin Source File - -SOURCE=.\GPGOEInit.c -# End Source File -# End Target -# End Project Modified: trunk/init/Makefile.am =================================================================== --- trunk/init/Makefile.am 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/init/Makefile.am 2007-08-18 10:55:14 UTC (rev 23) @@ -1,6 +1,6 @@ bin_PROGRAMS = gpgoeinit -EXTRA_DIST = Init.dsp gpgoe.ico +EXTRA_DIST = gpgoe.ico AM_LDFLAGS = -mwindows Modified: trunk/po/de.po =================================================================== --- trunk/po/de.po 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/po/de.po 2007-08-18 10:55:14 UTC (rev 23) @@ -1,13 +1,13 @@ # GPGOE German translation -# Copyright (C) 2006 Timo Schulz +# Copyright (C) 2006, 2007 Timo Schulz # This file is distributed under the same license as the GPGOE package. -# Timo Schulz , 2006 +# Timo Schulz , 2006, 2007 # msgid "" msgstr "" -"Project-Id-Version: GPGOE 0.6.0\n" +"Project-Id-Version: GPGOE 0.9.0\n" "Report-Msgid-Bugs-To: twoaday at freakmail.de\n" -"POT-Creation-Date: 2006-06-03 20:08+0200\n" +"POT-Creation-Date: 2007-08-06 13:05+0200\n" "PO-Revision-Date: 2006-03-24 22:40+0100\n" "Last-Translator: Timo Schulz \n" "Language-Team: de \n" @@ -22,7 +22,7 @@ "decryption failed: secret key not available" msgstr "" "verschlüsselt mit %s Schlüssel, ID %s\n" -"Entschlüsselung fehlgeschlagen: geheimer Schlüssel nicht gefunden" +"Entschlüsselung fehlgeschlagen: geheimer Schlüssel nicht vorhanden" #: src/OECrypto.c:505 #, c-format @@ -49,40 +49,40 @@ msgid "GPG Plug-in Info" msgstr "GPG Plug-in Information" -#: src/OEDlgEncrypt.c:131 +#: src/OEDlgEncrypt.c:138 msgid "User ID" msgstr "Benutzerkennung" -#: src/OEDlgEncrypt.c:132 +#: src/OEDlgEncrypt.c:139 msgid "Key ID" msgstr "Schlüssel ID" -#: src/OEDlgEncrypt.c:133 +#: src/OEDlgEncrypt.c:140 msgid "Algorithm" msgstr "Algorithmus" -#: src/OEDlgEncrypt.c:160 +#: src/OEDlgEncrypt.c:167 msgid "No keys found in the keyring" msgstr "Keine Schlüssel im Schlüsselbund gefunden" -#: src/OEDlgEncrypt.c:161 src/OEProc.c:277 +#: src/OEDlgEncrypt.c:168 src/OEProc.c:278 msgid "GPG Plug-in Error" msgstr "GPG Plug-in Fehler" -#: src/OEDlgEncrypt.c:164 src/OEDlgVerify.c:180 src/OEDlgViewer.c:61 +#: src/OEDlgEncrypt.c:171 src/OEDlgVerify.c:180 src/OEDlgViewer.c:61 #: src/OEPassphraseCBDlg.c:128 msgid "&OK" msgstr "&OK" -#: src/OEDlgEncrypt.c:165 src/OEPassphraseCBDlg.c:129 +#: src/OEDlgEncrypt.c:172 src/OEPassphraseCBDlg.c:129 msgid "&Cancel" msgstr "&Abbrechen" -#: src/OEDlgEncrypt.c:166 +#: src/OEDlgEncrypt.c:173 msgid "Recipients which were NOT found" msgstr "Empfänger die NICHT gefunden worden" -#: src/OEDlgEncrypt.c:172 +#: src/OEDlgEncrypt.c:179 msgid "Select Recipient for Encryption" msgstr "Empfänger für Verschlüsselung auswählen" @@ -100,7 +100,7 @@ #: src/OEDlgVerify.c:63 msgid "full" -msgstr "voll" +msgstr "vollständig" #: src/OEDlgVerify.c:75 src/OEDlgVerify.c:79 src/OEDlgVerify.c:80 msgid "Invalid signature" @@ -193,7 +193,7 @@ msgid "Invalid passphrase; please enter your passphrase again" msgstr "Ungültige Passphrase; Bitte geben Sie die Passphrase erneut ein" -#: src/OEProc.c:69 +#: src/OEProc.c:70 msgid "" "GPGOE is unable to secure attachments.\r\n" "As a result the data attached to this mail is NOT encrypted." @@ -201,11 +201,11 @@ "GPGOE kann keine Anhänge sichern.\r\n" "Als eine Konsequzenz daraus, werden diese NICHT verschlüsselt." -#: src/OEProc.c:71 src/OEProc.c:88 +#: src/OEProc.c:72 src/OEProc.c:89 msgid "GPG Plug-in Warning" msgstr "GPG Plug-in Warnung" -#: src/OEProc.c:83 +#: src/OEProc.c:84 #, c-format msgid "" "WARNING: This message will be sent in cleartext.\r\n" @@ -215,7 +215,7 @@ "WARNUNG: Diese Nachricht wird im Klartext versendet.\r\n" "%s" -#: src/OEProc.c:278 +#: src/OEProc.c:279 #, c-format msgid "" "decrypt/verify: %s\n" Modified: trunk/po/it.po =================================================================== --- trunk/po/it.po 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/po/it.po 2007-08-18 10:55:14 UTC (rev 23) @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: GPGoe 0.7.0\n" "Report-Msgid-Bugs-To: twoaday at freakmail.de\n" -"POT-Creation-Date: 2006-06-03 20:08+0200\n" +"POT-Creation-Date: 2007-08-06 13:05+0200\n" "PO-Revision-Date: 2006-04-08 13:19+0100\n" "Last-Translator: Scire' Salvatore \n" "Language-Team: \n" @@ -47,40 +47,40 @@ msgid "GPG Plug-in Info" msgstr "Info su GPG Plug-in " -#: src/OEDlgEncrypt.c:131 +#: src/OEDlgEncrypt.c:138 msgid "User ID" msgstr "ID Utente" -#: src/OEDlgEncrypt.c:132 +#: src/OEDlgEncrypt.c:139 msgid "Key ID" msgstr "ID Chiave" -#: src/OEDlgEncrypt.c:133 +#: src/OEDlgEncrypt.c:140 msgid "Algorithm" msgstr "Algoritmo" -#: src/OEDlgEncrypt.c:160 +#: src/OEDlgEncrypt.c:167 msgid "No keys found in the keyring" msgstr "Nessuna chiave trovata nel portachiavi" -#: src/OEDlgEncrypt.c:161 src/OEProc.c:277 +#: src/OEDlgEncrypt.c:168 src/OEProc.c:278 msgid "GPG Plug-in Error" msgstr "Errore di GPG Plug-in" -#: src/OEDlgEncrypt.c:164 src/OEDlgVerify.c:180 src/OEDlgViewer.c:61 +#: src/OEDlgEncrypt.c:171 src/OEDlgVerify.c:180 src/OEDlgViewer.c:61 #: src/OEPassphraseCBDlg.c:128 msgid "&OK" msgstr "&OK" -#: src/OEDlgEncrypt.c:165 src/OEPassphraseCBDlg.c:129 +#: src/OEDlgEncrypt.c:172 src/OEPassphraseCBDlg.c:129 msgid "&Cancel" msgstr "&Annulla" -#: src/OEDlgEncrypt.c:166 +#: src/OEDlgEncrypt.c:173 msgid "Recipients which were NOT found" msgstr "Destinatari che NON sono stati trovati" -#: src/OEDlgEncrypt.c:172 +#: src/OEDlgEncrypt.c:179 msgid "Select Recipient for Encryption" msgstr "Seleziona Destinatario per Cifratura" @@ -192,7 +192,7 @@ msgid "Invalid passphrase; please enter your passphrase again" msgstr "Passphrase non corretta; immetti la tua passphrase di nuovo" -#: src/OEProc.c:69 +#: src/OEProc.c:70 msgid "" "GPGOE is unable to secure attachments.\r\n" "As a result the data attached to this mail is NOT encrypted." @@ -200,11 +200,11 @@ "GPGOE non può gestire la sicurezza degli allegati.\r\n" "Per tale motivo gli allegati di questo messaggio NON sono cifrati." -#: src/OEProc.c:71 src/OEProc.c:88 +#: src/OEProc.c:72 src/OEProc.c:89 msgid "GPG Plug-in Warning" msgstr "Avviso GPG Plug-in" -#: src/OEProc.c:83 +#: src/OEProc.c:84 #, c-format msgid "" "WARNING: This message will be sent in cleartext.\r\n" @@ -215,7 +215,7 @@ "\r\n" "Descrizione dell'errore: %s." -#: src/OEProc.c:278 +#: src/OEProc.c:279 #, c-format msgid "" "decrypt/verify: %s\n" Modified: trunk/src/GPGOE.c =================================================================== --- trunk/src/GPGOE.c 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/src/GPGOE.c 2007-08-18 10:55:14 UTC (rev 23) @@ -1,5 +1,5 @@ /* GPGOE.c - GnuPG for Outlook Express - * Copyright (C) 2001, 2002, 2003, 2006 Timo Schulz + * Copyright (C) 2001, 2002, 2003, 2006, 2007 Timo Schulz * * This file is part of GPGOE. * @@ -12,10 +12,6 @@ * 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 GPGOE; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CONFIG_H @@ -47,6 +43,7 @@ /* Supported GPGOE feature modes. */ int gpgoe_active_modes ATTR_SEC = 0; +/* FIXME: we currently limit the passphrase to 256 octets. */ char gpgoe_pass_cache[HASH_BUCKETS][256]; #ifndef __GNUC__ #pragma data_seg() @@ -77,6 +74,7 @@ } +#if 0 /* Quick and dirty check if the dialog is a common dialog and the 'File {Open, Save}' style. */ static int @@ -92,9 +90,9 @@ return -1; return 0; } +#endif - /* CTB hook procedure. Monitors the creation of all windows and subclass the window if it belongs to the Outlook Express (message) class. */ @@ -110,7 +108,7 @@ hwnd = (HWND)wparam; switch (code) { case HCBT_CREATEWND: - GetClassName (hwnd, wclass, sizeof (wclass) - 1); + GetClassName (hwnd, wclass, DIM (wclass) - 1); if (!strcmp (wclass, "ATH_Note")) { oe_proc_old = (WNDPROC) GetWindowLong (hwnd, GWL_WNDPROC); if (!oe_proc_old) @@ -140,10 +138,9 @@ break; case HCBT_ACTIVATE: -#if 0 +#if 0 /* Disable the attachment related code for now. */ if (plugin_active != NULL && WaitForSingleObject (plugin_active, 0) == WAIT_OBJECT_0) { - char wclass[200]; if (GetClassName (hwnd, wclass, sizeof (wclass)-1) <= 0 || !strstr (wclass, "#32770") || !is_common_file_dlg (hwnd)) Modified: trunk/src/GPGOE.def =================================================================== --- trunk/src/GPGOE.def 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/src/GPGOE.def 2007-08-18 10:55:14 UTC (rev 23) @@ -1,13 +1,8 @@ LIBRARY GPGOE DESCRIPTION 'GPGoe - GPG Plugin for Outlook Express' -;SECTIONS -; .SHARDAT READ WRITE SHARED EXPORTS - gpgoe_initialize @1 - gpgoe_remove @2 + gpgoe_initialize @1 + gpgoe_remove @2 gpgoe_set_active_modes @3 gpgoe_get_active_modes @4 - - - Modified: trunk/src/GPGOE.h =================================================================== --- trunk/src/GPGOE.h 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/src/GPGOE.h 2007-08-18 10:55:14 UTC (rev 23) @@ -1,5 +1,5 @@ /* GPGOE.h - GnuPG for Outlook Express - * Copyright (C) 2001, 2002, 2003, 2006 Timo Schulz + * Copyright (C) 2001, 2002, 2003, 2006, 2007 Timo Schulz * * This file is part of GPGOE. * @@ -12,10 +12,6 @@ * 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 GPGOE; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifndef GPGOE_H @@ -28,13 +24,13 @@ #define ATTR_SEC #endif +/* How many items we can store in the dictionary */ #define HASH_BUCKETS 3 /* gettext support. */ const char *gettext (const char *msgid); #define _(X) gettext ((X)) - #include /* safe wrapper around free. */ #define free_if_alloc(ptr) \ @@ -54,6 +50,10 @@ #define wipememory(_ptr,_len) wipememory2 (_ptr,0,_len) +#ifndef DIM +#define DIM(v) (sizeof (v) / sizeof ((v)[0])) +#endif + /* Dialog IDs for the various operations. */ #define ID_OE_SELECTALL 40125 #define ID_OE_COPY 40484 @@ -77,8 +77,8 @@ /* Context for the recipient list. */ struct recip_list_s { struct recip_list_s *next; - gpgme_key_t key; - char *addr; + gpgme_key_t key; /* The actual key to use */ + char *addr; /* The email address. */ }; typedef struct recip_list_s *recip_list_t; @@ -106,7 +106,7 @@ }; typedef struct viewer_ctx_s *viewer_ctx_t; - +/* Signature verify context. */ struct verify_ctx_s { gpgme_signature_t sig; gpgme_data_t text; @@ -114,10 +114,10 @@ typedef struct verify_ctx_s *verify_ctx_t; /*-- GPGOE.c --*/ -/*EXPORT*/ int gpgoe_initialize (void); -/*EXPORT*/ int gpgoe_remove (void); -/*EXPORT*/ void gpgoe_set_active_modes (int mode); -/*EXPORT*/ int gpgoe_get_active_modes (void); +int gpgoe_initialize (void); +int gpgoe_remove (void); +void gpgoe_set_active_modes (int mode); +int gpgoe_get_active_modes (void); /*-- OEProc.c --*/ extern plugin_ctx_t oe_plug; Modified: trunk/src/OECrypto.c =================================================================== --- trunk/src/OECrypto.c 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/src/OECrypto.c 2007-08-18 10:55:14 UTC (rev 23) @@ -12,10 +12,6 @@ * 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 GPGOE; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CONFIG_H @@ -636,6 +632,7 @@ } +#if 0 /* Try to decrypt a PGP/MIME message. */ static gpgme_error_t oe_handle_pgp_mime_mail (plugin_ctx_t ctx) @@ -662,6 +659,7 @@ return 0; } +#endif /* This function can be use for all kind of OE messages. Modified: trunk/src/OEDlgEncrypt.c =================================================================== --- trunk/src/OEDlgEncrypt.c 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/src/OEDlgEncrypt.c 2007-08-18 10:55:14 UTC (rev 23) @@ -21,6 +21,10 @@ #ifdef HAVE_CONFIG_H #include #endif +/* Declare Explorer version to 5.0 for extended listview capabilities. */ +#ifndef _WIN32_IE +#define _WIN32_IE 0x0500 +#endif #include #include #include @@ -70,6 +74,9 @@ case GPGME_PK_ELG_E: sprintf (buf, "ELG/%d", s->length); break; + + default: + strcpy (buf, "UNKNOWN/0"); } return buf; } Modified: trunk/src/OEMisc.c =================================================================== --- trunk/src/OEMisc.c 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/src/OEMisc.c 2007-08-18 10:55:14 UTC (rev 23) @@ -46,7 +46,7 @@ n = MultiByteToWideChar (GetACP (), 0, string, -1, result, n); if (n < 0) { - free (result); + xfree (result); return NULL; } @@ -58,11 +58,11 @@ n = WideCharToMultiByte (CP_UTF8, 0, result, -1, native, n, NULL, NULL); if (n < 0) { - free (result); + xfree (result); return NULL; } - free (result); + xfree (result); return native; } @@ -78,30 +78,24 @@ n = MultiByteToWideChar (CP_UTF8, 0, string, -1, NULL, 0); if (n < 0) return NULL; - result = (wchar_t*)xcalloc (1, (n+1) * sizeof *result); - n = MultiByteToWideChar (CP_UTF8, 0, string, -1, result, n); if (n < 0) { - free (result); + xfree (result); return NULL; } n = WideCharToMultiByte (GetACP (), 0, result, -1, NULL, 0, NULL, NULL); if (n < 0) return NULL; - - native = (char*)malloc (n+1); - if (!native) - abort (); - + native = (char*)xcalloc (1, n+1); n = WideCharToMultiByte (GetACP (), 0, result, -1, native, n, NULL, NULL); if (n < 0) { - free (result); + xfree (result); return NULL; } - free (result); + xfree (result); return native; } @@ -210,7 +204,7 @@ va_list ptr; va_start (ptr, fmt); - _vsnprintf (buffer, sizeof (buffer)-1, fmt, ptr); + _vsnprintf (buffer, DIM (buffer)-1, fmt, ptr); va_end (ptr); MessageBox (hwnd, buffer, caption, type); } @@ -246,7 +240,7 @@ /* Center the window @hwndChild over the parent window @parent. */ void center_window (HWND hwndChild, HWND parent) -{ +{ HWND hwndParent; RECT rChild, rParent; HDC hdc; Modified: trunk/src/OEPassphraseCBDlg.c =================================================================== --- trunk/src/OEPassphraseCBDlg.c 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/src/OEPassphraseCBDlg.c 2007-08-18 10:55:14 UTC (rev 23) @@ -12,10 +12,6 @@ * 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 GPGOE; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA7 USA */ #ifdef HAVE_CONFIG_H @@ -40,6 +36,7 @@ }; +/* Reference to the passphrase cache. */ extern char gpgoe_pass_cache[HASH_BUCKETS][256]; @@ -51,15 +48,22 @@ passphrase_put (char ctx[HASH_BUCKETS][256], const char *keyid, const char *pass) { int pos = hash_string (keyid) % HASH_BUCKETS; - int n = 0; + int n, passlen; + /* We cannot store passphrase of that size. */ + passlen = strlen (pass); + if (passlen > 255) + return; + + n = 0; while (n < HASH_BUCKETS) { - if (strlen (ctx[(pos+n) % HASH_BUCKETS]) == 0) { - memcpy (ctx[(pos+n) % HASH_BUCKETS], keyid, strlen (keyid)); - strncpy (ctx[(pos+n) % HASH_BUCKETS]+strlen (keyid), pass, 240); - break; + if (strlen (ctx[(pos+n) % HASH_BUCKETS]) != 0) { + n++; + continue; } - n++; + memcpy (ctx[(pos+n) % HASH_BUCKETS], keyid, strlen (keyid)); + strncpy (ctx[(pos+n) % HASH_BUCKETS]+strlen (keyid), pass, passlen); + break; } } @@ -72,17 +76,20 @@ { const char *item; int pos = hash_string (keyid) % HASH_BUCKETS; - int n=0; + int n; + n = 0; item = gpgoe_pass_cache[pos]; - while (strncmp (item, keyid, strlen (keyid)) && - n < HASH_BUCKETS) { + while (n < HASH_BUCKETS) { item = ctx[(pos+n) % HASH_BUCKETS]; + if (!strncmp (item, keyid, strlen (keyid))) + break; n++; } - + if (strlen (item) > 0 && !strncmp (item, keyid, strlen (keyid))) - return item+strlen (keyid); + return item + strlen (keyid); + /* Return NULL to indicate no matching entry. */ return NULL; } @@ -99,6 +106,7 @@ case 1: return "RSA"; case 17: return "DSA"; case 16: return "ELG"; + default: break; } return "???"; } @@ -115,12 +123,12 @@ switch (msg) { case WM_INITDIALOG: ctx = (pass_cb_t)lparam; - assert (ctx); + assert (ctx != NULL); if (ctx->uid_hint && ctx->passphrase_info) { char *utf8_uid = utf8_to_native (ctx->uid_hint+17); info = xcalloc (1, strlen (utf8_uid) + strlen (ctx->keyid) + 32); sprintf (info, _("%s\n%s key, ID %s"), utf8_uid, - get_pubkey_algo (ctx->passphrase_info), ctx->keyid); + get_pubkey_algo (ctx->passphrase_info), ctx->keyid); SetDlgItemText (dlg, IDC_DECRYPT_MSG, info); free_if_alloc (utf8_uid); free_if_alloc (info); @@ -169,6 +177,7 @@ _("GPG Plug-in Info"), MB_ICONINFORMATION|MB_OK); return FALSE; } + /* Make sure we reset the cancel flag. */ ctx->cancel = 0; ctx->pass = xcalloc (1, n+2); GetDlgItemText (dlg, IDC_DECRYPT_PWD, ctx->pass, n+1); @@ -194,9 +203,9 @@ pass_cb_t cb = (pass_cb_t)hook; HANDLE fp = (HANDLE)fd; const char *pass; - DWORD nwritten = 0; + DWORD nwritten; - assert (cb); + assert (cb != NULL); cb->prev_was_bad = prev_was_bad; if (prev_was_bad && !cb->cancel) { wipememory (cb->pass, strlen (cb->pass)); @@ -252,6 +261,7 @@ } +/* Return 1 if the passphrase dialog were cancelled. */ int pass_cb_cancelled (pass_cb_t cb) { @@ -259,12 +269,12 @@ } -/* Reset the passphrase cache. */ +/* Reset the passphrase cache by overwritting each items with zeroes */ void reset_pass_cache (void) { int i; for (i=0; i < HASH_BUCKETS; i++) - wipememory (gpgoe_pass_cache[i], 256); + wipememory (gpgoe_pass_cache[i], DIM (gpgoe_pass_cache[i])); } Modified: trunk/src/OEProc.c =================================================================== --- trunk/src/OEProc.c 2007-02-25 14:13:43 UTC (rev 22) +++ trunk/src/OEProc.c 2007-08-18 10:55:14 UTC (rev 23) @@ -28,6 +28,8 @@ #include "gpgme.h" #include "GPGOE.h" +/* FIXME: I'm not sure if this still works with the Vista version of Express */ + /* Outlook V6.x command IDs. */ #define ID_OE_ENCRYPT 40260 #define ID_OE_SIGN 40299 @@ -57,7 +59,6 @@ HANDLE plugin_active = NULL; - /* Display a warning that the attachments of the mail will be sent in cleartext. */ static void @@ -249,7 +250,7 @@ switch (msg) { case WM_CREATE: if (!plugin_preload_done) { - /* we need to load this lib here otherwise the richedit + /* We need to load this lib here otherwise the richedit control would not be displayed. */ LoadLibrary ("RichEd32.Dll"); setup_gettext();