tecnickcom / TCPDF

Official clone of PHP library to generate PDF documents and barcodes
https://tcpdf.org
Other
4.23k stars 1.52k forks source link

Warning: openssl_pkcs7_sign(): error getting private key #394

Open abelardolg opened 3 years ago

abelardolg commented 3 years ago

Hi there,

I am building a Symfony app. The TCPDFHelper.php is the responsible for generating the signed pdf. As you can see at the below screenshot, it is inside the same directory that "data", dir which includes my .p12 certificate: image

If I write this: $certificate = "file://data/tcpdf.crt'; the controller gives me this error: image

The spa.php language loads fine and the image too.

What's wrong, please? Best regards and thanks.

williamdes commented 3 years ago

Are you using a full path instead of a relative path ?