Bug 449785

Summary: Cannot open certificate encrypted pdf files
Product: [Applications] okular Reporter: medin <med.medin.2014>
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: CONFIRMED ---    
Severity: wishlist CC: aacid
Priority: NOR    
Version: 21.12.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: files
files

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.