dealfonso / sapp

Simple and Agnostic PDF Document Parser in PHP - sign PDF docs using PHP
GNU Lesser General Public License v3.0
110 stars 29 forks source link

Fix private key bug on windows #49

Closed erikn69 closed 1 year ago

erikn69 commented 1 year ago

Closes #48 @dealfonso seems like a bug on windows, i test this with xampp and Windows 10 64b We can do

$publicKeyFile = file_get_contents('cert.key');
$keyFile = file_get_contents('private.key');
$keyPassphrase = "password1234";
$keyData =[$keyFile, $keyPassphrase];

// sign 
openssl_pkcs7_sign(
    $file_msg,
    $file_sign,
    $publicKeyFile,
    $keyData, /// [private key, password]
    array(),
    PKCS7_BINARY
);
parallels999 commented 1 year ago

Great, it works

dealfonso commented 1 year ago

thank you for reviewing it

parallels999 commented 1 year ago

@dealfonso hi, please make a new release for this, thanks