Bug 167141 - LibreOffice Digital Signatures | Test Case Subjects: Writer, Draw
Summary: LibreOffice Digital Signatures | Test Case Subjects: Writer, Draw
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
25.2.4.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-21 01:21 UTC by DACBARBOS Brand
Modified: 2025-07-16 01:16 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
LibreOffice_Digital_Signatures_Test.odt (56.64 KB, application/vnd.oasis.opendocument.text)
2025-06-21 01:26 UTC, DACBARBOS Brand
Details
LibreOffice_Digital_Signatures_Test.pdf (122.41 KB, application/pdf)
2025-06-21 01:30 UTC, DACBARBOS Brand
Details
LibreOffice_Digital_Signatures_Test.signed.PAdES.baseline-b.ETSI.CAdES.detached.pdf (149.09 KB, application/pdf)
2025-06-21 01:39 UTC, DACBARBOS Brand
Details
Report_from_signatures-conformance-checker.etsi.org.zip (163.65 KB, application/zip)
2025-06-21 01:43 UTC, DACBARBOS Brand
Details
Adobe_PDF_Visual_Signature_Personalization.pdf (157.96 KB, application/pdf)
2025-06-21 22:35 UTC, DACBARBOS Brand
Details
Visible_Digital_Signature_Personalization.odg (36.43 KB, application/vnd.oasis.opendocument.graphics)
2025-06-23 00:48 UTC, DACBARBOS Brand
Details
LibreOffice_Digital_Signatures_Test.ods (30.96 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-06-23 00:53 UTC, DACBARBOS Brand
Details
Libre_Office_Digital_Signatures_Test.odp (42.58 KB, application/vnd.oasis.opendocument.presentation)
2025-06-23 01:18 UTC, DACBARBOS Brand
Details
Printer_Test_Page_DS_old_SA_crt.pdf (188.72 KB, application/pdf)
2025-07-16 01:13 UTC, DACBARBOS Brand
Details
Printer_Test_Page_DS_new_SA_crt.pdf (188.72 KB, application/pdf)
2025-07-16 01:16 UTC, DACBARBOS Brand
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DACBARBOS Brand 2025-06-21 01:21:02 UTC
Description:
I made a simple test case against Writer and Draw. A user would typically create a Writer document and export it as PDF before sharing either the latter or both with a third party. The real challenge is digitally signing both of them. While the task went smoothly with Writer, Draw was plain dumb. I understand that PAdES is quite complex, but I expect that at least the minimal BASELINE-B level (even without a visible signature) to be working flawlessly. In order to rule out a potential problem with my signing certificate and/or algorithm, I used a free online service (pkitools.net) to sign my PDF. To ensure that pkitools.net signature is valid, I used ETSI's signatures conformance checker.

Steps to Reproduce:
1. Open Writer app, edit a sample document and save it.
2. Sign the saved odt document (File→Digital Signatures→Digital Signatures...)
3. File→Export as→Export as PDF...
4. File→Digital Signatures→Sign Existing PDF...

Actual Results:
The whole process is straight forward (simple and intuitive). Draw will open up the PDF file in
read-only mode, awaiting user’s action. Upon selecting the certificate as usual then pressing the
Sign button (within the Select Certificate dialog), nothing happens: no warnings or errors. Nada!

Expected Results:
The PDF is digitally signed.


Reproducible: Always


User Profile Reset: No

Additional Info:
I didn't spell checked my document, so please ignore any typos or grammar errors.
Comment 1 DACBARBOS Brand 2025-06-21 01:26:03 UTC
Created attachment 201387 [details]
LibreOffice_Digital_Signatures_Test.odt

This is the original document that I signed in Writer w/o any problem.
Comment 2 DACBARBOS Brand 2025-06-21 01:30:20 UTC
Created attachment 201388 [details]
LibreOffice_Digital_Signatures_Test.pdf

This is the exported PDF version of the original document.
This is also the PDF that Draw couldn't sign or didn't know how to.
Comment 3 DACBARBOS Brand 2025-06-21 01:39:25 UTC
Created attachment 201389 [details]
LibreOffice_Digital_Signatures_Test.signed.PAdES.baseline-b.ETSI.CAdES.detached.pdf

This is the digitally signed version of the very same PDF. As already explained, I used the free online service pkitools.net. Obviously, given the complexities of PAdES, there are issues with that implementation as well. The visible signature option (checkbox tick) would not work and return a server error. Due to my self-imposed validation requirements, I chose the ETSI way.
Comment 4 DACBARBOS Brand 2025-06-21 01:43:23 UTC
Created attachment 201390 [details]
Report_from_signatures-conformance-checker.etsi.org.zip

This is the ETSI validation result (ran against the previously signed PDF).
Comment 5 DACBARBOS Brand 2025-06-21 22:35:39 UTC
Created attachment 201406 [details]
Adobe_PDF_Visual_Signature_Personalization.pdf

This PDF's content shall be treated as a related RFE. It would be nice to catch up on Adobe's lead and offer advanced features in LO as well.
Comment 6 DACBARBOS Brand 2025-06-23 00:48:58 UTC
Created attachment 201419 [details]
Visible_Digital_Signature_Personalization.odg

As already suspected, there is no trouble at all with LO's native formats.
This odg sample was signed in Draw w/o any problem.
Comment 7 DACBARBOS Brand 2025-06-23 00:53:00 UTC
Created attachment 201420 [details]
LibreOffice_Digital_Signatures_Test.ods

This ods sample was signed in Calc w/o any problem.
Comment 8 DACBARBOS Brand 2025-06-23 01:18:56 UTC
Created attachment 201421 [details]
Libre_Office_Digital_Signatures_Test.odp

This odp sample was signed in Impress w/o any problem.
Comment 9 DACBARBOS Brand 2025-06-23 13:27:20 UTC
One last thought: it would be nice/beneficial if LO would implement an automatic DS conversion for alredy signed native documents (preSigned) that would translate from CAdES/XAdES to PAdES during PDF export action/process. That way, the resulting PDF will inherit DS from its source/parent document.
Comment 10 DACBARBOS Brand 2025-07-16 01:05:07 UTC
Yesterday, I had another look at the problem and I searched for a better workaround than using various online services. During this second pass, I spent a little bit of time trying to understand the PAdES levels (profiles). It's quite obvious that LT/LTA introduce additional complexities, thus I decided to focus on the basic profile. During my trial and error, I also generated a new SA certificate for signing, hoping to be more "validation friendly". It wasn't, but at least I was happy with my newly discovered solution/workaround. It's an OSS project called "openpdfsign". The official website is https://www.openpdfsign.org. With this tool, I could easily place a "visible digital signature" onto a new PDF sample. And the best of it, all from the comfort of my terminal. In the next update, I will attach both: the PDF sample signed with the old/original SA cert and the one signed with the new SA cert. Of course, at first sight, they look similar, yet they are not.
Comment 11 DACBARBOS Brand 2025-07-16 01:13:18 UTC
Created attachment 201815 [details]
Printer_Test_Page_DS_old_SA_crt.pdf

Visible PDF digital signature (with the old SA certificate).
Comment 12 DACBARBOS Brand 2025-07-16 01:16:41 UTC
Created attachment 201816 [details]
Printer_Test_Page_DS_new_SA_crt.pdf

Visible PDF digital signature (with the new SA certificate).