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

Migrate from MITyCLib to xades4j #1

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Migrate from MITyCLib to xades4j #1

wants to merge 5 commits into from

Conversation

xprl-gjf
Copy link
Owner

@xprl-gjf xprl-gjf commented Dec 8, 2022

Rework xades-firma to use xades4j in place of MITyCLib.
This removes the need to package the MITyCLib libraries as a shadow jar, since xades4j is available via maven central repo.

…nger necessary.

This reverts commit 032d73c6a17ffb6a6094fa7a1665f23bd277f7cd.
@xprl-gjf
Copy link
Owner Author

xprl-gjf commented Dec 8, 2022

Sadly, testing against the SRI pruebas ambiente rejects facturas signed with this version of the library.

Attached are versions of a factura signed using the previous MITyCLib implementation, and also with this xades4j implementation.

The xades4j version can be sent to SRI via 'enviar' web-service. But a subsequent attempt to authorize the factura via 'autorizar' web service results in:

{"mensaje":[{"identificador":"39","mensaje":"FIRMA INVALIDA","informacionAdicional":"La firma es invalida [Firma inválida. El certificado firmante no es válido.]","tipo":"ERROR"}]}

Requires further investigation to resolve.
factura_27922910115.MITyCLib.xml.txt
factura_27922910115.xades4j.xml.txt

@xprl-gjf
Copy link
Owner Author

xprl-gjf commented Dec 8, 2022

Suspicion falls on the SRI validation service (which we know uses MITyCLib) not handling the '
' line ending characters correctly...

@xprl-gjf
Copy link
Owner Author

xprl-gjf commented Dec 9, 2022

Some related discussion, without resolution, at xades4j #259

@xprl-gjf
Copy link
Owner Author

xprl-gjf commented Dec 9, 2022

Following up on &13#; line-endings, see issues such as:
https://bugs.openjdk.org/browse/JDK-8264194
eclipse-ee4j/metro-jax-ws#93 (comment)

@xprl-gjf
Copy link
Owner Author

xprl-gjf commented Dec 9, 2022

Following commit 9d6df9a, signatures are added without any line breaks (and therefore no 
 chars in the certificate. See example attached.

Still rejected by SRI:

{"mensaje":[{"identificador":"39","mensaje":"FIRMA INVALIDA","informacionAdicional":"La firma es invalida [Firma inválida. El certificado firmante no es válido.]","tipo":"ERROR"}]}

So, line breaks are probably not the source of the problem... :(

factura_27922910115.xades4j_3.xml.txt

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

Successfully merging this pull request may close these issues.

1 participant