alphp/signature_facturae

Validation of sign policy

alphp opened this issue · 7 comments

alphp commented

Validation tool: http://sedeaplicaciones2.minetur.gob.es/FacturaE/index.jsp
The result:
image

The signature policy is generated, but I can not get it validated.

He añadido el signerRole:

$SignerRole = $dom->createElement('xades:SignerRole', '');
$SignedSignatureProperties->appendChild($SignerRole);

$SignerCalimedRoles = $dom->createElement('xades:ClaimedRoles', '');
$SignerRole->appendChild($SignerCalimedRoles);

$SignerCalimedRole = $dom->createElement('xades:ClaimedRole', 'emisor');
$SignerCalimedRoles->appendChild($SignerCalimedRole);

No solucionado el problema, pero es necesario de todas formas.

alphp commented

Añadido...

Hola @alphp

He tenido el mismo problema. Mira si te sirve de ayuda: https://packagist.org/packages/cossou/firmar-factura-e

saludos,
Hélder

alphp commented

Gracias, pero la idea es que el código de firma sea enteramente en PHP.
La clases de @robrichards xmlseclibs permiten generar un XML firmado, pero faltan incluir ciertos nodos para que la firma cumpla el formato FacturaE.
Personalmente no me gusta Java, o mejor dicho, no me gusta Java en entornos web. Y en mi opinión haber desarrollado todo el tema de FacturaE en Java un error enorme, pero eso es un debate que no voy a realizar aquí.

Saludos

alphp commented

He añadido un par de referencias obligatorias de la política de firmas, pero al hacerlo invalida la firma: d5044a7
image

Hi, I'm in the same situation today. I need to sign the KeyInfo Node which is in the generated Signature Node.

Did you find a solution finally?

Thk's

Hi, I'm in the same situation today. I need to sign the KeyInfo Node which is in the generated Signature Node.

Did you find a solution finally?

Thk's

This repo works great -> https://github.com/josemmo/Facturae-PHP