Bug 449785 - Cannot open certificate encrypted pdf files
Summary: Cannot open certificate encrypted pdf files
Status: CONFIRMED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 21.12.2
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-08 14:13 UTC by medin
Modified: 2022-02-22 23:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
files (50.22 KB, application/x-xz)
2022-02-21 16:37 UTC, medin
Details
files (26.29 KB, application/x-xz)
2022-02-21 16:46 UTC, medin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description medin 2022-02-08 14:13:07 UTC
Even if I put my .p12 file in "~/.pki/nssdb/" or imported it to Firefox certificates list, Okular fails to unlock my encrypted pdf file (encrypted using certificate) and keeps asking for password infinitely which even if I enter my keystore password it keeps demanding password to be typed, while in Master PDF editor I imported my .p12 file and the app asks me for keystore password which I enter then the file is successfully opened, why Okular fails to unlock my file ? It seems only encryption is implemented and decryption is not yet done and the reader can't recognize .p12 files.
Comment 1 Albert Astals Cid 2022-02-11 23:34:55 UTC
The certificates there are only used to sign files, there's no encryption or decryption at all.

You wouldn't know a way to create such pdf files with certificate encryption, would you?
Comment 2 medin 2022-02-21 15:54:13 UTC
(In reply to Albert Astals Cid from comment #1)
> You wouldn't know a way to create such pdf files with certificate
> encryption, would you?

To create certificate encrypted PDF files you need the following tools:
- LibreOffice Writer  
- OpenJDK  https://jdk.java.net/17/
- KeyStore Explorer  https://keystore-explorer.org/
- JSignPDF  http://jsignpdf.sourceforge.net/

To verify:
- Trial version of Master PDF Editor  https://code-industry.net/masterpdfeditor/
- Okular

See following attached video for more info  https://vimeo.com/680058952
Comment 3 medin 2022-02-21 16:37:52 UTC
Created attachment 147006 [details]
files
Comment 4 medin 2022-02-21 16:46:30 UTC
Created attachment 147008 [details]
files
Comment 5 Albert Astals Cid 2022-02-22 23:37:55 UTC
This is actually a poppler https://poppler.freedesktop.org/ issue more than a Okular one, Okular doesn't "do anything" with PDF files, poppler is the one doing all the heaving lifting.