Bug 113278 - Error when digitally signing PDF files with OpenPGP ang GPG keys
Summary: Error when digitally signing PDF files with OpenPGP ang GPG keys
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.2.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0 target:7.0.0.1 target:25...
Keywords:
: 129030 137436 (view as bug list)
Depends on: 115538
Blocks: Digital-Signatures
  Show dependency treegraph
 
Reported: 2017-10-19 20:26 UTC by Darío Norberto Ruiz
Modified: 2024-08-08 23:00 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments
Este es el archivo firmado. (9.23 MB, application/vnd.oasis.opendocument.text)
2017-10-19 20:26 UTC, Darío Norberto Ruiz
Details
Plantilla del documento (12.49 KB, application/vnd.oasis.opendocument.text-template)
2017-11-08 00:59 UTC, Darío Norberto Ruiz
Details
2021-01-29 LO7.1.0.2 signing UI, but no OpenPGP keys shown (315.28 KB, image/png)
2021-01-29 11:06 UTC, steve
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Darío Norberto Ruiz 2017-10-19 20:26:14 UTC
Created attachment 137128 [details]
Este es el archivo firmado.

I have previously created a document template.

Based on that template, I created a new document that I digitally signed with a PGP signature.

I have updated the document template with which I created the signed document.

When I try to open the document I have digitally signed again, the program asks me if I want to update the document with the modified template data. But the program closes when you try to update the data.

Another error occurs when I want to create a digitally signed PDF file with a PGP certificate. When I try to do it the program gives me an error.
Comment 1 Dieter 2017-10-20 15:57:53 UTC
Thank you for reporting the bug. As far as I can see, you describe two different bugs, although both are related to digital signature. I think you should write a different bug report for each bug.
Comment 2 Thorsten Behrens (allotropia) 2017-11-07 16:20:58 UTC
since this is already depending on the digsig meta bug, let's take the pdf signature part of it. That's an enhancement request.
Comment 3 Thorsten Behrens (allotropia) 2017-11-07 16:23:20 UTC
(In reply to Darío Norberto Ruiz from comment #0)
> Based on that template, I created a new document that I digitally signed
> with a PGP signature.
> 
That works - loading your example file, I get the expected result (signature valid, but key not trusted yet).

> When I try to open the document I have digitally signed again, the program
> asks me if I want to update the document with the modified template data.
> But the program closes when you try to update the data.
> 
As Dieter pointed out, please file a different bug, with a few more steps how to reproduce (perhaps also attaching your template). As it stands, I don't see the problem.
Comment 4 Darío Norberto Ruiz 2017-11-08 00:59:23 UTC Comment hidden (no-value)
Comment 5 Marco A.G.Pinto 2017-12-27 09:33:36 UTC Comment hidden (no-value)
Comment 6 Timur 2020-05-22 05:27:07 UTC
*** Bug 129030 has been marked as a duplicate of this bug. ***
Comment 7 Commit Notification 2020-06-05 08:58:55 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/57464ef8b985a47ce0b9682722f01c8913785f74

Related: tdf#113278 PDF export: improve selection of signing certificate

It will be available in 7.1.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 8 Commit Notification 2020-06-08 14:47:42 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/746590257b4404682cf5a9fc85b1b9e34f1f1462

Related: tdf#113278 PDF export: improve selection of signing certificate

It will be available in 7.0.0.1.

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 9 Timur 2020-10-29 13:55:40 UTC
*** Bug 137436 has been marked as a duplicate of this bug. ***
Comment 10 steve 2021-01-29 11:05:20 UTC
What is the status here? There is a commit but as there are no clear steps to reproduce not sure what to test.

Reproduce steps:

1. open LO writer
2. type "test" and export PDF via File > Export as > Export as PDF
3. open Digital Signatures tab

Currently
No keys shown despite having OpenPGP keys on my system.

Expected
Show secret keys to sign PDF about to be exported.

Probably what I am seeing is https://bugs.documentfoundation.org/show_bug.cgi?id=115538 so someone else will have to retest this.
Comment 11 steve 2021-01-29 11:06:07 UTC
Created attachment 169263 [details]
2021-01-29 LO7.1.0.2 signing UI, but no OpenPGP keys shown
Comment 12 Thorsten Behrens (allotropia) 2021-01-29 14:12:16 UTC
The commit didn't add this feature, but makes it more clear that OpenPGP keys currently cannot be used to sign PDFs (by showing an empty list, unless you've got X509 certs avaialble, too).
Comment 13 steve 2021-01-30 00:29:46 UTC
Thanks for elaborating, Thorsten and sorry, that this wasn't obvious to me and was mislead by the whiteboard targets.

https://bugs.documentfoundation.org//show_bug.cgi?id=115884 closed today adds a text hint to prevent user confusion.
Comment 14 Stéphane Guillou (stragu) 2023-04-28 11:02:33 UTC
Marking as resolved - fixed by Miklos' work because the keys are now hidden if not usable, and (as I understand it) PDFs can't be signed with PGP/GPG currently. We only support signing with X.509.
Comment 15 Stéphane Guillou (stragu) 2023-04-28 18:25:33 UTC
Setting back to New since there were concerns in the QA channel that there is still a possibility of implementing PGP signing embedded in PDFs.

My understanding was that it is not currently supported by the format, and therefore such an enhancement would be closed as "won't fix".

But maybe developers have a different perspective and can see this being done in the future.
Comment 16 Commit Notification 2024-08-08 23:00:10 UTC
Moritz Duge committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4923331a2bc0c7d31cdb0af18b62f92e8433a071

tdf#113278 tdf#115884 tdf#161909: Add X.509 in static labels for PDF signing.

It will be available in 25.2.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.