Bug 131733 - UI Select Certificate dialog shows extra info in “Issued to” column for RSA certs
Summary: UI Select Certificate dialog shows extra info in “Issued to” column for RSA c...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.4.0.3 release
Hardware: All All
: medium normal
Assignee: Gabor Kelemen (allotropia)
URL:
Whiteboard: target:7.0.0 target:6.4.4
Keywords: bibisected, bisected, difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks: Digital-Signatures
  Show dependency treegraph
 
Reported: 2020-03-31 09:07 UTC by NISZ LibreOffice Team
Modified: 2020-04-29 09:18 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the dialog in 5.3 and current master (120.66 KB, image/png)
2020-03-31 09:07 UTC, NISZ LibreOffice Team
Details
Example document signed with most of my cert zoo before and after the patch (246.24 KB, image/png)
2020-04-22 08:36 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-03-31 09:07:36 UTC
Created attachment 159177 [details]
Screenshot of the dialog in 5.3 and current master

The Select Certificate dialog shows a lot of information in the “Issued to” column, basically the whole Subject of the certificate, which is too long to be readable in the narrow column.
In 5.3 only the CN was displayed here, which seems to be a more reasonable choice.

Steps to reproduce:
    1. Open any document file
    2. File -> Digital Signatures –> Digital Signatures
    3. Press the Sign Document button


Actual results:
Select Certificate dialog appears with a lot of information in the Issued to column.

Expected results:
Only CN info appears in the Issued to column.

LibreOffice details:
Version: 7.0.0.0.alpha0+ (x64)
Build ID: bc898e2c2784e36ad4d4cdf6d962e39069d2c82d
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL

Bibisected using bibisect-win32-5.4 to:
URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=88ac77c0bc21accfd6f5c404217c3c2aaef2d674 
author	Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>	2017-02-02 17:33:30 +0100
committer	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2017-03-04 10:26:43 +0000
gpg4libre: List and view GPG keys

Adding CC to: Samuel Mehrbrodt
Comment 1 Xisco Faulí 2020-03-31 11:46:15 UTC
I don't think this is a regression, just a matter of personal taste.
Adding UX team to decide which info would be better to display
Comment 2 Heiko Tietze 2020-03-31 13:02:33 UTC
I agree with short information (CN and O) as the long version is available after selection. Any reason why this was changed, Samuel?
Comment 3 Samuel Mehrbrodt (allotropia) 2020-03-31 13:06:59 UTC
The change was for displaying OpenPGP keys, the side effect was unintended.

Whoever fixes this, please make sure that both OpenPGP keys and X.509 certs are displayed correctly.

This can be an easy hack. Check GetContentPart in xmlsecurity/source/dialogs/resourcemanager.cxx .
Comment 4 Gabor Kelemen (allotropia) 2020-04-22 08:36:25 UTC
Created attachment 159806 [details]
Example document signed with most of my cert zoo before and after the patch

Proposed patch: https://gerrit.libreoffice.org/c/core/+/92675
Comment 5 Commit Notification 2020-04-29 05:06:49 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bedba76adb9b1421a7d939cfef44b8194e987888

tdf#131733 Show only CN part of X.509 subject info

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2020-04-29 09:18:33 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/c6b6ac53e71661e1fd8ae2ee99df3eb3ea4bd517

tdf#131733 Show only CN part of X.509 subject info

It will be available in 6.4.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.