Bienvenido a Facturas y Respuestas.

Esperamos que encuentre la respuesta a su pregunta. Y si no, puede formularla para que los expertos de la comunidad la respondan.

Preguntar

Este blog es creado y administrado por:

Copyright - 2020

0 votos
por en Nòmina Electrònica

Buenas al realizar la nómina electrónica recibo este mensaje de parte de la DIAN.

Regla: ZE02, Rechazo: Valor de la firma inválido.

Lo estoy haciendo en php y solo tengo estos cambios con respecto a factura electrónica (que funciona correctamente)

public function get_schemas($doctype){
 
        // obtener como una string los schemas heredados por la etiqueta KeyInfo al momento que el sistema haciendo la validacion del documento (DIAN) canonize el elemento para verificar que el digest sea correcto
 
        // los schemas heredados por SignedInfo y SignedProperties son los mismos
       
        $string = '';
        if ($doctype == 'fv') {
            $string .= 'xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" ';
        }else{
            if ($doctype == 'nc') {
                $string .= 'xmlns="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2" ';
            }
            if ($doctype == 'nd') {
                $string .= 'xmlns="urn:oasis:names:specification:ubl:schema:xsd:DebitNote-2" ';
            }
            // if ($doctype == 'nei') {
            //     $string .= 'xmlns="dian:gov:co:facturaelectronica:NominaIndividual" ';
            // }
        }
       
        if ($doctype == 'nei') {
            $string .= 'xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" xmlns:xades141="http://uri.etsi.org/01903/v1.4.1#" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance xmlns="dian:gov:co:facturaelectronica:NominaIndividual"';
        }else{
            $string .= 'xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:sts="http://www.dian.gov.co/contratos/facturaelectronica/v1/Structures" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" xmlns:xades141="http://uri.etsi.org/01903/v1.4.1#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"';
        }
 
        return $string;
    }

por
Hola.

Mi solución está desarrollada en Java y obtengo el mismo rechazo, por favor avísanos si puedes avanzar

Gracias.
por
El nodo de la firma debe quedar así:

<ds:Signature Id="xmlsig-48d2ed72-aefe-468c-8a5b-fd92f10977be">
    <ds:SignedInfo>
        <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
        <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
        <ds:Reference Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-ref0"
                        URI="">
            <ds:Transforms>
                <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
            </ds:Transforms>
            <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
            <ds:DigestValue>xwx9izxuG3jjhT8KdmNyMfWdFd3nZlk1As9wBEl6/Qw=</ds:DigestValue>
        </ds:Reference>
        <ds:Reference Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-ref1"
                        URI="#xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-KeyInfo">
            <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
            <ds:DigestValue>B47SzmKutq16h7wT3f56E/KbsIks88e/b1gkLY6KXEs=</ds:DigestValue>
        </ds:Reference>
        <ds:Reference URI="#xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-signedprops"
                        Type="http://uri.etsi.org/01903#SignedProperties">
            <ds:Transforms>
                <ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
            </ds:Transforms>
            <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
            <ds:DigestValue>0lIDid9H9d87+Gqkdx2U3scva3WATTqXy5Dckb6rKNM=</ds:DigestValue>
        </ds:Reference>
    </ds:SignedInfo>
    <ds:SignatureValue>SIGNATURE_VALUE</ds:SignatureValue>
    <ds:KeyInfo Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-KeyInfo">
        <ds:X509Data>
            <ds:X509Certificate>CERTIFICATE_DATA</ds:X509Certificate>
        </ds:X509Data>
        <ds:KeyValue>
            <ds:RSAKeyValue>
                <ds:Modulus>MODULUS</ds:Modulus>
                <ds:Exponent>AQAB</ds:Exponent>
            </ds:RSAKeyValue>
        </ds:KeyValue>
    </ds:KeyInfo>
    <ds:Object>
        <xades:QualifyingProperties Target="#xmlsig-48d2ed72-aefe-468c-8a5b-fd92f10977be"
                                    Id="XadesObjects">
            <xades:SignedProperties Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-signedprops">
                <xades:SignedSignatureProperties>
                    <xades:SigningTime>2021-10-19T08:20:06.453041</xades:SigningTime>
                    <xades:SigningCertificate>
                        <xades:Cert>
                            <xades:CertDigest>
                                <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                                <ds:DigestValue>7qDCkER775DFN6S+bvWvvQKdL/CiZr12xI/b6b0Yjas=</ds:DigestValue>
                            </xades:CertDigest>
                            <xades:IssuerSerial>
                                <ds:X509IssuerName>ISSUER_NAME</ds:X509IssuerName>
                                <ds:X509SerialNumber>SERIAL_NUMBER</ds:X509SerialNumber>
                            </xades:IssuerSerial>
                        </xades:Cert>
                    </xades:SigningCertificate>
                    <xades:SignaturePolicyIdentifier>
                        <xades:SignaturePolicyId>
                            <xades:SigPolicyId>
                                <xades:Identifier>https://facturaelectronica.dian.gov.co/politicadefirma/v2/politicadefirmav2.pdf</xades:Identifier>
                                <xades:Description>Política de firma para facturas electrónicas de la República de Colombia.</xades:Description>
                            </xades:SigPolicyId>
                            <xades:SigPolicyHash>
                                <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                                <ds:DigestValue>dMoMvtcG5aIzgYo0tIsSQeVJBDnUnfSOfBpxXrmor0Y=</ds:DigestValue>
                            </xades:SigPolicyHash>
                        </xades:SignaturePolicyId>
                    </xades:SignaturePolicyIdentifier>
                    <xades:SignerRole>
                        <xades:ClaimedRoles>
                            <xades:ClaimedRole>supplier</xades:ClaimedRole>
                        </xades:ClaimedRoles>
                    </xades:SignerRole>
                </xades:SignedSignatureProperties>
            </xades:SignedProperties>
        </xades:QualifyingProperties>
    </ds:Object>
