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

Reference '' cannot be validated #7

Open
pabloxls opened this issue Jun 26, 2018 · 1 comment
Open

Reference '' cannot be validated #7

pabloxls opened this issue Jun 26, 2018 · 1 comment

Comments

@pabloxls
Copy link

Hola,
Estoy realizando la firma para la facturación electrónica de la DIAN (Colombia). Sin embargo, me devuelve el siguiente error:

"com.indra.mmdd.signature.exceptions.ValidateException: xades4j.verification.ReferenceValueException: Reference '' cannot be validated".

Yo si paso el documento por el validador del propio proyecto lo valida correctamente. No sé que puede estar fallando.

La firma generada es la siguiente:

<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="xmldsig-0afd79f9-d328-4cb1-9477-6a59cb8b75d7">
ds:SignedInfo
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
<ds:Reference Id="xmldsig-3a6529b8-2674-424f-b907-d601b9b5aee0-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/2000/09/xmldsig#sha1" />
ds:DigestValuePk733bC0e9ZTEwWw2jb9MZoG2gk=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#xmldsig-0afd79f9-d328-4cb1-9477-6a59cb8b75d7-keyinfo">
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
ds:DigestValue4gn73PBVP3iSXzW1td578XKW354=</ds:DigestValue>
</ds:Reference>
<ds:Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#xmldsig-0afd79f9-d328-4cb1-9477-6a59cb8b75d7-signedprops">
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
ds:DigestValue2OKuaYOniGKR/+RStBDWf8J2ldY=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue Id="xmldsig-0afd79f9-d328-4cb1-9477-6a59cb8b75d7-sigvalue">BAQNahqUVUAdyUg9yOXFCvOs6is6uHV5b1aLnFiXQZCAc/uomfKl5yozjzGtQSXaKptyjIxRVbHyqQ75bLYL/RupZekNDQ92j0py9EWU9M2Lq1ihIUicP4+rQMVo2N8BhojOI/osMqJzJoMfYlCGpQHkVhPWJ5Vg/S6WeRHaXYpYOe3qIt+zhzgPL5H+IUODCcqZo/Kec1GevjBbmZNyUCdQ2YTs3zMGtZxsZoeyGbxIbxCEI3cZ9wzQfW+//QnpCLfb1lZWouE+bm/YbzdOmHVa2zxgXQH0Zn9ozhEksnV+5vdjZUDYrVUYy5AKVLYs9uV+Ha3F+jp3iY2kvFlBvw==</ds:SignatureValue>
<ds:KeyInfo Id="xmldsig-0afd79f9-d328-4cb1-9477-6a59cb8b75d7-keyinfo">
ds:X509Data
ds:X509CertificateMIIIUDCCBjigAwIBAgIIC9w4K6yOMEcwDQYJKoZIhvcNAQELBQAwgbQxIzAhBgkqhkiG9w0BCQEWFGluZm9AYW5kZXNzY2QuY29tLmNvMSMwIQYDVQQDExpDQSBBTkRFUyBTQ0QgUy5BLiBDbGFzZSBJSTEwMC4GA1UECxMnRGl2aXNpb24gZGUgY2VydGlmaWNhY2lvbiBlbnRpZGFkIGZpbmFsMRMwEQYDVQQKEwpBbmRlcyBTQ0QuMRQwEgYDVQQHEwtCb2dvdGEgRC5DLjELMAkGA1UEBhMCQ08wHhcNMTgwNTE3MTM0NDAwWhcNMjAwNTE2MTM0MzAwWjCB/jEaMBgGA1UECQwRQ0FSUkVSQSAyMSMxMDIgNDYxMTAvBgkqhkiG9w0BCQEWIlJBTU9OLkNBUlJFUkFATElERVJBU09MVUNJT05FUy5DT00xGzAZBgNVBAMTEkxJREVSQSBBTUVSSUNBIFNBUzET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Xm+navrgXqFjMsQya0bmh7NFeLEGWh1HugWblU99dbeq0Me82DKZ/SembyOQc70PbXqg9OmSldhYhVP9eSBG8jn1OW4G+bxaJkuaXsf+fngEBFlgvX9kSyx+QT7Fty8MipTkUTzkhIJYhtTfIdRWTWySyHkpIBF33Klh5LRgXjxS9jUEjbo7wcge7OCEkqDzyam6/Kqj3d3/ghk=</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
<ds:Object Id="XadesObjectId-57c83713-0c6b-4fee-a014-f6fce7771256">
<xades:QualifyingProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Id="QualifyingProperties-bf9526b6-a7e1-4fc9-849f-bcc26c23b769" Target="#xmldsig-0afd79f9-d328-4cb1-9477-6a59cb8b75d7">
<xades:SignedProperties Id="xmldsig-0afd79f9-d328-4cb1-9477-6a59cb8b75d7-signedprops">
xades:SignedSignatureProperties
xades:SigningTime2018-06-18T15:26:23+02:00</xades:SigningTime>
xades:SigningCertificate
xades:Cert
xades:CertDigest
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
ds:DigestValueBECSTEFTGWGMYFSFICZ1WJd4UV0=</ds:DigestValue>
</xades:CertDigest>
xades:IssuerSerial
ds:X509IssuerNameC=CO, L=Bogota D.C., O=Andes SCD., OU=Division de certificacion entidad final, CN=CA ANDES SCD S.A. Clase II, E=[email protected]</ds:X509IssuerName>
ds:X509SerialNumber854619789523300423</ds:X509SerialNumber>
</xades:IssuerSerial>
</xades:Cert>
xades:Cert
xades:CertDigest
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
ds:DigestValueydBrkDUi4OLwpDJACttO8PSuHdE=</ds:DigestValue>
</xades:CertDigest>
xades:IssuerSerial
ds:X509IssuerNameC=CO, L=Bogota D.C., O=Andes SCD, OU=Division de certificacion, CN=ROOT CA ANDES SCD S.A., E=[email protected]</ds:X509IssuerName>
ds:X509SerialNumber8136867327090815624</ds:X509SerialNumber>
</xades:IssuerSerial>
</xades:Cert>
xades:Cert
xades:CertDigest
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
ds:DigestValueOXeITae4OgBq7RWNUGqshhvKGk8=</ds:DigestValue>
</xades:CertDigest>
xades:IssuerSerial
ds:X509IssuerNameC=CO, L=Bogota D.C., O=Andes SCD, OU=Division de certificacion, CN=ROOT CA ANDES SCD S.A., E=[email protected]</ds:X509IssuerName>
ds:X509SerialNumber3184328748892787122</ds:X509SerialNumber>
</xades:IssuerSerial>
</xades:Cert>
</xades:SigningCertificate>
xades:SignaturePolicyIdentifier
xades:SignaturePolicyId
xades:SigPolicyId
xades:Identifierhttps://facturaelectronica.dian.gov.co/politicadefirma/v1/politicadefirmav1.pdf</xades:Identifier>
xades:DescriptionPolí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/2000/09/xmldsig#sha1" />
ds:DigestValue61fInBICBQOCBwuTwlaOZSi9HKc=</ds:DigestValue>
</xades:SigPolicyHash>
</xades:SignaturePolicyId>
</xades:SignaturePolicyIdentifier>
xades:SignerRole
xades:ClaimedRoles
xades:ClaimedRolesupplier</xades:ClaimedRole>
</xades:ClaimedRoles>
</xades:SignerRole>
</xades:SignedSignatureProperties>
</xades:SignedProperties>
</xades:QualifyingProperties>
</ds:Object>
</ds:Signature>

@ziroz
Copy link

ziroz commented Aug 15, 2018

Hola @pabloxls

Estoy realizando la firma para la DIAN en Colombia y tengo el mismo problema con el error:

"com.indra.mmdd.signature.exceptions.ValidateException: xades4j.verification.ReferenceValueException: Reference '' cannot be validated".

Has podido resolver el problema?

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

No branches or pull requests

2 participants