Werner Koch [Mon, 23 Jun 2025 12:41:38 +0000 (14:41 +0200)]
Release 2.6.2
Werner Koch [Mon, 23 Jun 2025 12:41:25 +0000 (14:41 +0200)]
po: msgmerge
--
Markus Montkowski [Mon, 23 Jun 2025 10:01:52 +0000 (12:01 +0200)]
Merge branch 'master' of ssh://git.gnupg.org/git/gpgol
Markus Montkowski [Mon, 23 Jun 2025 09:54:29 +0000 (11:54 +0200)]
Bring back BRING_TO_FRONT event handling
* windowmessages.cpp: add handling back to gpgol_window_proc
--
The handling was removed in 66ab6d8 prob by exident when removing
code from CRYPRO_DONE as the other code still did send the event.
Ingo Klöcker [Wed, 28 May 2025 07:48:44 +0000 (09:48 +0200)]
Use gpgme_off_t and gpgme_ssize_t everywhere for GpgME++ 2.0
* src/mail.cpp (copy_data_property): Use gpgme_off_t instead of off_t.
* src/mimedataprovider.cpp, src/mimedataprovider.h
(MimeDataProvider::read, MimeDataProvider::write,
MimeDataProvider::seek): Use gpgme_off_t and gpgme_ssize_t instead of
off_t and ssize_t.
--
We need to use gpgme_off_t and gpgme_ssize_t instead of off_t and
ssize_t to avoid conflicting types for 64-bit builds.
Werner Koch [Thu, 15 May 2025 14:06:47 +0000 (16:06 +0200)]
Post release updates
--
Werner Koch [Thu, 15 May 2025 13:52:34 +0000 (15:52 +0200)]
Release 2.6.1
Markus Montkowski [Thu, 15 May 2025 12:36:04 +0000 (14:36 +0200)]
Handle filtered READ events
* src/explorer-events: change hasSelection to only return true if a
mailitem was selected and
hasMailitemEventReadBeenCalled returns true
* src/gpgoladdin.h: define new functions
markMailitemEventReadAsCalled
bool hasMailitemEventReadBeenCalled
* src/gpgoladdin.cpp: implement the new functions and a static var to
store the state.
* src/mail.h: remove code for isVdPostponed
* src/map.cpp: implement isVdPostponed and add more loging
* src/mailitem-events.cpp: Call markMailitemEventReadAsCalled on READ
* src/ribbon-callbacks.cpp: Add Tracepoint calls to hunt down crash
--
Add functions to set/read a flag gets set whenever the mailitem-event
READ event is called it indicated that no other addin like titus
filtered out the event. If set we invalidate the ribon on
SelectionChange events in explorer-events as we would normally do that
on handling the READ event.
Markus Montkowski [Thu, 15 May 2025 12:25:34 +0000 (14:25 +0200)]
Handle non mail items in inbox events
* src/explorer-events: Change hasSelection to only return true if a
mailitem was selected.
--
Force invalidate ribon for selection to non mail items by
indicating no selection has occured.
In gpg4win-5.0.0-beta190 this is the same as
patches/gpgol-2.6.0/0002-ribbon_status_icon_fix-050508.patch
Markus Montkowski [Fri, 25 Apr 2025 10:41:03 +0000 (12:41 +0200)]
Fix bug introduced fixing T6646 on April 9
* ribbon-callback.cpp: get_mail_from_control fix accesing an
empty vector
--
Calling front() on a vector where empty() is true is
undefined. Code rearanged to prevent that.
Fixes-commit: a95d340e478f8fb9529b49b0518a0fafa4d00bfe
GnuPG-bug-id: 6646
Werner Koch [Mon, 14 Apr 2025 16:12:34 +0000 (18:12 +0200)]
Post release updates
--
Werner Koch [Mon, 14 Apr 2025 15:35:12 +0000 (17:35 +0200)]
Release 2.6.0
Werner Koch [Mon, 14 Apr 2025 15:30:03 +0000 (17:30 +0200)]
Updated copyright infos.
Removed the notice for G-Data because there is no more G-Data code
left.
Markus Montkowski [Wed, 9 Apr 2025 10:11:57 +0000 (12:11 +0200)]
Only check search in mails for uuid if not found in UUID list
* src/ribbon-callbacks.cpp: only search as fallback
--
Only if getMailForUUID comes up empty use searchMailsByUUID
speeds up lookup as the first function if much faster.
GnuPG-Bug-Id: T6646
Markus Montkowski [Wed, 9 Apr 2025 09:53:34 +0000 (11:53 +0200)]
Catch all canceled decryptions
* src/mail.h declare new member function realyDecryptedSuccessfull
* src/mail.cpp implement realyDecryptedSuccessfull which checks for
just signed or return code of decryption operation is ok
* src/ribbon-callbacks.cpp: get_is_crypto_mail now uses the new
realyDecryptedSuccessful function
--
We got GPG_ERR_NOT_FOUND back from cancel pin/password dialog
which worked and GPG_ERR_CANCELED which resulted in true for a null
chech of error and thus didn't. Now the new function checks for 0
(OK) as error code.
GnuPG-Bug-Id: T7485
Markus Montkowski [Mon, 7 Apr 2025 11:13:19 +0000 (13:13 +0200)]
Better loggin in maiphelp.cpp
Werner Koch [Tue, 1 Apr 2025 12:46:47 +0000 (14:46 +0200)]
Update news to prepare for 2.6.0
--
Markus Montkowski [Mon, 3 Feb 2025 14:27:30 +0000 (15:27 +0100)]
Fix T7079 by adding new level 3 icons
* src/dialogs.rc: change resource names of level 2 icons
* icons/level-2-old.*: Keep copy of the old level 2 icon files
* icons/level-2.*: Rename the old level 3 icons files
* icons/level-2-enc.*: Rename the old level 3 icons files
* icons/level3.*: New level 3 icons files with two checkmarks
* icons/level-3-enc.*: New level 3 icons files with two checkmarks
--
Add new icons for trustlevel 3 which now show two checkmarks in the
green circle
Markus Montkowski [Mon, 3 Feb 2025 16:09:54 +0000 (17:09 +0100)]
Fix T6646, Show signature status in ribbon for filesystem Emails
* src/oomhelp.h: define constant for PR_INTERNET_MESSAGE_ID_W_DASL
* src/oomhelp.cpp: In get_unique_id if GPGOL_UID_DASL is not found and
should not be created try to use
PR_INTERNET_MESSAGE_ID_W_DASL as ID
* src/ribbon-callbacks.cpp: Search via searchMailsByUUID and use first
mail found instead of getMailByUUID.
--
Mails from filesystem don't have a GPGOL_UID property alos EntryID is
not set so we fallvak and use the Message-ID to find the email to
update the ribbon status icons.
Markus Montkowski [Thu, 27 Mar 2025 12:56:02 +0000 (13:56 +0100)]
Fix T7590, crash on cancel
* src/oomhelp.cpp: fix return for
get_unique_id_s if no uuid is found
--
return std::string() instead of
std::string(val) as val is always null here
Markus Montkowski [Mon, 24 Mar 2025 08:24:14 +0000 (09:24 +0100)]
Fix T7485, Using "Permanently decrypt" after cancelling ...
* src/ribbon-callbacks.cpp: get_is_crypto_mail now checks for
decryptedSuccessful instead of just isEncrypted
--
Change the callback so that menu entries are only enabeld if
we did process the encryped mail successfully.
Markus Montkowski [Mon, 24 Mar 2025 08:03:16 +0000 (09:03 +0100)]
Fix T5681, Handle ReadAsPlain from Policies first
* src/gpgoladdin.cpp: Change order of Registry paths
--
Local registry setting was checked first so setting set
via Policies was irgnored. By now looking at the policies
first they can't be overruled by local settings set by the user.
Ingo Klöcker [Thu, 23 Jan 2025 14:11:18 +0000 (15:11 +0100)]
Replace usage of deprecated Error::asString()
* src/addin-options.cpp (open_gpgolconfig): Call asStdString().c_str()
instead of asString().
* src/addressbook.cpp (open_keyadder): Ditto.
* src/cryptcontroller.cpp (CryptController::resolve_keys,
CryptController::do_crypto): Ditto.
* src/keycache.cpp (do_import, do_populate_protocol, gpgsm_learn):
Ditto.
* src/wks-helper.cpp (check_published, do_check,
WKSHelper::start_publish, WKSHelper::handle_confirmation_notify): Ditto.
* src/mail.cpp (do_crypt): Ditto.
(Mail::getCryptoDetails_o): Call asStdString() instead of asString().
* src/parsecontroller.cpp (format_error): Ditto.
--
This fixes the deprecation warnings that fly by when building gpg4win.
Ingo Klöcker [Mon, 20 Jan 2025 16:13:53 +0000 (17:13 +0100)]
build: Explicitly look for gpgmepp
* configure.ac: Require gpg-error 1.47, gpgme 1.24.0, and gpgmepp
1.24.0. Use AM_PATH_GPGMEPP to look for gpgmepp. Set GPGMEPP_CXXFLAGS to
value of GPGMEPP_CFLAGS set by AM_PATH_GPGMEPP. Change error message
shown if gpgmepp wasn't found.
* m4/Makefile.am (EXTRA_DIST): Add gpgmepp.m4.
* m4/gpgmepp.m4: New.
* src/Makefile.am (libgpgmepp.a): Use "gpgrt-config gpgmepp --prefix"
instead of "gpgme-config --prefix".
--
This prepares gpgol for the separation of gpgmepp from gpgme. Since
version 1.24.0 gpgme/gpgmepp provides a pkg-config file for gpgmepp
which allows us to look for gpgmepp with gpgrt-config. gpgme 1.24.0
requires gpg-error 1.47 so that we can safely require the same version.
GnuPG-bug-id: 7262
Werner Koch [Tue, 7 Jan 2025 09:14:27 +0000 (10:14 +0100)]
Post release updates
--
Werner Koch [Tue, 7 Jan 2025 09:02:32 +0000 (10:02 +0100)]
Release 2.5.15
Werner Koch [Thu, 12 Dec 2024 14:09:58 +0000 (15:09 +0100)]
po: msgmerge
--
Werner Koch [Thu, 12 Dec 2024 14:09:46 +0000 (15:09 +0100)]
po: Update German translation
Werner Koch [Thu, 12 Dec 2024 14:01:29 +0000 (15:01 +0100)]
Shorten option name to "disableAutoPreview".
* src/main.c (read_options): Change option name to disableAutoPreview.
* src/gpgoladdin.cpp (check_auto_vd_mail): Remove.
* src/mailitem-events.cpp (EVENT_SINK_INVOKE): Don't call the removed
function.
--
This also changes the behaviour to require a restart after changing
this option. Or well, to call the config dialog which will re-read
the options too.
Andre Heinecke [Wed, 11 Dec 2024 14:56:49 +0000 (15:56 +0100)]
Fix sending multipart/related
This fixes writing the content-id for attachments in
MIME which was broken with
9f81ed6561c5f41e50d1a51333c9586a33ed2ef6
While this issue was hidden when we had related attachments
disabled due to T5982 it would also not work
in third party clients.
Fixes-Commit: 9f81ed6561c5f41e50d1a51333c9586a33ed2ef6
GnuPG-Bug-Id: T5982
Werner Koch [Wed, 11 Dec 2024 12:48:41 +0000 (13:48 +0100)]
Fix error return in mapihelp functions.
* src/mapihelp.cpp (get_first_attach_data_tag_fname): Return
std::string().
--
Fixes-commit: 26c2fc196bb73d9bd96c91ea7cc12679d925b376
Werner Koch [Wed, 11 Dec 2024 11:16:35 +0000 (12:16 +0100)]
Updated the docs and prepared NEWS.
--
Markus Montkowski [Tue, 10 Dec 2024 15:45:38 +0000 (16:45 +0100)]
Add support to disable automatic verify/decrypt of the mail in preview
* src/common_indep.h: Add new flag dont_autodecrypt_preview to opt_s
* src/gpgoladdin.cpp: Add function check_auto_vd_mail which checks if
the registy value disableAutoPreviewHandling is set and updates the
global opt structure. Adds new button to the context menu to start
validation/decryption and adds mapping for the two new Ribbon
IDs ID_CMD_DECRYPT_MANUAL, ID_GET_VD_POSTPONED used by the menu entry.
* src/gpgoladdin.h: Declare new function
* src/mail.h: Add flag m_vd_postponed to mail, declare Getter for it and
add version of decryptVerify_o with bool option doRevertOnly.
Add getCopy function
* src/mail.cpp: Init the new flag, add boolean parameter to the original
decrypt_verify_o wether to stop processing after reverting the
MessageClass and return after setting m_vd_postponed to true.
Create a parameter less version which calls the the original version
with false. If parameter is not set set m_vd_postponed to false.
Implement getCopy
* mailitem-events.cpp: on Open if the mail is a crypto mail and
decyption has been postponed call decryptVerify_o.
on Read call check_auto_vd_mail and call decrypt_verify_o with the
parameter opt.dont_autodecrypt_preview.
Add logging for events BeforeAttachmentSave,BeforeCheckNames
* src/main.cpp: reading disableAutoPreviewHandling from config
* src/ribbon-callbacks.cpp: add functions get_is_vd_postponed,
decrypt_manual used by the context menu to see if the entry should be
shown and handle the click event.
* src/ribbon-callbacks.h: declare context menu IDs & handling functions
--
If the new Registry value "disableAutoPreviewHandling" is set to 1
then the decryption/validation funtion/eventflow is aborted after
reseting the messageclass. The User has to either open the mail by
doubleclicking or pressing "Start decyption" in the context menu to
continue the normal eventflow.
If the key is not set or 0 the "old" behaviour is shown and emails are
auto verified/decryped when selected.
Werner Koch [Tue, 10 Dec 2024 14:50:34 +0000 (15:50 +0100)]
Merge branch 'feat-titus'
--
Werner Koch [Tue, 10 Dec 2024 14:48:49 +0000 (15:48 +0100)]
New Registry option disableTitusHandling.
* src/common_indep.h (opt): New field disable_titus_handling. Also
re-format some comments.
* src/main.c (read_options): Set that option.
* src/mapihelp.cpp (get_content_type_from_header): Take care of the
option.
Werner Koch [Tue, 10 Dec 2024 14:23:16 +0000 (15:23 +0100)]
Minor cleanup of the new function.
* src/mapihelp.cpp
(get_first_attach_data_with_mime_tag_and_file_name): Rename to ...
(get_first_attach_data_tag_fname): to keep symbol length at bay.
(get_first_attach_data_tag_fname): Protect strcmp against a NULL
return value from get_attach_filename. Use
get_content_type_from_header instead of accidently commited
get_message_content_type. Minor reformatting.
Markus Montkowski [Fri, 6 Dec 2024 15:30:03 +0000 (16:30 +0100)]
Fix nullpointer assignment
* src/mapihelp.cpp: Fix setting *r_nobody without checking for null
--
This should fix the bug reported in RT #30427
Markus Montkowski [Tue, 3 Dec 2024 13:00:01 +0000 (14:00 +0100)]
Add handling for titus processed mails
* src/mapihelp.cpp: Add function
get_first_attach_data_with_mime_tag_and_file_name which return the
content of a matching attachment.
The function mapi_get_message_content_type was splitted in 2 with the
new get_content_type_from_header doing the actual processing and the
old map_get_message_type just reading the mail header into a buffer and
calling the new function. The new get_content_type_from_header function
checks if the mail is a multipart/mixed with an X-Titus-* header line
and uses the added function to read the attached mail and calls istself
with these buffer thereby returing the Content-Type of the mail in the
attachment and not the one of the message.
Werner Koch [Thu, 14 Nov 2024 14:29:16 +0000 (15:29 +0100)]
Update .gitignore
--
Werner Koch [Thu, 14 Nov 2024 14:26:35 +0000 (15:26 +0100)]
Minor README updates
--
Andre Heinecke [Wed, 28 Aug 2024 08:13:49 +0000 (10:13 +0200)]
Post release version bump
--
Andre Heinecke [Wed, 28 Aug 2024 08:05:45 +0000 (10:05 +0200)]
Update NEWS for todays release
--
Werner Koch [Tue, 27 Aug 2024 11:40:17 +0000 (13:40 +0200)]
po: Run msgmerge
--
Werner Koch [Tue, 27 Aug 2024 11:39:32 +0000 (13:39 +0200)]
po: Update German translation
--
Werner Koch [Tue, 27 Aug 2024 11:38:37 +0000 (13:38 +0200)]
Typo fix and translate strings from attachments.cpp.
* src/attachment.cpp (Attachment::attach_to): Typo fix
* po/POTFILES.in: Add attachments.cpp.
Andre Heinecke [Fri, 23 Aug 2024 11:17:53 +0000 (13:17 +0200)]
Update NEWS with my changes from today
* NEWS: Update.
Andre Heinecke [Fri, 23 Aug 2024 10:59:40 +0000 (12:59 +0200)]
Change order of overlay dtor
* src/overlay.cpp (Overlay::~Overlay): First enable the
window and then bring it to front before removing the overlay.
--
Since I have seeen hangs here I am unsere if it could be a
problem if the Window related to the overlay is disabled. I
doubt that this will fix an issue but it adds more debug
output and if the overlay does not die properly and
m_overlayCtx->wait(); Hangs at least Outlook will still be
eactive again.
Andre Heinecke [Fri, 23 Aug 2024 10:28:48 +0000 (12:28 +0200)]
Add support for encapsulated message/rfc822 data
* src/attachment.cpp (Attachment::set_is_mime, Attachment::is_mime):
New. Mark if the attachment contains parsable MIME data.
(Attachment::attach_to): Moved out from mail.cpp to Attachment class
and added handling for is_mime.
* src/attachment.h: Update accordingly.
* src/mail.cpp (Mail::add_atttachments_o): Use Attachment::attach_to
instead of doing it here.
* src/mimedataprovider.cpp (mime_context): Extend with
in_encapsulated_msg state.
(t2body): Mark message/rfc822 content-types in subparts as
encapsulated.
(MimeDataProvider::collect_input_lines): Handle in_encapsulated_msg
state.
(MimeDataProvider::get_header): Add to class and not just static.
(MimeDataProvider::finalize): Update call to get_header.
* src/mimedataprovider.h (MimeDataProvider::get_header): Declare.
* src/rfc822parse.c (rfc822parse_query_boundary): New. Expose
boundary.
* src/rfc822parse.h (rfc822parse_query_boundary): Declare.
--
When we detect a nested mimepart with content-type message/rfc822
we now skip the first line, as usual, then collect the data that
follows into an attachment without passing the data to rfc822parse.
This is done to ensure that the parser is not confused by e.g. multiple
headers from the encapsulated mail.
In collect_input_lines we search "manually" for the boundary of the
encapsulated message part and if found finish the part in rfc822_parse
and continue.
The Attachment is then marked as containing MIME data with the new
is_mime flag. And if that flag is set the filename and displayname
are extracted from the subject of the encapsulated mail, if possible.
This is done in Attachment::add_to where the data of the attachment
is placed into a new MimeDataProvider which now provides easy access
to the headers.
GnuPG-Bug-Id: T7266
Andre Heinecke [Fri, 23 Aug 2024 10:20:51 +0000 (12:20 +0200)]
Add filename sanitizers for windows filenames
* src/common.cpp (sanitizeFileName, validateWindowsFileName)
(windowsDeviceSubDirPattern, windowsDeviceNoSubDirPattern): New.
* src/common.h: Update accordingly.
--
This fixes working with attachments which contain invalid
characters in their name. Previously getTmpOutfile would have
ended up with just the completely generic name attachment. Now
we remove the invalid characters from the filename with
sanitizeFileName.
GnuPG-Bug-Id: T4835
GnuPG-Bug-Id: T6864
Andre Heinecke [Fri, 23 Aug 2024 10:18:42 +0000 (12:18 +0200)]
Fix minor memory tracking issue
* src/oomhelp.cpp (is_mail_in_folder): Use xfree to
release strings allocated by string conversion functions.
--
This has no real impact but memdbg would still track the
addresses of these strings otherwise since utf8_to_wchar
registers its allocations.
Andre Heinecke [Fri, 23 Aug 2024 10:14:03 +0000 (12:14 +0200)]
Fix uninitalized return value in create_category
* src/oomhelp.cpp (create_category): Initialize rVariant.
--
If the invoke does not set the return value the return
value is uninitalized and the call to VariantClear later
might free an invalid address. Which causes undefined
behavior and might lead to freezes and crashes.
This was noticed as a "crash after decrypt / verify".
Andre Heinecke [Wed, 21 Aug 2024 12:23:32 +0000 (14:23 +0200)]
Post release version bump
--
Andre Heinecke [Wed, 21 Aug 2024 12:20:13 +0000 (14:20 +0200)]
Auto update po files
* po: Auto update
Andre Heinecke [Wed, 21 Aug 2024 12:16:32 +0000 (14:16 +0200)]
Update NEWS for todays release.
--
Andre Heinecke [Wed, 21 Aug 2024 12:12:47 +0000 (14:12 +0200)]
NEWS: Note another fix for the next release
* NEWS: Add note about misclassification of mails.
Andre Heinecke [Wed, 21 Aug 2024 11:56:56 +0000 (13:56 +0200)]
Revert "Set missing filename to rfc822_email.eml..
This reverts commit 0d16049d41e052ea9b5d7a7878ece3d02a182161.
Since this fix only prints a static filename when an
enacapsulated message is detected but does neither parase the
mail nor fill it with the complete data it is better to
leave it out for a bugfix release as this only creates
more problems then it solves. The encapsulated message part
needs to be eihter completely cut out from our parser and
treated as a MAPI attachment or ignored if we do not support
it.
Werner Koch [Wed, 21 Aug 2024 10:50:15 +0000 (12:50 +0200)]
Update NEWS.
Andre Heinecke [Fri, 16 Aug 2024 12:59:00 +0000 (14:59 +0200)]
Fix classification of OpenPGP Multipart/Signed mails
* src/mapihelp.cpp (mapi_change_message_class): Fix
multipart signed handling.
* src/mail.cpp (Mail::decryptVerify_o): Fix class dance
and improve the documentation.
--
For OpenPGP multipart/signed mails the message class set
initially (before the first view) is set to
IPM.Note.SMIME.MultipartSigned. This is why in
change_message_class_ipm_note_smime we check for the
protocol to then set either IPM.Note.GpgOL.MultipartSigned
for PGP mails or IPM.Note.GpgOL.SM.MultipartSigned for SMIME
mails. The old code in mapihelp did not control the flow
properly for that case, which resulted in such mails beeing
classified as IPM.Note.SMIME. Causing T7243. That
bug was introduced in Feburaray 2020 with the WKS handling.
Then in decryptVerify it needs to be adjusted again and is
set back to IPM.Note.SMIME.MultipartSigned since it will
then still display contents and attachments in case GpgOL
is disabled or a client without PGP/MIME Support accesses
it.
GnuPG-Bug-Id: T7242
Andre Heinecke [Fri, 16 Aug 2024 12:43:36 +0000 (14:43 +0200)]
Ignore unknown write event again
* src/common_indep.h (opt.closeOnUnknownWriteEvent): New.
* src/mailitem_events.cpp (WriteCancelIgnored): Check for new opt.
* src/main.c (read_options): Read new option.
--
This is an extension of the previouis commit:
10721b1dccf4e89e44ad6a340938acf10f95847f to be even more
conservative when we close our mail since even ignoring
the event only after decryption still leaves the
mark as read issue with encrypted mails if the
marking happens not immediately on read.
To handle situations where this setting might
still be required and for experiments there is
now an option that can be set to enable the closing
of the Mail again. "closeOnUnknownWriteEvent"
GnuPG-Bug-Id: T7223
Andre Heinecke [Thu, 15 Aug 2024 11:02:14 +0000 (13:02 +0200)]
Fix message save before decrypt handling
* src/mail.cpp (Mail::decryptVerify_o): Only restore msgclass
for S/MIME mails. Only save PGP Mails before decrypt if they
are encrypted.
* src/mailitem-events.cpp (WriteCancelIgnored): Only
fall through to cancel if the write happens after decryption.
--
The intention of the original code to restore the message class
before decryption was that the S/MIME Message are still set
on the server even if we locally changed them to GpgOL message
classes in the BeforeRead event. Using this to also restore
PGP classes caused an issue where PGP MultipartSigned mails
were treated as S/MIME Mails. Esp. in combination with
disabled S/MIME support this triggered a revert at the end
of working with the mail, which then caused buggy behavior
like duplicated attachments.
Additionally we now check if the decryption has actually
happend before we fall through to close in the uncancellable
write event. Since we could now observe that this event happens
in combination with marking a mail as Read. Which was misunderstood
in 1f9c757872b033e1be8199c4d488ac84bf8f07bd and attributed
to the explicit saving. So the explicit call to
oom_message->SetReadFlag(0); is no longer necessary. Fixing
issues where the read flag is set by Outlook at different times
depending on the Options.
Closing the mail this early might also have contributed to
endless loops of read + close which appeared to occur
more regularly with third party addins due to us closing
the mail once we have seen event 0xFC99.
Fixes-Commit: dd3ff8397aaf62e58fa9405ddc5397cb6bcfdc29
Fixes-Commit: 1f9c757872b033e1be8199c4d488ac84bf8f07bd
GnuPG-Bug-Id: T7242
GnuPG-Bug-Id: T7243
Andre Heinecke [Thu, 15 Aug 2024 10:58:35 +0000 (12:58 +0200)]
Add status info to a debug output
* src/keycache.cpp (do_update): Add the word "idling" to the
done statement.
--
This usually the last time that happens after a decrypt /verify
so when this returns GpgOL is idling. Noting that makes it
look less like some crash later on occured while GpgOL
was working.
Andre Heinecke [Mon, 5 Aug 2024 14:40:43 +0000 (16:40 +0200)]
Statically link winpthread
* src/Makefile.am (gpgol_LDFLAGS): Add -static -lpthread
--
As with libstdc++ and with libgcc_sjlj, this links in the
pthread library from the build system so that GpgOL has no
external dependencies again. Which makes it more robust to
replace the DLL as a patch in a different build.
GnuPG-Bug-Id: T7241
Andre Heinecke [Mon, 22 Jul 2024 11:55:23 +0000 (13:55 +0200)]
Add GPG_ERROR_CFLAGS explicitly
* src/Makefile.am, tests/Makefile.am: Add GPG_ERROR_CFLAGS
explicity.
--
Previously this relied on gpg-error beeing in the
same place as libassuan or libassuan providing
the required cflags to also include gpg-error.
Andre Heinecke [Mon, 22 Jul 2024 11:54:28 +0000 (13:54 +0200)]
m4: Update libassuan.m4, too
* m4/libassuan.m4: Update.
--
This brings it in line again with the other libassuan.m4
files in our repo which are usually updated together
with gpg-error.m4.
Andre Heinecke [Mon, 22 Jul 2024 11:51:04 +0000 (13:51 +0200)]
Remove werror for maintainer-mode
* configure.ac (CFLAGS, CXXFLAGS): Remove -Werror
--
Since it is better to show the error instead of
hiding it, as to not cause a compilation failue due
to -Werror, I have removed Werror and readded warnings
for: "deprecated-copy" "address" and "stringop-overflow".
The cause for this was that GPGME recently deprecated
Error::asString and depending on an unreleased
GPGME would be too early to fix the deprecation
warnings without IFDEFs
Andre Heinecke [Wed, 3 Jul 2024 15:14:38 +0000 (17:14 +0200)]
Remove myself as the package maintainer
* AUTHORS: Change maintainershipt to g10 Code GmbH
Andre Heinecke [Tue, 13 Feb 2024 05:30:07 +0000 (06:30 +0100)]
Po: add italian translations
* po/it.po (Update).
Werner Koch [Wed, 3 Jul 2024 15:11:48 +0000 (17:11 +0200)]
Make mak distcheck work again
* Makefile.am (SUBDIRS) [W32]: Disable tests dir
Werner Koch [Wed, 3 Jul 2024 14:45:53 +0000 (16:45 +0200)]
Require C++14 also for tests and fix previous commit.
* tests/Makefile.am (AM_CXXFLAGS): Rwquire C++14
(parser_SRC): Remove accidently inserted keycache.
Werner Koch [Wed, 3 Jul 2024 10:08:29 +0000 (12:08 +0200)]
Fix indentation.
* src/mimedataprovider.cpp (t2body): Just to be really sure check
ctmain and ctsub before strcmp.
--
The check is not really required because at that point boths vars are
not NULL. However, it makes reading the code easier because there is
no need to think about this.
Markus Montkowski [Tue, 25 Jun 2024 15:24:26 +0000 (17:24 +0200)]
Set missing filename to rfc822_email.eml for message/rfc822 attachments
Werner Koch [Tue, 21 May 2024 10:49:03 +0000 (12:49 +0200)]
build: Update autogen.sh and autogen.rc to a modern version.
--
Werner Koch [Tue, 21 May 2024 10:06:29 +0000 (12:06 +0200)]
build: Update libassuan.m4 to 2023-07-26 and gpgrt to 2023-04-01
--
The libassuan update allows building with libassuan 3.
The gpg-error update is just regular maintenance.
Andre Heinecke [Tue, 2 Jan 2024 11:59:32 +0000 (12:59 +0100)]
Post release version bump
--
Andre Heinecke [Tue, 2 Jan 2024 11:54:35 +0000 (12:54 +0100)]
Auto update po files
--
Andre Heinecke [Tue, 2 Jan 2024 11:53:53 +0000 (12:53 +0100)]
Update NEWS for todays release
--
Andre Heinecke [Fri, 15 Dec 2023 11:07:17 +0000 (12:07 +0100)]
Fix crash on temporary mailref from ribbon control
* src/ribbon-callbacks.cpp (get_mail_from_control): Check
if the Mail object still exists after releasing the reference.
--
When switching Applications in Outlook and Outlook is configured
to always show a mail in the mailview (e.g. Outlook 2016) it
can happen that the mail is newly read but the invalidation of
the ribbon happens before that and still returns a pointer to
the old mailobject. This will then be deleted once we release
it in the ribbon callback.
This caused a jump into recently freed memory which might
resulted in crashes.
GnuPG-Bug-Id: T6861
Andre Heinecke [Wed, 29 Nov 2023 21:50:12 +0000 (22:50 +0100)]
Post release version bump
--
Andre Heinecke [Wed, 29 Nov 2023 20:28:26 +0000 (21:28 +0100)]
Move GPGME init from DLLMain to COM init
* NEWS: Update.
* src/common.cpp (get_gpgme_w32_inst_dir): Move here from main.c
(set_global_hinstance): Removed for readability.
* src/common.h: Update accordingly.
* src/main.c (get_gpgme_w32_inst_dir): Move to common.cpp
(DllMain): Remove all initialization code.
* src/gpgoladdin.cpp (GpgolAddin::GpgolAddin): Do the
GPGME initalization here.
--
This does not functionally change anything but should probably
fix the "This addin caused a slow start of Outlook message".
GnuPG-Bug-Id: T6856
Andre Heinecke [Wed, 29 Nov 2023 14:30:10 +0000 (15:30 +0100)]
Post release version bump
* NEWS, configure.ac: Bump version.
Andre Heinecke [Wed, 29 Nov 2023 14:27:05 +0000 (15:27 +0100)]
Auto update po files
* po: Auto auto update.
Andre Heinecke [Wed, 29 Nov 2023 14:16:54 +0000 (15:16 +0100)]
Update NEWS for todays release
--
Andre Heinecke [Wed, 29 Nov 2023 12:42:48 +0000 (13:42 +0100)]
Log description of loaded addins
* src/oomhelp.cpp (log_addins): Also log description.
--
This helps in support to identify incompatible Addons.
Andre Heinecke [Sun, 19 Nov 2023 12:54:42 +0000 (13:54 +0100)]
Use offline and AlwaysTrust for S/MIME draft enc
* src/cryptcontroller.cpp (CryptController::do_crypto):
Check for draft encryption and then enable forced behavior.
--
When encrypting a draft it needs to be quick since it can happen
on Autosave at any point so we do not want to do CRL checks in that
case. And might also ignore other errors related to the certificate.
GnuPG-Bug-Id: T6827
Andre Heinecke [Tue, 14 Nov 2023 12:27:10 +0000 (13:27 +0100)]
Do not delete input after sign & encrypt
* src/cryptcontroller.cpp (CryptController::do_crypto): Do
not delete input after constructing MIME.
--
After sign & encrypt we removed the input as we converted
it into a mimestructure. But that would throw it away for
the second try. In case we call do_crypto again with
the force parameter.
GnuPG-Bug-Id: T6701
Andre Heinecke [Fri, 10 Nov 2023 17:08:49 +0000 (18:08 +0100)]
When S/MIME encryption is forced use offline mode
* src/cryptcontroller.cpp (CryptController::do_crypto):
Set a forced context to offline mode.
--
When force is used we don't need any online verification.
GnuPG-Bug-Id: T6701
Andre Heinecke [Mon, 6 Nov 2023 13:27:47 +0000 (14:27 +0100)]
Improve handling of S/MIME sign without cert
* src/cryptcontroller.cpp (CryptController::is_resolved): Check
that keycache is populated.
(CryptController::is_resolved): Only show message once and not
for each protocol.
(CryptController::is_resolved): Actually check for S/MIME key.
* src/keycache.cpp (KeyCache::isPopulated, KeyCache::setPopulated):
New.
GnuPG-Bug-Id: T6683
Andre Heinecke [Wed, 4 Oct 2023 14:38:37 +0000 (16:38 +0200)]
Fix encoding for no singning certificate warning
* src/cryptcontroller.cpp (is_resolved): Use utf8 for gpgol_bug.
Expect the Registry error message to be in local8 bit.
--
This also shows the message every time since it tells the user
to ask the administrator about it and then it does not really
help if the next time the user triggers the action the message
is no longer shown.
GnuPG-Bug-Id: T6683
Eva Bolten [Mon, 6 Nov 2023 10:17:59 +0000 (11:17 +0100)]
po: Add missing spaces in a German translation
Eva Bolten [Wed, 4 Oct 2023 12:49:07 +0000 (14:49 +0200)]
po: Minor correction in German po
Andre Heinecke [Thu, 28 Sep 2023 08:16:04 +0000 (10:16 +0200)]
Fix double release in error handling
* src/mail.cpp (fixup_last_attachment): Do not release attach
on error.
--
The attach object is released at the end of the function, this
would have resulted in a double release. There is no known
issue where this occurs since we don't really do content-ids
currently. But noticed this while looking for a different refcount
issue.
Eva Bolten [Thu, 21 Sep 2023 09:01:40 +0000 (11:01 +0200)]
po: Translate strings for new options
* po/de.po: Translation new options
Andre Heinecke [Wed, 20 Sep 2023 15:31:09 +0000 (17:31 +0200)]
Improve help strings for new options
* po/*: Auto update.
Andre Heinecke [Wed, 20 Sep 2023 14:56:42 +0000 (16:56 +0200)]
Fix release in case noSaveBeforeDecrypt is set
* Mail::decryptVerify_o (): Release the message regardless
of the save option if it is no longer needed.
Andre Heinecke [Wed, 20 Sep 2023 14:51:32 +0000 (16:51 +0200)]
Auto update po files
* po/*: Update.
Andre Heinecke [Wed, 20 Sep 2023 14:45:02 +0000 (16:45 +0200)]
Add new option noSaveBeforeDecrypt
* src/addin-options.cpp: Add new strings from config dialog.
* src/common_indep.h (opt): Add noSaveBeforeDecrypt.
* src/mail.cpp (Mail::decryptVerify_o): Do not save the mail
explicitly to MAPI / OOM when noSaveBeforeDecrypt is set.
* src/main.c (read_options): Read new option.
--
This option is by default off and only found under Debug for
potential workarounds. My concern here is that in some corporate
environements which do many modifications on their mail we might
run into some kind of loop that basically causes endless syncs
when a crypto mail is opened. For this reason I would like to
give support the option to disable that feature which we only
built in for a specific problem that we observed at one site.
GnuPG-Bug-Id: T6676
Andre Heinecke [Tue, 19 Sep 2023 16:10:25 +0000 (18:10 +0200)]
Improve handling of sign selected without certs
* src/common_indep.h (opt): Add smimeNoCertSigErr.
* src/cryptcontroller.cpp (CryptController::parse_output):
Handle if no signing is selected.
(CryptController::is_resolved): Show an error in the
case of a specific misconfiguration.
(CryptController::prepare_crypto): Actually handle to
send out an unencrypted / unsiged mail.
* src/cryptcontroller.h (prepare_crypto): Document new
return value.
* src/mail.cpp (do_crypt): Send an unsigned / unencrypted
mail in case only sign was selected and the user selected no
signing cert.
* src/main.c (read_options): Read the new value.
--
This brings both a better error handling in case signing was
selected but no signing certificate was found but it also
fixes the case that the user selected "Do not sign message"
in the key resolver when only sign was selected. This
means that we then send a completely unencrypted message.
For encryption we deliberately do not allow this to avoid the
misuse of "I can't encrypt, lets send unencrypted" but for signing
this should be ok.
This will help a lot in the default configuration of a specific
customer.
Regarding async encryption. I do not think that COM GpgOL will
ever see such a functionality again. So I do not care about it
anymore.
GnuPG-Bug-Id: T6683
Andre Heinecke [Tue, 19 Sep 2023 14:27:35 +0000 (16:27 +0200)]
Add support for S/MIME always trust
* src/cryptcontroller.cpp (prepare_crypto): Split preperation out of.
(do_crypto): Add force parameter improve error handling.
(start_crypto_overlay, stop_crypto_overlay): Make public.
* src/mail.cpp (do_crypt): Handle repeating a crypto operation with
force.
--
This allows users to individually override errors from GPGSM
by using the new --always-trust feature of GPGSM. While this
is not optimal this is often times preferrable over not
beeing able to encrypt a mail at all.
GnuPG-Bug-Id: T6701
Eva Bolten [Tue, 19 Sep 2023 12:47:17 +0000 (14:47 +0200)]
po: Minor spelling fixes for German translation
* po/de.po: spelling fixes
Andre Heinecke [Mon, 4 Sep 2023 14:01:47 +0000 (16:01 +0200)]
Spelling fixes for german translation
* po/de.po: Some spelling fixes.
|