</ds:Signature>
por
Nada aún, sigo aún con el inconveniente.

4 Respuestas

0 votos
por
Hola RIcardo, lograste solucionarlo?
por
Nada Felipe, aún sigo intentando. Más tarde tengo un apoyo de alguien y si lo solucionamos, indico por aquí cómo lo hice para que todos sepan.
por
Vale., estamos en las mismas. Haré lo mismo si sabemos algo.
por
El nodo de la firma debe quedar así:

<ds:Signature Id="xmlsig-48d2ed72-aefe-468c-8a5b-fd92f10977be">
    <ds:SignedInfo>
        <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
        <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
        <ds:Reference Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-ref0"
                        URI="">
            <ds:Transforms>
                <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
            </ds:Transforms>
            <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
            <ds:DigestValue>xwx9izxuG3jjhT8KdmNyMfWdFd3nZlk1As9wBEl6/Qw=</ds:DigestValue>
        </ds:Reference>
        <ds:Reference Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-ref1"
                        URI="#xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-KeyInfo">
            <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
            <ds:DigestValue>B47SzmKutq16h7wT3f56E/KbsIks88e/b1gkLY6KXEs=</ds:DigestValue>
        </ds:Reference>
        <ds:Reference URI="#xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-signedprops"
                        Type="http://uri.etsi.org/01903#SignedProperties">
            <ds:Transforms>
                <ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
            </ds:Transforms>
            <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
            <ds:DigestValue>0lIDid9H9d87+Gqkdx2U3scva3WATTqXy5Dckb6rKNM=</ds:DigestValue>
        </ds:Reference>
    </ds:SignedInfo>
    <ds:SignatureValue>SIGNATURE_VALUE</ds:SignatureValue>
    <ds:KeyInfo Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-KeyInfo">
        <ds:X509Data>
            <ds:X509Certificate>CERTIFICATE_DATA</ds:X509Certificate>
        </ds:X509Data>
        <ds:KeyValue>
            <ds:RSAKeyValue>
                <ds:Modulus>MODULUS</ds:Modulus>
                <ds:Exponent>AQAB</ds:Exponent>
            </ds:RSAKeyValue>
        </ds:KeyValue>
    </ds:KeyInfo>
    <ds:Object>
        <xades:QualifyingProperties Target="#xmlsig-48d2ed72-aefe-468c-8a5b-fd92f10977be"
                                    Id="XadesObjects">
            <xades:SignedProperties Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-signedprops">
                <xades:SignedSignatureProperties>
                    <xades:SigningTime>2021-10-19T08:20:06.453041</xades:SigningTime>
                    <xades:SigningCertificate>
                        <xades:Cert>
                            <xades:CertDigest>
                                <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                                <ds:DigestValue>7qDCkER775DFN6S+bvWvvQKdL/CiZr12xI/b6b0Yjas=</ds:DigestValue>
                            </xades:CertDigest>
                            <xades:IssuerSerial>
                                <ds:X509IssuerName>ISSUER_NAME</ds:X509IssuerName>
                                <ds:X509SerialNumber>SERIAL_NUMBER</ds:X509SerialNumber>
                            </xades:IssuerSerial>
                        </xades:Cert>
                    </xades:SigningCertificate>
                    <xades:SignaturePolicyIdentifier>
                        <xades:SignaturePolicyId>
                            <xades:SigPolicyId>
                                <xades:Identifier>https://facturaelectronica.dian.gov.co/politicadefirma/v2/politicadefirmav2.pdf</xades:Identifier>
                                <xades:Description>Política de firma para facturas electrónicas de la República de Colombia.</xades:Description>
                            </xades:SigPolicyId>
                            <xades:SigPolicyHash>
                                <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                                <ds:DigestValue>dMoMvtcG5aIzgYo0tIsSQeVJBDnUnfSOfBpxXrmor0Y=</ds:DigestValue>
                            </xades:SigPolicyHash>
                        </xades:SignaturePolicyId>
                    </xades:SignaturePolicyIdentifier>
                    <xades:SignerRole>
                        <xades:ClaimedRoles>
                            <xades:ClaimedRole>supplier</xades:ClaimedRole>
                        </xades:ClaimedRoles>
                    </xades:SignerRole>
                </xades:SignedSignatureProperties>
            </xades:SignedProperties>
        </xades:QualifyingProperties>
    </ds:Object>
