gpgol.git
22 months agoUpdate NEWS gpgol-2.0.2
Andre Heinecke [Thu, 16 Nov 2017 09:01:58 +0000 (10:01 +0100)]
Update NEWS

--

22 months agoAuto update translations
Andre Heinecke [Thu, 16 Nov 2017 09:00:31 +0000 (10:00 +0100)]
Auto update translations

--

22 months agoFix Outlook 2010 TabComposeTools error
Andre Heinecke [Thu, 16 Nov 2017 08:42:59 +0000 (09:42 +0100)]
Fix Outlook 2010 TabComposeTools error

* src/gpgoladdin.cpp (GetCustomUI_mime): Handle OL2010
differently.

--
For OL2010 we don't have an inline editor so no TabComposeTools.

GnuPG-Bug-ID: T3441

22 months agoAdd comment about ref counting in get_oom_obj
Andre Heinecke [Thu, 16 Nov 2017 08:33:46 +0000 (09:33 +0100)]
Add comment about ref counting in get_oom_obj

--

22 months agoUgly fix for ugly crash when pasting recipients
Andre Heinecke [Wed, 15 Nov 2017 15:14:56 +0000 (16:14 +0100)]
Ugly fix for ugly crash when pasting recipients

* src/mailitem-events.cpp (do_delayed_locate): Delay
a RECIPIENT_ADDED Signal.
(EVENT_SINK_INVOKE): Only trigger once per change. Invoke
delayed thread.
* src/windowmessages.cpp (gpgol_window_proc): Handle
Recipient Added signal.

--
This is a fix for crashes that happend if a resolved recipient
is copied and pasted.
If we then access the recipients object in the Property
Change event Outlook says no (crash). Thus we do the delay dance.

22 months agoLock key lookup map
Andre Heinecke [Wed, 15 Nov 2017 15:10:49 +0000 (16:10 +0100)]
Lock key lookup map

* src/mail.cpp (do_locate): Comment out useless message.
(Mail::locate_keys): Guard list access with lock.

--
Does not really fix a bug but noticed a race there when
codestaring.

22 months agoFix ref leak of recipients obj
Andre Heinecke [Wed, 15 Nov 2017 15:10:01 +0000 (16:10 +0100)]
Fix ref leak of recipients obj

* src/mail.cpp (get_recipients): Unref recipients obj.

22 months agoTypos and spelling in comment about last commit
Andre Heinecke [Wed, 15 Nov 2017 13:34:25 +0000 (14:34 +0100)]
Typos and spelling in comment about last commit

--

22 months agoWorkaround crash when accessing CurrentView
Andre Heinecke [Wed, 15 Nov 2017 13:34:25 +0000 (14:34 +0100)]
Workaround crash when accessing CurrentView

* src/explorer-events.cpp (EVENT_SINK_INVOKE),
src/ribbon-callbacks.cpp (get_mail_from_control): Use
preview pane instead.

--
Somehow latest Outlook 2016 crashes when accessing the current view
of the Explorer. This is even reproducible with
GpgOL disabled and only with Outlook Spy active. If you select
the explorer of an Outlook.com resource and then access
the CurrentView and close the CurrentView again in Outlook Spy
outlook crashes.

GnuPG-Bug-Id: T3484

22 months agoReturn correct charset for html
Andre Heinecke [Wed, 15 Nov 2017 13:05:28 +0000 (14:05 +0100)]
Return correct charset for html

* src/parsecontroller.cpp (get_html_charset): Do it.

--
No comment.

GnuPG-Bug-Id: T3455

22 months agoFix reversion for S/MIME mails if S/MIME disabled
Andre Heinecke [Fri, 10 Nov 2017 16:56:57 +0000 (17:56 +0100)]
Fix reversion for S/MIME mails if S/MIME disabled

* src/mailitem-events.cpp (EVENT_SINK_INVOKE): Revert
again if S/MIME is disabled but we parsed the mail.

--
While reversion is no longer neccessary for crypto mails
to hide the plaintext we still might need it to change
the message class back. And wiping the body etc. is also
a good idea when we "leave a mail alone"

GnuPG-Bug-ID: T3494

22 months agoFix handling of "own" S/MIME Mails
Andre Heinecke [Fri, 10 Nov 2017 16:52:01 +0000 (17:52 +0100)]
Fix handling of "own" S/MIME Mails

* src/mimedataprovider.cpp (MimeDataProvider::collect_data):
Expect headers if the first line of the data starts with MIME-Version.

--

This fixes the problem that S/MIME Mails in the sent folder
are not handled.

The problem is that for received S/MIME Mails GpgOL sees
the S/MIME part as the original structure and just needs
to copy this part to gpgol.
But for our own mails in the sent mails folder we get our
MIME Structure that we created for the MAPI to MIME conversion
including headers.

To avoid a big mess with another content type we check the
first bytes of the data we parse if they say "MIME-Version"
in that case we expect MIME headers.

GnuPG-Bug-ID: T3442

22 months agoAdd some more tracing in mail
Andre Heinecke [Fri, 10 Nov 2017 16:51:18 +0000 (17:51 +0100)]
Add some more tracing in mail

* src/mail.cpp (Mail::update_body): Add some traces.

--
Possibly something fishy in here where we crash.

22 months agoFix build example by adding --enable-static
Andre Heinecke [Fri, 10 Nov 2017 16:48:26 +0000 (17:48 +0100)]
Fix build example by adding --enable-static

--
Dependencies are needed as static libs so this must
be enabled.

22 months agoRemove obsolete info from README
Andre Heinecke [Fri, 10 Nov 2017 16:47:04 +0000 (17:47 +0100)]
Remove obsolete info from README

--

22 months agoImprove debug output in parsecontroller
Andre Heinecke [Fri, 10 Nov 2017 16:09:53 +0000 (17:09 +0100)]
Improve debug output in parsecontroller

* src/parsecontroller.cpp: Debug detected type.

23 months agoUpdate Portugese translations
Jochen Saalfeld [Mon, 16 Oct 2017 13:32:49 +0000 (15:32 +0200)]
Update Portugese translations

* po/pt.po: Update

--
Translation provided by Marco A.G. Pinto.

2 years agoPost release updates
Andre Heinecke [Thu, 14 Sep 2017 14:50:42 +0000 (16:50 +0200)]
Post release updates

--

2 years agoFix regression for multipart/signed mails gpgol-2.0.1
Andre Heinecke [Thu, 14 Sep 2017 14:41:35 +0000 (16:41 +0200)]
Fix regression for multipart/signed mails

* src/mapihelp.cpp (mapi_change_message_class): Call
change_message_class_ipm_note_smime_multipartsigned even
if S/MIME is disabled.

--
This function actually checks if a message with the class
IPM.Note.SMIME.MultipartSigned is actually a PGP / MIME mail
so it needs to be called even if S/MIME is disabled.

This fixes multipart signed mail handling.

2 years agoPost release updates
Andre Heinecke [Tue, 12 Sep 2017 11:40:36 +0000 (13:40 +0200)]
Post release updates

--

2 years agoRelease GpgOL 2.2.0 gpgol-2.0.0
Andre Heinecke [Tue, 12 Sep 2017 11:28:38 +0000 (13:28 +0200)]
Release GpgOL 2.2.0

--

2 years agoAuto: Update translations
Andre Heinecke [Tue, 12 Sep 2017 11:26:16 +0000 (13:26 +0200)]
Auto: Update translations

* po: Auto update.

2 years agoUpdate german translation
Andre Heinecke [Tue, 12 Sep 2017 11:25:46 +0000 (13:25 +0200)]
Update german translation

* po/de.po: Update translation.

2 years agoIncrease Options dialog width
Andre Heinecke [Tue, 12 Sep 2017 09:48:01 +0000 (11:48 +0200)]
Increase Options dialog width

* src/dialogs.rc (IDD_ADDIN_OPTIONS): Increase width by 20px

2 years agoFixing typo and consistency in addin-options dialogue
Jochen Saalfeld [Mon, 4 Sep 2017 09:24:26 +0000 (11:24 +0200)]
Fixing typo and consistency in addin-options dialogue

--
The typo and inconsistency was reported via
https://wald.intevation.org/forum/message.php?msg_id=5100

2 years agoUpdate Portugese translations
Jochen Saalfeld [Mon, 28 Aug 2017 11:17:29 +0000 (13:17 +0200)]
Update Portugese translations

* po/pt.po: Update

--
Translation provided by Marco A.G. Pinto.

2 years agoOnly do debug output if enableDebug is set
Andre Heinecke [Fri, 25 Aug 2017 11:51:09 +0000 (13:51 +0200)]
Only do debug output if enableDebug is set

* src/common_indep.c (do_log): Abort if enable_debug is
not set.

--
This is more in line with what users expect.

2 years agoDelete Body MAPI Props after MIME creation
Andre Heinecke [Fri, 25 Aug 2017 11:12:06 +0000 (13:12 +0200)]
Delete Body MAPI Props after MIME creation

* src/mimemaker.cpp (finalize_message): Delete Body Props.

--

Somehow this is now required. For outgoing mails over SMTP
the body is removed when the mime structure of our mime attachment
is used. But for exchange <> exchange or in the sent mail
folder this no longer happens. Causing a plain text leak.

We now explicitly delete the MAPI Body after our attachment
is created.

GnuPG-Bug-Id: T3369

2 years agoAdd more debug output during parsing
Andre Heinecke [Fri, 25 Aug 2017 09:10:02 +0000 (11:10 +0200)]
Add more debug output during parsing

* src/mail.cpp (Mail::decrypt_verify): Put out parser + subject.
* src/parsecontroller.cpp (ParseController::parse): Add more debug.

--
This should show it better where we hand of control to gpgme / gnupg.

2 years agoFix compliance mode check
Andre Heinecke [Fri, 25 Aug 2017 08:53:59 +0000 (10:53 +0200)]
Fix compliance mode check

* src/mail.cpp (in_de_vs_mode): Fix logic.

--
Yeah it shows that I coded too little C in the last year...

2 years agoFix handling of inline PGP Mails with attachment
Andre Heinecke [Fri, 25 Aug 2017 08:22:08 +0000 (10:22 +0200)]
Fix handling of inline PGP Mails with attachment

* src/mapihelp.cpp (mapi_mark_or_create_moss_attach): Repeat check
after attachment creation.

--
The created MOSS attachment does not neccessary has position 1
it might change depending on the attachment count so the wrong
attachment may be picked up. Repeat the check for our newly
created attachment in that case.

GnuPG-Bug-Id: T3365

2 years agoFix encoding error for unsigned / unencrypted
Andre Heinecke [Mon, 21 Aug 2017 11:31:50 +0000 (13:31 +0200)]
Fix encoding error for unsigned / unencrypted

* src/ribbon-callbacks.cpp (get_sig_stip): Use utf8-gettext.

2 years agoBe more relaxed if something is before PGP Marker
Andre Heinecke [Mon, 21 Aug 2017 11:21:15 +0000 (13:21 +0200)]
Be more relaxed if something is before PGP Marker

* src/mapihelp.cpp (get_msgcls_from_pgp_lines): Remove abort
statement for text before message.

--
This might cause problems in case somone does something
like:

Hey here is your password encrypted:
-----BEGIN PGP MESSAGE-----

But meh. It's more robutst this way in case we have an
MTA that modifies the body.

2 years agoAccept more inline PGP Messages
Andre Heinecke [Mon, 21 Aug 2017 11:20:05 +0000 (13:20 +0200)]
Accept more inline PGP Messages

* src/mapihelp.cpp (change_message_class_ipm_note): Accept
html only and multipart/related to check for pgp lines.

2 years agoAdd hack to replace doubled linefeeds
Andre Heinecke [Mon, 21 Aug 2017 11:04:55 +0000 (13:04 +0200)]
Add hack to replace doubled linefeeds

* src/mail.cpp (Mail::update_body): Replace doubled linefeeds before
a newline.
(find_and_replace): New helper.

2 years agoImprove formatting if VS-NFD is active
Andre Heinecke [Mon, 21 Aug 2017 10:05:58 +0000 (12:05 +0200)]
Improve formatting if VS-NFD is active

* src/mail.cpp (Mail::get_crypto_details): Add a linefeed.

2 years agoFix message for unsigned mails
Andre Heinecke [Mon, 21 Aug 2017 10:05:24 +0000 (12:05 +0200)]
Fix message for unsigned mails

* src/mail.cpp (Mail::get_crypto_details): Return earlier.

2 years agoHandle Symmetric encryption
Andre Heinecke [Mon, 21 Aug 2017 10:04:22 +0000 (12:04 +0200)]
Handle Symmetric encryption

* src/mail.cpp (Mail::parsing_done, Mail::update_categories)
(Mail::is_encrypted): Use decryptResult.isNull instead of numRecp.

--
For symmetric encryption we have no recipients.

2 years agoUpdate German translation
Andre Heinecke [Thu, 27 Jul 2017 07:19:26 +0000 (09:19 +0200)]
Update German translation

--

2 years agoAuto update po files
Andre Heinecke [Thu, 27 Jul 2017 07:17:46 +0000 (09:17 +0200)]
Auto update po files

--

2 years agoChange VS to VS-NfD for deVS stuff
Andre Heinecke [Thu, 27 Jul 2017 07:16:49 +0000 (09:16 +0200)]
Change VS to VS-NfD for deVS stuff

* src/mail.cpp (Mail::get_crypto_details): Change VS to VS-NfD

2 years agoDo German translation
Andre Heinecke [Tue, 25 Jul 2017 12:45:53 +0000 (14:45 +0200)]
Do German translation

* po/de.po: Translate.

2 years agoAuto: Update po files
Andre Heinecke [Tue, 25 Jul 2017 12:39:12 +0000 (14:39 +0200)]
Auto: Update po files

