Bug 156344 - macOS: Settings > Security > Certificate Manager should preselect Applications folder when clicking Browse… button
Summary: macOS: Settings > Security > Certificate Manager should preselect Application...
Status: RESOLVED DUPLICATE of bug 159307
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Digital-Signatures OpenPGP
  Show dependency treegraph
 
Reported: 2023-07-18 08:19 UTC by steve
Modified: 2024-02-03 16:22 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description steve 2023-07-18 08:19:42 UTC
Description:
macOS: Settings > Security > Certificate Manager should preselect Applications folder when clicking Browse… button

Steps to Reproduce:
1. open Settings > Security
2. in Certificate Manager section click "Browse…" button

Actual Results:
/usr/bin is opened.

Expected Results:
/Applications should be opened. That is the location where Applications reside on macOS, so in order to select a Certificate Manager, that should be the default location to be opened by that dialog.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 07074836b0055a94c3ad9319e97e733b019c0519
CPU threads: 8; OS: Mac OS X 13.4.1; UI render: Skia/Raster; VCL: osx
Locale: en-US (en_DE.UTF-8); UI: en-US
Calc: threaded
Comment 1 Heiko Tietze 2023-07-21 13:09:25 UTC
Normal macOS apps might be installed into /Applications but gpg will be in /usr/bin. Or somewhere related with Brew. So I'm not so sure about this.
Comment 2 steve 2023-07-23 11:37:46 UTC
gpg is not a UI key manager nor an app, as in using app file suffix. Or am I missing something?
Comment 3 Alex Thurgood 2023-07-24 08:41:54 UTC

@steve: I agree, from the user's perspective, the certificate manager should be the GUI app that allows them to manage their certificates.

On macOS, the system default is Keychain.app, which is found at:

/System/Applications/Utilities/Keychain Access.app/Contents/MacOS/Keychain Access

Logically, this is what a user would expect to be referenced by default.

The blurb associated with the Certificate Manager entry displays the text: 
"Note that LibreOffice tries to locate installed ones automatically".
Comment 4 steve 2023-07-24 20:23:43 UTC
From the description it is not clear, which Certificate Manager the settings section is referring to.

Currently: Certificate Manager: Select custom certificate manager executable. Note that LibreOffice tries to locate installed ones automatically.

Guess this can be both macOS Keychain Access (S/MIME certs) or GPG Keychain (OpenPGP keys, when installed). This is a bit involved to solve in a better way. Or is it intentionally to just allow one certificate manager even though at least on macOS S/MIME certs and OpenPGP keys are handled in different apps?
Comment 5 Heiko Tietze 2023-07-25 07:34:28 UTC
We can not handle S/MIME certificates only PGP.
Comment 6 steve 2023-07-26 12:26:00 UTC
Awesome, why not mention OpenPGP in the description then?
Comment 7 steve 2023-07-26 12:30:23 UTC
Sorry, no edit function here. Certificate manager is a bit misleading in that regard as it seems, people often refer to S/MIME certificates and OpenPGP keys.

Certificate Manager is a bit misleading maybe. Would "OpenPGP Key Manager" work? 

Where is the key mananger triggered in LibreOffice? So with GPG Suite not installed on macOS, that triggering would open Terminal and do what?

I still don't understand the functionality and when the key manager defined in this setting comes to use.
Comment 8 Heiko Tietze 2023-07-26 14:16:07 UTC
(In reply to steve from comment #7)
> Would "OpenPGP Key Manager" work? 
Sounds good to me.

> I still don't understand the functionality and when the key manager defined
> in this setting comes to use.
Please check the documentation and create tickets if you don't find the answers. But TokhySan submitted a couple of patches around this topic and it makes sense to wait a bit longer.
Comment 9 Alex Thurgood 2023-07-26 14:21:19 UTC
It wouldn't do anything useful, and mayhap it would even crash the office. To be fair I haven't tried this possibility yet, but you've given me an idea to do so, as I happen to have keytool (a Java-based cert manager) in /usr/bin on my macOS installation, which LO doesn't autodetect.
Comment 10 Alex Thurgood 2023-07-26 14:28:34 UTC
(In reply to Alex Thurgood from comment #9)
> It wouldn't do anything useful, and mayhap it would even crash the office.
> To be fair I haven't tried this possibility yet, but you've given me an idea
> to do so, as I happen to have keytool (a Java-based cert manager) in
> /usr/bin on my macOS installation, which LO doesn't autodetect.

Ah, I forgot to add that LO doesn't normally have access to /usr/bin on macOS as it is a protected folder, and would require special permissions to do so.
Comment 11 Alex Thurgood 2023-07-26 14:42:27 UTC
Testing with my eiDAS compliant signature provided through

/Applications/Trusted Key Manager.app/Contents/MacOS/Trusted Key Manager

shows that it doesn't yet recognize or start the binary for managing the certificates provided through that tool.
Comment 12 Patrick Luby (volunteer) 2024-02-02 17:49:50 UTC
(In reply to Alex Thurgood from comment #11)
> Testing with my eiDAS compliant signature provided through
> 
> /Applications/Trusted Key Manager.app/Contents/MacOS/Trusted Key Manager
> 
> shows that it doesn't yet recognize or start the binary for managing the
> certificates provided through that tool.

After the fix for tdf#159307, I can set the Certificate Manager in the Options dialog to each of the following and all launch successfully when the Start Certificate Managere button is presssed in the Digital Signatures dialog:

/Applications/GPG Keychain.app
/Applications/GPG Keychain.app/
/Applications/GPG Keychain.app/Contents/MacOS/GPG Keychain

So I think we can close this as a duplicate of tdf#159307? Feel free to reopen if there are still problems.

*** This bug has been marked as a duplicate of bug 159307 ***
Comment 13 steve 2024-02-03 12:24:05 UTC
I confirm this was set automatically after I removed the path from Settings > Security when pressing `Start Certificate Manager`.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3d5c0a94539d2196c7d0dd9f52660ba9e58d31b8
CPU threads: 8; OS: macOS 13.6.4; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_DE.UTF-8); UI: en-US
Calc: threaded

Fine with this being closed as duplicate.

Thanks so much for making OpenPGP in LO slightly functional on macOS ❤️
Comment 14 Sierk Bornemann 2024-02-03 12:45:06 UTC
(In reply to steve from comment #13)
> I confirm this was set automatically after I removed the path from Settings
> > Security when pressing `Start Certificate Manager`.

Yes. I confirm that, too. But, just tested: why isn't /Applications/GPG Keychain.app or at least the /Applications directory not presented in the first place automatically or in the file chooser, when removing the path in Settings > Security > Certificate Manager, why does the file chooser point to /usr/bin per default instead to /Applications/GPG Keychain.app or at least /Applications?
Why does it function and the search is successful via `Start Certificate Manager` but not there in Settings > Security Certificate Manager in the first place? With the recent nightly build I still get presented /usr/bin per default, when the path is empty, this only changes, when GPG Keychain.app has previously been selected in the way you described via the `Start Certificate Manager` route.

Version: 24.8.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: 3d5c0a94539d2196c7d0dd9f52660ba9e58d31b8
CPU threads: 10; OS: macOS 14.3; UI render: Skia/Metal; VCL: osx
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded


> Thanks so much for making OpenPGP in LO slightly functional on macOS ❤️

Yes. Thanks a lot also from me.