Bug 142279 - DIGITAL SIGNATURE: Can't start certificate manager in Linux
Summary: DIGITAL SIGNATURE: Can't start certificate manager in Linux
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.2
Keywords:
: 142621 (view as bug list)
Depends on:
Blocks: Digital-Signatures
  Show dependency treegraph
 
Reported: 2021-05-14 12:16 UTC by Osman Kemal Kadiroglu
Modified: 2023-08-28 22:20 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Result of try to digitally sign and introduce key to LO (370.06 KB, image/png)
2021-05-14 12:16 UTC, Osman Kemal Kadiroglu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Osman Kemal Kadiroglu 2021-05-14 12:16:28 UTC
Created attachment 171995 [details]
Result of try to digitally sign and introduce key to LO

I am using Ubuntu20.04LTS and obtained a key with Seahorse. Try to digitally sign a document by using File>Digital Signatures>Digital Signatures and get empty Digital Signatures window. When I click the Start Certificate Manager button I get a window stating that "Could net find any certificate manager" I tried few forums and been advised to report a bug.
Comment 1 Dieter 2021-05-30 04:30:19 UTC
Maybe duplicate of bug 133941, but I'm not familiar with digital signature and help has no content for "Start Certificate Manager" button: https://help.libreoffice.org/7.2/en-GB/text/shared/01/digitalsignatures.html?System=WIN&DbPAR=WRITER&HID=xmlsec/ui/digitalsignaturesdialog/dialog-action_area1#bm_@@nowidget@@
Comment 2 Dieter 2021-05-30 04:39:21 UTC
(In reply to Dieter from comment #1)
> and help has no content for "Start Certificate Manager" button:

Report in bug 142562.
Comment 3 Timur 2021-05-30 07:05:07 UTC Comment hidden (obsolete)
Comment 4 Timur 2021-05-30 07:35:56 UTC
Bug 133941 is Windows for Start Certifcate Manager. 
This one can be Linux per https://bugs.documentfoundation.org/show_bug.cgi?id=125636#c19 So I set New. 
 Bug 125636 is Documentation, with explanation. Until that one is resolved, I wouldn't keep a separate bug 142562.
Bug 133851 is for Help for Certificate Path-Certificate.. dialog.
Comment 5 Timur 2021-06-03 09:02:36 UTC
*** Bug 142621 has been marked as a duplicate of this bug. ***
Comment 6 Timur 2021-06-03 09:05:07 UTC
Bug 142621 has an info that digital signatures work with appimage, using Seahorse as a certificate manager. That's Ubuntu 20.04.2 64-bit and Mate 1.24.0.
Comment 7 Stéphane Guillou (stragu) 2022-11-09 11:55:38 UTC
I am on a similar system, 64 bit architecture, Ubuntu 20.04, Seahorse 3.36 but I can't reproduce with the following versions:

Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b57307e8f3553fcb292c9c11fcf58bcef3a6cb3c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 7.1.8.1 / LibreOffice Community
Build ID: e1f30c802c3269a1d052614453f260e49458c82c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 7.0.6.2
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Seahorse (aka "Passwords and Keys") opens normally.

How did you install LibreOffice, Osman? I installed from .deb files. Could you please copy and paste here the information in Help > LibreOffice, and re-test with a recent version that we currently support ? (7.3 or 7.4)

Cheers!
Comment 8 QA Administrators 2023-05-09 03:16:46 UTC Comment hidden (obsolete)
Comment 9 Stéphane Guillou (stragu) 2023-05-11 12:52:58 UTC
This might have to do with how Seahorse was installed (although I am aware it should be there by default on Ubuntu 20.04).
For example, I installed Kleopatra as a flatpak. Clicking "Start Certificate Manager" in LO would still open Seahorse. However, after installing Kleopatra from the official repositories, LO would use Kleopatra as a default.

There should be more control available to determine which tool is preferred if several are installed, and to point to the executable (e.g. for flatpak users who will find the executable in /var/lib/flatpak/exports/bin/...)

Setting back to New before it is closed for insufficient data.
Comment 10 Stéphane Guillou (stragu) 2023-05-11 12:54:48 UTC Comment hidden (obsolete)
Comment 11 László Meskó 2023-05-16 09:27:12 UTC
I think there is a problem about the UI and also in the help:
The Start certificate manager button is mostly useful on Windows.
On Linux, LO only use the certificate store from Firefox or Thunderbird, as it is described in (an old) OpenOffice documentation: https://wiki.openoffice.org/wiki/How_to_use_digital_Signatures . 
LO doesn't use the system default certificate manager on Linux!

Workaround:
You can select the certificate store from menu:
Tools, Options and (in the left) LibreOffice\Security.
There is „Certificate path” section (this is Linux (and maybe Mac?) only!), where (using the Certificate button) you can select between the Firefox and Thunderbird certificate store(s). There can be more certificate store if more Thunderbird/Firefox profile folders exists.
Then you should import your certificates into the selected cert store.

I think in LibreOffice on Linux (and Mac?), needs two improvements:
(1) the help should describe this situation on non-windows platform, and
(2) the Start Certificate Manager button should open the currently selected certificate store (and not the system default). Or at least warn the user that the certificate store is defined in Tools, Options, LibreOffice\Security, Certificate Path, and nothing to do with the default certificate manager. (The current UI is very confusing right now.)

Or an alternative is to modify LO to use the system default certificate manager.
But maybe it is more challenging because of the different Linux systems.
Comment 12 Heiko Tietze 2023-06-12 10:17:09 UTC
MacOS shows a message box with "Could not find any certificate manager.". Linux doesn't but starts Kleopatra if this tool is installed. I suggest to disabled the button, ie. check on initialization if any of the hard-coded tools is available, and show/amend the tooltip with the information why.

Ideally we also make the list variable. For now it checks for kleopatra.exe, launch-gpa.exe, and gpa.exe on Windows and kleopatra, seahorse, gpa, kgpg otherwise. 

According the online help "On macOS, the default certificate manager is Keychain Access." but apparently it is ignored (and none of the keys is listed). Likely an extra topic.

See xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx at CertMgrButtonHdl
Comment 13 TokieSan 2023-08-24 10:58:23 UTC
This bug has been solved in recent patches where it tries detecting an installed certificate manager in Linux, if not, you can set its location manually in the options. See https://gerrit.libreoffice.org/c/core/+/153798
Comment 14 Stéphane Guillou (stragu) 2023-08-28 22:20:57 UTC
Thanks TokieSan!

I see the new option, so marking as verified for:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e7496f41562b75ea9732ca48f9aa0c07b69e424f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded