You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Intermittent false Certificate Password Invalid. for legacy PKCS#12 certificates #66
We are still experiencing an intermittent Certificate Password Invalid issue in v3.0.0. We also observed it in earlier releases.
We suspect an OpenSSL error-queue handling issue.
We are seeing intermittent Certificate Password Invalid exceptions while signing PDFs with valid PKCS#12 certificate passwords.
The same password, left unchanged in the same browser field, could fail several times and then sign successfully.
Failures returned almost immediately, while successful signing took a few seconds.
Our logging showed that failed and successful attempts used identical inputs:
same certificate byte length
same certificate SHA-256
same PDF byte length and SHA-256 for the same document version
same password length
Workaround applied which works for us:
clear the OpenSSL error queue immediately before calling JSignPDF::sign()
private function clearOpenSslErrors(): array
{
$errors = [];
By the way, if you're also looking at a native PHP signing path without JSignPdf/Java, we're working on SignerPHP. It's already being integrated into LibreSign, but it's a separate project and still evolving.
Thanks for looking into this and for the fix!
The workaround is working for us for now, so I’ll test v3.2.1 internally as soon as I get some time and will report back with the results.
Activity
vitormattos commentedon Sep 23, 2026
Thanks for your help reporting this.
I was able to reproduce the issue with a regression test using a legacy PKCS#12 certificate and different pre-existing OpenSSL errors.
The tests failed with the previous implementation with
Certificate Password Invalid.and pass with the fix applied.This was fixed in #67 and released in v3.2.1.
Thanks for identifying the OpenSSL error queue as the likely cause.
Could you test again with the newest release?
vitormattos commentedon Sep 23, 2026
By the way, if you're also looking at a native PHP signing path without JSignPdf/Java, we're working on SignerPHP. It's already being integrated into LibreSign, but it's a separate project and still evolving.
vkywalker commentedon Sep 24, 2026
Thanks for looking into this and for the fix!
The workaround is working for us for now, so I’ll test v3.2.1 internally as soon as I get some time and will report back with the results.