</ds:Signature>
0 votos
por

El root del XML es este:

<NominaIndividual xmlns="dian:gov:co:facturaelectronica:NominaIndividual"
                    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
                    xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
                    xmlns:xades="http://uri.etsi.org/01903/v1.3.2#"
                    xmlns:xades141="http://uri.etsi.org/01903/v1.4.1#"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    SchemaLocation=""
                    xsi:schemaLocation="dian:gov:co:facturaelectronica:NominaIndividual NominaIndividualElectronicaXSD.xsd">

El nodo de la firma debe quedar así:

<ds:Signature Id="xmlsig-48d2ed72-aefe-468c-8a5b-fd92f10977be">
    <ds:SignedInfo>
        <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
        <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
        <ds:Reference Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-ref0"
                        URI="">
            <ds:Transforms>
                <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
            </ds:Transforms>
            <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
            <ds:DigestValue>xwx9izxuG3jjhT8KdmNyMfWdFd3nZlk1As9wBEl6/Qw=</ds:DigestValue>
        </ds:Reference>
        <ds:Reference Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-ref1"
                        URI="#xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-KeyInfo">
            <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
            <ds:DigestValue>B47SzmKutq16h7wT3f56E/KbsIks88e/b1gkLY6KXEs=</ds:DigestValue>
        </ds:Reference>
        <ds:Reference URI="#xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-signedprops"
                        Type="http://uri.etsi.org/01903#SignedProperties">
            <ds:Transforms>
                <ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
            </ds:Transforms>
            <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
            <ds:DigestValue>0lIDid9H9d87+Gqkdx2U3scva3WATTqXy5Dckb6rKNM=</ds:DigestValue>
        </ds:Reference>
    </ds:SignedInfo>
    <ds:SignatureValue>SIGNATURE_VALUE</ds:SignatureValue>
    <ds:KeyInfo Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-KeyInfo">
        <ds:X509Data>
            <ds:X509Certificate>CERTIFICATE_DATA</ds:X509Certificate>
        </ds:X509Data>
        <ds:KeyValue>
            <ds:RSAKeyValue>
                <ds:Modulus>MODULUS</ds:Modulus>
                <ds:Exponent>AQAB</ds:Exponent>
            </ds:RSAKeyValue>
        </ds:KeyValue>
    </ds:KeyInfo>
    <ds:Object>
        <xades:QualifyingProperties Target="#xmlsig-48d2ed72-aefe-468c-8a5b-fd92f10977be"
                                    Id="XadesObjects">
            <xades:SignedProperties Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-signedprops">
                <xades:SignedSignatureProperties>
                    <xades:SigningTime>2021-10-19T08:20:06.453041</xades:SigningTime>
                    <xades:SigningCertificate>
                        <xades:Cert>
                            <xades:CertDigest>
                                <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                                <ds:DigestValue>7qDCkER775DFN6S+bvWvvQKdL/CiZr12xI/b6b0Yjas=</ds:DigestValue>
                            </xades:CertDigest>
                            <xades:IssuerSerial>
                                <ds:X509IssuerName>ISSUER_NAME</ds:X509IssuerName>
                                <ds:X509SerialNumber>SERIAL_NUMBER</ds:X509SerialNumber>
                            </xades:IssuerSerial>
                        </xades:Cert>
                    </xades:SigningCertificate>
                    <xades:SignaturePolicyIdentifier>
                        <xades:SignaturePolicyId>
                            <xades:SigPolicyId>
                                <xades:Identifier>https://facturaelectronica.dian.gov.co/politicadefirma/v2/politicadefirmav2.pdf</xades:Identifier>
                                <xades:Description>Política de firma para facturas electrónicas de la República de Colombia.</xades:Description>
                            </xades:SigPolicyId>
                            <xades:SigPolicyHash>
                                <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                                <ds:DigestValue>dMoMvtcG5aIzgYo0tIsSQeVJBDnUnfSOfBpxXrmor0Y=</ds:DigestValue>
                            </xades:SigPolicyHash>
                        </xades:SignaturePolicyId>
                    </xades:SignaturePolicyIdentifier>
                    <xades:SignerRole>
                        <xades:ClaimedRoles>
                            <xades:ClaimedRole>supplier</xades:ClaimedRole>
                        </xades:ClaimedRoles>
                    </xades:SignerRole>
                </xades:SignedSignatureProperties>
            </xades:SignedProperties>
        </xades:QualifyingProperties>
    </ds:Object>
