Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: openssl_sign(): supplied key param cannot be coerced into a private key #2

Closed
vinoles opened this issue Jul 4, 2018 · 2 comments
Labels

Comments

@vinoles
Copy link

vinoles commented Jul 4, 2018

Hola amigo estoy tratando de usar tu librería cifrando con un archivo de extension .p12

$fileXmlName = "/path/file/factura.xml";
$docXmlExport = $rootNode->asXML($fileXmlName);
$docXml = $rootNode->asXML();

    $certPath ="/path/file/key_example.p12"; 

    $signer = new SignedXml();
    $signer->setCertificateFromFile($certPath);

    $xmlSigned = $signer->signFromFile($fileXmlName);
    echo $xmlSigned;

al final me sale esta notificacion :
Warning: openssl_sign(): supplied key param cannot be coerced into a private key

Pdrias ayudarme o indicarme que estoy haciendo mal??

saludos

@giansalex
Copy link
Member

En la guia indica que se requiere un archivo .pem , que contenta tanto la clave publica y privada

@vinoles
Copy link
Author

vinoles commented Jul 4, 2018

Ok amigo muchas gracias ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants