Question:
Date: 09-06-2020 19:27:29
(In Spanish)
¿Cómo obtener el <DigestValue>?[Unresolved]
Como se obtiene el <DigestValue> ? . En el ejemplo siguiente esta la firma de un XML .$txtcertificado = file_get_contents($url_ubicacion_certificado); //leer archivo pfx // nota este valor es ilegible openssl_pkcs12_read($txtcertificado, $certificado, $clave_certificado) //sacar información del pfx $datos_certificado = openssl_x509_parse($certificado);//obtengo datos del certificado $txt_a_firmar = '<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#"><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod><Reference URI="#'.$dte_iden.'"><Transforms><Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></Transform>'.'</Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod><DigestValue>'.$dte_dg.'</DigestValue></Reference></SignedInfo>'; openssl_sign(txt_a_firmar, $firma, $datos_certificado ["pkey"], OPENSSL_ALGO_SHA1);Votes: 0 - Answers: 1 - Views: 11 Share on: Google Facebook Twitter LinkedIn Link
Answers:
-
Date: 31-08-2020 05:55:21 Hola Luis te paso este link espero que te ayude. ¿Cómo generar el SignatureValue y DigestValue que solicita SUNAT Perú para Factura Electrónica?
Saludos Votes: 1 - Link answer
To actively participate in the community first must authenticate, enter the system.Sign In