</ds:Signature>

0 votos
por

El nodo de la firma debe quedar así:

<ds:Signature Id="xmlsig-48d2ed72-aefe-468c-8a5b-fd92f10977be">
    <ds:SignedInfo>
        <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
        <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
        <ds:Reference Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-ref0"
                        URI="">
            <ds:Transforms>
                <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
            </ds:Transforms>
            <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
            <ds:DigestValue>xwx9izxuG3jjhT8KdmNyMfWdFd3nZlk1As9wBEl6/Qw=</ds:DigestValue>
        </ds:Reference>
        <ds:Reference Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-ref1"
                        URI="#xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-KeyInfo">
            <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
            <ds:DigestValue>B47SzmKutq16h7wT3f56E/KbsIks88e/b1gkLY6KXEs=</ds:DigestValue>
        </ds:Reference>
        <ds:Reference URI="#xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-signedprops"
                        Type="http://uri.etsi.org/01903#SignedProperties">
            <ds:Transforms>
                <ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
            </ds:Transforms>
            <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
            <ds:DigestValue>0lIDid9H9d87+Gqkdx2U3scva3WATTqXy5Dckb6rKNM=</ds:DigestValue>
        </ds:Reference>
    </ds:SignedInfo>
    <ds:SignatureValue>SIGNATURE_VALUE</ds:SignatureValue>
    <ds:KeyInfo Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-KeyInfo">
        <ds:X509Data>
            <ds:X509Certificate>CERTIFICATE_DATA</ds:X509Certificate>
        </ds:X509Data>
        <ds:KeyValue>
            <ds:RSAKeyValue>
                <ds:Modulus>MODULUS</ds:Modulus>
                <ds:Exponent>AQAB</ds:Exponent>
            </ds:RSAKeyValue>
        </ds:KeyValue>
    </ds:KeyInfo>
    <ds:Object>
        <xades:QualifyingProperties Target="#xmlsig-48d2ed72-aefe-468c-8a5b-fd92f10977be"
                                    Id="XadesObjects">
            <xades:SignedProperties Id="xmldsig-48d2ed72-aefe-468c-8a5b-fd92f10977be-signedprops">
                <xades:SignedSignatureProperties>
                    <xades:SigningTime>2021-10-19T08:20:06.453041</xades:SigningTime>
                    <xades:SigningCertificate>
                        <xades:Cert>
                            <xades:CertDigest>
                                <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                                <ds:DigestValue>7qDCkER775DFN6S+bvWvvQKdL/CiZr12xI/b6b0Yjas=</ds:DigestValue>
                            </xades:CertDigest>
                            <xades:IssuerSerial>
                                <ds:X509IssuerName>ISSUER_NAME</ds:X509IssuerName>
                                <ds:X509SerialNumber>SERIAL_NUMBER</ds:X509SerialNumber>
                            </xades:IssuerSerial>
                        </xades:Cert>
                    </xades:SigningCertificate>
                    <xades:SignaturePolicyIdentifier>
                        <xades:SignaturePolicyId>
                            <xades:SigPolicyId>
                                <xades:Identifier>https://facturaelectronica.dian.gov.co/politicadefirma/v2/politicadefirmav2.pdf</xades:Identifier>
                                <xades:Description>Política de firma para facturas electrónicas de la República de Colombia.</xades:Description>
                            </xades:SigPolicyId>
                            <xades:SigPolicyHash>
                                <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                                <ds:DigestValue>dMoMvtcG5aIzgYo0tIsSQeVJBDnUnfSOfBpxXrmor0Y=</ds:DigestValue>
                            </xades:SigPolicyHash>
                        </xades:SignaturePolicyId>
                    </xades:SignaturePolicyIdentifier>
                    <xades:SignerRole>
                        <xades:ClaimedRoles>
                            <xades:ClaimedRole>supplier</xades:ClaimedRole>
                        </xades:ClaimedRoles>
                    </xades:SignerRole>
                </xades:SignedSignatureProperties>
            </xades:SignedProperties>
        </xades:QualifyingProperties>
    </ds:Object>