--

2 years agoEnsure that the correct window is enabled again
Andre Heinecke [Tue, 25 Jul 2017 12:04:28 +0000 (14:04 +0200)]
Ensure that the correct window is enabled again

* src/mail.cpp (encrypt_sign): Store window handle.

--
This fixes a rare case where the active window changes during
encrypt and the wrong window would be enabled again. This would
result in an unsresponsive Outlook.

2 years agoAdd handling for de-vs compliant results
Andre Heinecke [Mon, 10 Jul 2017 15:24:07 +0000 (17:24 +0200)]
Add handling for de-vs compliant results

* configure.ac: Bump required GPGME version to 1.9
* src/mail.cpp (in_de_vs_mode): New helper.
(Mail::get_crypto_details): Add texts about de-vs states.
(Mail::get_signature_level): Only return 3 or 4 in vs-mode if
the signature was actually de-vs compliant.

2 years agoAdd deprecation warning for OL2003/2007
Andre Heinecke [Sun, 14 May 2017 10:55:48 +0000 (12:55 +0200)]
Add deprecation warning for OL2003/2007

* src/common_indep.h (opt.deprecation_shown): New option.
* src/main.c (write_options, read_options): Handle new option.
* src/olflange.cpp: Show warning for old versions.

--
GnuPG-Bug-Id: T3153

2 years agoMake it possible to register locally as user
Andre Heinecke [Sun, 14 May 2017 08:54:40 +0000 (10:54 +0200)]
Make it possible to register locally as user

* src/olflange.cpp (DllRegisterServer): Register depending on
elevation level.

2 years agoAdd UAC elevation check
Andre Heinecke [Sun, 14 May 2017 08:53:10 +0000 (10:53 +0200)]
Add UAC elevation check

* src/common.c (is_elevated, has_high_integrity): New.
* src/common.h (is_elevated): Exposed.

2 years agoFix implicit vector include
Andre Heinecke [Mon, 8 May 2017 08:59:54 +0000 (10:59 +0200)]
Fix implicit vector include

* src/mimedataprovider.cpp: Fix build with newer stdc++ lib.

2 years agoFix misleading indentation warning
Andre Heinecke [Mon, 8 May 2017 08:12:24 +0000 (10:12 +0200)]
Fix misleading indentation warning

* src/w32-gettext.c (internal_gettext): Fix misleading indentation
warning.

2 years agoAdd missing copyright statements
Andre Heinecke [Tue, 25 Apr 2017 11:25:16 +0000 (13:25 +0200)]
Add missing copyright statements

* src/common.c,
src/common.h,
src/mimemaker.h,
src/revert.cpp: Add copyright.

--
I've modified more then 30% of theese files in 2015 and 2016
so the copyright statement should reflect that.

2 years agoUnify Copyright header indentation
Andre Heinecke [Tue, 25 Apr 2017 11:23:20 +0000 (13:23 +0200)]
Unify Copyright header indentation

--
This should help avoiding too long lines for the BSI header.

2 years agoChange copyright from Intevation to BSI
Andre Heinecke [Tue, 25 Apr 2017 11:10:17 +0000 (13:10 +0200)]
Change copyright from Intevation to BSI

* src/Makefile.am,
src/addin-options.cpp,
src/addin-options.h,
src/application-events.cpp,
src/attachment.cpp,
src/attachment.h,
src/common_indep.c,
src/common_indep.h,
src/eventsink.h,
src/eventsinks.h,
src/exechelp.c,
src/exechelp.h,
src/explorer-events.cpp,
src/explorers-events.cpp,
src/gpgoladdin.cpp,
src/gpgoladdin.h,
src/gpgolstr.cpp,
src/gpgolstr.h,
src/icons/Makefile.am,
src/mail.cpp,
src/mail.h,
src/mailitem-events.cpp,
src/mimedataprovider.cpp,
src/mimedataprovider.h,
src/mimemaker.cpp,
src/mlang-charset.cpp,
src/mlang-charset.h,
src/mymapi.h,
src/oomhelp.cpp,
src/oomhelp.h,
src/parsecontroller.cpp,
src/parsecontroller.h,
src/rfc2047parse.c,
src/rfc2047parse.h,
src/ribbon-callbacks.cpp,
src/ribbon-callbacks.h,
src/windowmessages.cpp,
src/windowmessages.h,
tests/Makefile.am,
tests/run-parser.cpp,
tests/t-parser.cpp: Change copyright to BSI.

--
This should make it more transparent who the copyright holder
actually is as most work since 2015 was done under development
contracts.

2 years agoSet the sender on verify / decrypt
Andre Heinecke [Thu, 23 Mar 2017 10:33:52 +0000 (11:33 +0100)]
Set the sender on verify / decrypt

* src/mail.cpp (Mail::decrypt_verify): Set sender on parser.
* src/parsecontroller.cpp (ParseController::setSender): Add API

--
This allows gnupg to use locate-key to locate a key not published
on keyserver and also enables proper tofu handling.

2 years agoAdd locate-keys option again
Andre Heinecke [Fri, 3 Mar 2017 14:41:18 +0000 (15:41 +0100)]
Add locate-keys option again

* src/addin-options.cpp: Uncomment autoresolve.
* src/dialogs.rc: Update accordingly.

--
To properly work this still requires auto-key-locate to
be configured in the gpg.conf

2 years agoImprove german translation
Andre Heinecke [Fri, 3 Mar 2017 14:14:56 +0000 (15:14 +0100)]
Improve german translation

--

2 years agoAssign maintainer
Werner Koch [Tue, 7 Feb 2017 14:41:16 +0000 (15:41 +0100)]
Assign maintainer

--

Signed-off-by: Werner Koch <wk@gnupg.org>
2 years agoUpdate translations and add german translation
Andre Heinecke [Tue, 17 Jan 2017 10:55:55 +0000 (11:55 +0100)]
Update translations and add german translation

* po/de.po: Translate
* po/fr.po, po/pt.po, po/sv.po, po/zh_CN.po, po/zh_TW.po: Auto update.

2 years agoMinor string improvements
Andre Heinecke [Tue, 17 Jan 2017 10:55:45 +0000 (11:55 +0100)]
Minor string improvements

--

2 years agoProgramatically resize window after category set
Andre Heinecke [Mon, 16 Jan 2017 14:52:37 +0000 (15:52 +0100)]
Programatically resize window after category set

* src/mail.cpp (resize_active_window): New. Resize window by 1px
and back.
(Mail::update_categories): Use it.

--
This fixes a display issue when categories are updated, mostly..

2 years agoHandle non trustworthy or unknown CA better
Andre Heinecke [Mon, 16 Jan 2017 14:33:54 +0000 (15:33 +0100)]
Handle non trustworthy or unknown CA better

* src/mail.cpp (Mail::get_crypto_details): Add handling for
unknown validity for S/MIME

2 years agoAdd option to disable crypt reply selection
Andre Heinecke [Fri, 13 Jan 2017 16:42:19 +0000 (17:42 +0100)]
Add option to disable crypt reply selection

* src/addin-options.cpp: Update accordingly.
* src/dialogs.h, src/dialogs.rc: Add new option.
* src/mailitem-events.cpp (EVENT_SINK_INVOKE): Handle option.
* src/main.c (read_options, write_options): Handle new option.

--
There are some usecases e.g. when using an encryption gateway
where choosing the reply crypto state based on the original
message might not be welcome. So make it optional.

2 years agoImprove decryption failed errors
Andre Heinecke [Fri, 13 Jan 2017 16:23:38 +0000 (17:23 +0100)]
Improve decryption failed errors

* src/parsecontroller.cpp (format_recipients): Add names to
known recipients and add the GPGME Error.

--
This would be much nicer if gnupg would return decent errors
e.g. if a user canceled the pinentry. Now we mostly have
"Decryption Failed: Decryption Failed" Super!

2 years agoDisable explorer sigstatus icon if preview off
Andre Heinecke [Fri, 13 Jan 2017 16:22:25 +0000 (17:22 +0100)]
Disable explorer sigstatus icon if preview off

* src/ribbon-callbacks.cpp (get_mail_from_control): Don't show
wrong sigstatus when preview pane is disabled.

2 years agoOnly invalidate UI when mail is not crypto mail
Andre Heinecke [Fri, 13 Jan 2017 16:01:04 +0000 (17:01 +0100)]
Only invalidate UI when mail is not crypto mail

* src/application-events.cpp (EVENT_SINK_INVOKE): Don't
invalidate on every load.
* src/mailitem-events.cpp (EVENT_SINK_INVOKE): Invalidate on
Read.

--
For crypto mails the invalidation will be done after the
mail has been processed. This further reduces uneccesary invalidations.

2 years agoReduce UI invalidations
Andre Heinecke [Fri, 13 Jan 2017 16:00:10 +0000 (17:00 +0100)]
Reduce UI invalidations

* src/explorer-events.cpp (EVENT_SINK_INVOKE): Only invalidate
if the current explorer has a reading pane.

2 years agoUpdate po files
Andre Heinecke [Fri, 13 Jan 2017 14:35:07 +0000 (15:35 +0100)]
Update po files

--

2 years agoDo not release the central application obj
Andre Heinecke [Fri, 13 Jan 2017 11:35:25 +0000 (12:35 +0100)]
Do not release the central application obj

* src/oomhelp.cpp (get_active_hwnd): Do not release central
application Object.

--
This was a 0x8000FFFF

2 years agoHandle QueryInterface errors
Andre Heinecke [Fri, 13 Jan 2017 11:34:30 +0000 (12:34 +0100)]
Handle QueryInterface errors

* src/oomhelp.cpp (get_oom_object): Handle QueryInterface errors.

--
Not a problem in practice but noticed that an error there is
unhandled while debugging another problem.

2 years agoTreat marginal in WoT as lvel 2
Andre Heinecke [Mon, 9 Jan 2017 12:13:43 +0000 (13:13 +0100)]
Treat marginal in WoT as lvel 2

* src/mail.cpp (Mail::update_sigstate): Set marginal trust
as level 2.

--
This is what we did before and also what kleopatra did.
Marginal trust is shown as trusted certificate and "green".

Only with tofu trust model we do marginal later because
it can be automatically reached and any seen key is marginal
in tofu.

2 years agoRelease attachments object earlier
Andre Heinecke [Mon, 9 Jan 2017 12:12:42 +0000 (13:12 +0100)]
Release attachments object earlier

* src/mail.cpp (Mail::check_attachments): Release
attachments object earlier.

2 years agoDeactive Outlook Window during encryption
Andre Heinecke [Mon, 9 Jan 2017 12:11:45 +0000 (13:11 +0100)]
Deactive Outlook Window during encryption

* src/mail.cpp (encrypt_sign): Deactivate Outlook Window.

--
Not optimal but this at least allows to move the outlook
window during encryption. Kleopatra must do some work to
really become modal.

2 years agoDisable button and fix msgs if no mail selected
Andre Heinecke [Mon, 9 Jan 2017 12:09:27 +0000 (13:09 +0100)]
Disable button and fix msgs if no mail selected

* src/gpgoladdin.cpp (GpgolRibbonExtender::GetIDsOfNames)
(GpgolRibbonExtender::Invoke, GetCustomUI_MIME): Update
for get_is_details_enabled.
* src/ribbon-callbacks.cpp (get_is_details_enabled): New.
(get_mail_from_control): Extend with selection state.

2 years agoAdd logo to options dialog
Andre Heinecke [Mon, 9 Jan 2017 12:08:18 +0000 (13:08 +0100)]
Add logo to options dialog

--

2 years agoSay PGP/Inline instead of inline-pgp
Andre Heinecke [Mon, 9 Jan 2017 12:06:28 +0000 (13:06 +0100)]
Say PGP/Inline instead of inline-pgp

* src/addion-options.cpp (set_labels): Change inline-pgp to
PGP/Inline.

--
This should be more inline with PGP/MIME

2 years agoWarn if partial crypto with attachments is found
Andre Heinecke [Fri, 6 Jan 2017 14:09:07 +0000 (15:09 +0100)]
Warn if partial crypto with attachments is found

* src/mail.cpp (Mail::check_attachments): Check if
all attachments are hidden and warn otherwise.
(Mail::parsing_done): Call check_attachments.
* src/mail.h: Update accordingly.
* src/oomhelp.p: Add new DASL.

--
This is important for inline Crypto mails where Attachments
may not have been signed or encrypted.

For MIME Mails we don't have the problem as we only handle
Crypto MIME Mails if the top level mime part is a crypto part
and so everything is crypto or not.

2 years agoUpdate crypto summary and lvl2 icon
Andre Heinecke [Fri, 6 Jan 2017 12:32:21 +0000 (13:32 +0100)]
Update crypto summary and lvl2 icon

* src/dialogs.rc: Use the same icon for lvl2 and 3
* src/mail.cpp (Mail::get_crypto_summary): Change wording.
(Mail::get_crypto_summary): Fix comment.
(Mail::get_crypto_one_line): New. Move one liner also into
mail class.
(Mail::get_crypto_details): Minor wording change.
* src/mail.h: Update accordingly.
* src/ribbon-callbacks.cpp (get_sig_ttip): Use one liner funct.

--
The difference between trusted / certified highly trusted
is more confusing then just using "Level" imo. Different
security levels are a real world concept and are hopefully
understandable.

2 years agoHide WKD Option for now
Andre Heinecke [Thu, 5 Jan 2017 16:42:50 +0000 (17:42 +0100)]
Hide WKD Option for now

--
Does not work yet because of missing HTTPS support and
we would also need to change the gpg.conf setting.
Let's hope we can revert this soon.

2 years agoAllow different UUIDs for the same mail
Andre Heinecke [Thu, 5 Jan 2017 16:25:44 +0000 (17:25 +0100)]
Allow different UUIDs for the same mail

* src/oomhelp.cpp (get_unique_id): Always create one if
called with create parameter.

--
Outlook can have multiple Event Handler for the Same Mail.
E.g. If you attach a mail to another mail it becomes so decoupled
that it has it's own event handler.

We must handle that case to avoid messing up or event handling /
internal state. It is now:
One UUID for One mailitem-events handler.

2 years agoFix crash when sending plain text mails
Andre Heinecke [Thu, 5 Jan 2017 13:17:17 +0000 (14:17 +0100)]
Fix crash when sending plain text mails

* src/mimemaker.cpp (add_body): Fix boundary handling.

2 years agoFix encrypt icon name in EXTRA_DIST
Andre Heinecke [Tue, 3 Jan 2017 14:59:21 +0000 (15:59 +0100)]
Fix encrypt icon name in EXTRA_DIST

* src/icons/Makefile.am (EXTRA_DIST): Fix encrypt name.

2 years agoFix direct trust handling
Andre Heinecke [Fri, 16 Dec 2016 18:08:04 +0000 (19:08 +0100)]
Fix direct trust handling

* mail.cpp (level_4_check): Fix it.
(Mail::get_crypto_details): Use it correctly.

2 years agoImprove some strings
Andre Heinecke [Fri, 16 Dec 2016 18:06:44 +0000 (19:06 +0100)]
Improve some strings

* src/gpgoladdin.cpp (GetCustomUI_MIME): Change some strings.
* src/mail.cpp(Mail::get_crypto_summary): Use trusted instead
of trustworthy.
(Mail::get_crypto_details): Update some strings.

2 years agoUpdate icons for level 2
Andre Heinecke [Fri, 16 Dec 2016 18:05:10 +0000 (19:05 +0100)]
Update icons for level 2

* src/icons: Update level2 icon
* src/icons/level-3-enc.png: Reexport

2 years agoHandle button click for encrypted only mails
Andre Heinecke [Fri, 16 Dec 2016 15:01:28 +0000 (16:01 +0100)]
Handle button click for encrypted only mails

* src/ribbon-callbacks.cpp (launch_cert_details): Handle
the case were a mail is unsigned.

2 years agoUse signed and encrypted again in tooltip
Andre Heinecke [Fri, 16 Dec 2016 14:58:20 +0000 (15:58 +0100)]
Use signed and encrypted again in tooltip

* src/ribbon-callbacks.cpp (get_sig_ttip): Use signed
and encrypted again.

--
This makes it more transparent and obvious for our existing
users what the new UI language means by secure, signed but
not secure etc.

2 years agoImplement direct trust handling
Andre Heinecke [Fri, 16 Dec 2016 14:53:28 +0000 (15:53 +0100)]
Implement direct trust handling

* src/mail.cpp (level_4_check): Do the actual check for direct
trust.
(Mail::get_crypto_details): Handle level 4 subcases with different
details.
* src/parsecontroller.cpp (ParseController::parse): Fetch
ultimately trusted keys if a sig was fully or ultimately valid.
(ParseController::get_ultimate_keys): New Helper function
to cache the ultimately valid keys.
* src/parsecontroller.h: Update accordingly.

2 years agoDon't add a dot after the tooltip
Andre Heinecke [Thu, 15 Dec 2016 16:55:11 +0000 (17:55 +0100)]
Don't add a dot after the tooltip

* src/ribbon-callbacks.cpp (get_sig_ttip): Remove dot.

2 years agoFix signature level for unencrypted mails
Andre Heinecke [Thu, 15 Dec 2016 16:54:20 +0000 (17:54 +0100)]
Fix signature level for unencrypted mails

* src/mail.cpp (Mail::get_signature_level): Don't always
return 0 for unencrytped mails.

2 years agoVarious string fixes for crypto_details
Andre Heinecke [Thu, 15 Dec 2016 16:53:41 +0000 (17:53 +0100)]
Various string fixes for crypto_details

* src/mail.cpp (Mail::get_crypto_details): Various string
fixes.

2 years agoInvert category order
Andre Heinecke [Thu, 15 Dec 2016 16:52:13 +0000 (17:52 +0100)]
Invert category order

* src/mail.cpp (Mail::update_categories): Invert order.

--
This should help when outlook decides to only show one category
because now the verified sender which is more important is shown
first.

2 years agoUse insecure instead of signed to sum up lvl1
Andre Heinecke [Thu, 15 Dec 2016 16:50:58 +0000 (17:50 +0100)]
Use insecure instead of signed to sum up lvl1