</ds:Signature>

por
Hola Micke
Yo lo tengo tal cual, o por lo menos, tengo todos los nodos que comentas pero sigo teniendo el inconveniente.

<?xml version="1.0" encoding="UTF-8"?>
<NominaIndividual xmlns="dian:gov:co:facturaelectronica:NominaIndividual" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" xmlns:xades141="http://uri.etsi.org/01903/v1.4.1#" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SchemaLocation="" xsi:schemaLocation="dian:gov:co:facturaelectronica:NominaIndividual NominaIndividualElectronicaXSD.xsd">
   <ext:UBLExtensions>
      <ext:UBLExtension>
         <ext:ExtensionContent>
            <ds:Signature Id="Signature-6e765a00d88e2222380c4d663192bb3e610ab3baf78567fbe2c6489ad4b5e217cb6bb7858657c15bdac79a41c671ad15">
               <ds:SignedInfo>
                  <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
                  <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
                  <ds:Reference Id="Reference-6e765a00d88e2222380c4d663192bb3e610ab3baf78567fbe2c6489ad4b5e217cb6bb7858657c15bdac79a41c671ad15" URI="">
                     <ds:Transforms>
                        <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
                     </ds:Transforms>
                     <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
                     <ds:DigestValue>SIGNATURE_VALUE</ds:DigestValue>
                  </ds:Reference>
                  <ds:Reference URI="#Signature-6e765a00d88e2222380c4d663192bb3e610ab3baf78567fbe2c6489ad4b5e217cb6bb7858657c15bdac79a41c671ad15-KeyInfo">
                     <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
                     <ds:DigestValue>rPNBWVGYUwlIXHlrgMB2Qik2Rzu8YMdFuOzHN1dDLaQ=</ds:DigestValue>
                  </ds:Reference>
                  <ds:Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#xmldsig-Signature-6e765a00d88e2222380c4d663192bb3e610ab3baf78567fbe2c6489ad4b5e217cb6bb7858657c15bdac79a41c671ad15-signedprops">
                     <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
                     <ds:DigestValue>0ugy49zC5gC1Jkox8XPutlILLTnNe6olfph01jy96IY=</ds:DigestValue>
                  </ds:Reference>
               </ds:SignedInfo>
               <ds:SignatureValue>HGqX3KlhPGModerSccst/ZS8OzcvQid8WGa35tz/8V9v4yY4AON3PNcRSOG+V2IQ8lOl7WLzXwwRFREGG782x3WbFAHGVsrIgOb4rJapQQWvZ5v8rWxVK31ZuyyIRPZP+tLsustG7AGfm2oXRN+oAXY0dTiM6zZtvtYN5OR5qRLqQxEppsyJmXXyfV1CkP5yzSmMxzIPjNjdw7v/wmCOLhEIdkfaeoOVoW8ARBWjfIlGpyeJUODUbJQIolE0aYiyiiREDIg3feZwD3zmde5132BaOo7c1Vq5ySYjWcofkHVJd8r15NiLDiEIq2HQMNooFjFaSxBgL6310fvz2z2vQg==</ds:SignatureValue>
               <ds:KeyInfo Id="Signature-6e765a00d88e2222380c4d663192bb3e610ab3baf78567fbe2c6489ad4b5e217cb6bb7858657c15bdac79a41c671ad15-KeyInfo">
                  <ds:X509Data>
                     <ds:X509Certificate>CERTIFICATE_DATA</ds:X509Certificate>
                  </ds:X509Data>
               </ds:KeyInfo>
               <ds:Object>
                  <xades:QualifyingProperties Target="#Signature-6e765a00d88e2222380c4d663192bb3e610ab3baf78567fbe2c6489ad4b5e217cb6bb7858657c15bdac79a41c671ad15">
                     <xades:SignedProperties Id="xmldsig-Signature-6e765a00d88e2222380c4d663192bb3e610ab3baf78567fbe2c6489ad4b5e217cb6bb7858657c15bdac79a41c671ad15-signedprops">
                        <xades:SignedSignatureProperties>
                           <xades:SigningTime>2021-11-02T10:42:37.841-05:00</xades:SigningTime>
                           <xades:SigningCertificate>
                              <xades:Cert>
                                 <xades:CertDigest>
                                    <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
                                    <ds:DigestValue>U6hjxxYP8tUJQrydfoE9p9Vxaw8lhwzq945T+rySPB0=</ds:DigestValue>
                                 </xades:CertDigest>
                                 <xades:IssuerSerial>
                                    <ds:X509IssuerName>ISSUER_NAME</ds:X509IssuerName>
                                    <ds:X509SerialNumber>SERIAL_NUMBERC</ds:X509SerialNumber>
                                 </xades:IssuerSerial>
                              </xades:Cert>
                           </xades:SigningCertificate>
                           <xades:SignaturePolicyIdentifier>
                              <xades:SignaturePolicyId>
                                 <xades:SigPolicyId>
                                    <xades:Identifier>https://facturaelectronica.dian.gov.co/politicadefirma/v2/politicadefirmav2.pdf</xades:Identifier>
                                    <xades:Description>Política de firma para facturas electrónicas de la República de Colombia</xades:Description>
                                 </xades:SigPolicyId>
                                 <xades:SigPolicyHash>
                                    <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
                                    <ds:DigestValue>dMoMvtcG5aIzgYo0tIsSQeVJBDnUnfSOfBpxXrmor0Y=</ds:DigestValue>
                                 </xades:SigPolicyHash>
                              </xades:SignaturePolicyId>
                           </xades:SignaturePolicyIdentifier>
                           <xades:SignerRole>
                              <xades:ClaimedRoles>
                                 <xades:ClaimedRole>supplier</xades:ClaimedRole>
                              </xades:ClaimedRoles>
                           </xades:SignerRole>
                        </xades:SignedSignatureProperties>
                     </xades:SignedProperties>
                  </xades:QualifyingProperties>
               </ds:Object>
            </ds:Signature>
         </ext:ExtensionContent>
      </ext:UBLExtension>
   </ext:UBLExtensions>
</NominaIndividual>
por
editado
Hola @RHAF , tengo la firma con los mismos nodos (firma http://facturasyrespuestas.com/3738/como-solucionar-la-reglar-ze02-rechazo-valor-firma-inv%C3%A1lido) pero tampoco me funciona sigue mostrando Regla: ZE02, Rechazo: Valor de la firma inválido. Pudiste solucionarlo ?
0 votos
por

Hola Ricardo, lograstes resolverlo. Se me esta presentando el mismo problema.... y no he logrado resolverlo. He cambiado varios datos y regresado a la firma de las facturas.... pero el resultado sigue igual.

Si lo resolviste te agradezco el dato del ¿Cómo?

por
Hola en el grupo de telegram ya se resolvió y se compartió el código para php y java. https://t.me/facturasyrespuestas
...