* src/mail.cpp (Mail::get_crypto_summary): Use insecure instead
of signed.

--
The word signed implies security and so might make phishing
easier if a signed phishing mail is shown as signed and not
as insecure.

2 years agoFix sigstate setting
Andre Heinecke [Thu, 15 Dec 2016 16:50:10 +0000 (17:50 +0100)]
Fix sigstate setting

* src/mail.cpp (Mail::update_sigstate): Skip empty uids
instead of non empty ones :-)

2 years agoPass key by reference to get_uid
Andre Heinecke [Thu, 15 Dec 2016 16:48:48 +0000 (17:48 +0100)]
Pass key by reference to get_uid

* src/mail.cpp (get_uid_for_sender): Pass key by reference
to avoid a copy.

2 years agoAlways activate the GpgOL read button
Andre Heinecke [Thu, 15 Dec 2016 16:07:09 +0000 (17:07 +0100)]
Always activate the GpgOL read button

* src/gpgoladdin.cpp (getCustomUI_MIME): Always enable button.
* src/ribbon-callbacks.cpp (launch_cert_details): Open
the emailselfdefense infographic for unencrypted / unsigned
mails.

--
Maybe a bit too much, but the idea is to raise awareness
that unencrypted / unsigned mails are insecure.

2 years agoHandle opaque signed inline pgp messages
Andre Heinecke [Thu, 15 Dec 2016 11:01:25 +0000 (12:01 +0100)]
Handle opaque signed inline pgp messages

* src/parsecontroller.cpp (ParseController::parse):
Handle opaque signed PGP Messages.

--
For signed only messages decryptandverify would create no
output we need to just verify in that case.

2 years agoFix / improve inline PGP decryption
Andre Heinecke [Wed, 14 Dec 2016 16:04:08 +0000 (17:04 +0100)]
Fix / improve inline PGP decryption

* src/mapihelp.cpp (change_message_class_ipm_note): Look for
PGP Lines even without content type.
* src/mimedataprovider.cpp (MimeDataProvider::write): Respect
m_collect_everything.
* src/parsecontroller.cpp (ParseController::ParseController): Don't
expect MIME headers for inline pgp data.
(expect_no_mime): New.

2 years agoUpdate copyright year
Andre Heinecke [Wed, 14 Dec 2016 16:03:20 +0000 (17:03 +0100)]
Update copyright year

--

2 years agoUpdate signature status display
Andre Heinecke [Wed, 14 Dec 2016 15:51:17 +0000 (16:51 +0100)]
Update signature status display

* src/icons: Add new Icons, remove old icons.
* src/icons/Makefile.am (EXTRA_DIST): Update accordingly.
* src/dialogs.h: Define ids
* src/dialogs.rc: Include new icons.
* src/gpgoladdin.cpp: Update some function names.
* src/mail.cpp (Mail::update_sigstate): Use tofu validity
from gnupg.
(Mail::get_valid_sig): Removed. Too confusing.
(Mail::is_signed): Constify.
(Mail::is_encrypted): New, similar to is_signed.
(level_4_check): Helper to figure out the correct message
for level 4.
(Mail::get_crypto_summary): New. More differntiated title.
(Mail::get_signature_level): New. defines levels.
(Mail::get_crypto_details): New. Replacement for get_signature_status
(Mail::get_crypto_icon_id): Use levels and new icons.
* src/mail.h: Update accordingly.
* src/ribbon-callbacks.cpp (get_is_crypto): Renamed from
get_is_signed.
(get_sig_label): Use get_crypto_summary.
(get_sig_ttip): Use get_crypto_summary.
(get_sig_stip): Use get_crypto_details.
(get_crypto_icon): Use renamed function.
* src/ribbon-callbacks.h: Update accordingly.

--
This commits starts implementing signature / crypto status
display as discussed on:
https://wiki.gnupg.org/EasyGpg2016/AutomatedEncryption

Apologies for the large commits that mushes the string
and icon changes.

There are still bugs but I needed to commit some changes so
that I won't get lost completely.

2 years agoRecuce Sign and Encrypt to single split button
Andre Heinecke [Fri, 9 Dec 2016 14:19:22 +0000 (15:19 +0100)]
Recuce Sign and Encrypt to single split button

* src/dialogs.h: Add new icon ids.
* src/ribbon-callbacks.h: Add new ids.
* src/ribbon-callbacks.cpp (GpgolRibbonExtender::GetIDsOfNames),
(GpgolRibbonExtender::Invoke): Handle new ids.
(GetCustomUI_MIME): Use split button.
* src/ribbon-callbacks.cpp (mark_mime_action): Invalidate ui.
(get_crypt_pressed): Handle queries for multiple flags.