Skip to content

Strip newlines from certificate#24

Merged
arj03 merged 1 commit into
iterasdev:masterfrom
raphaelm:cert-newline
Apr 21, 2026
Merged

Strip newlines from certificate#24
arj03 merged 1 commit into
iterasdev:masterfrom
raphaelm:cert-newline

Conversation

@raphaelm

Copy link
Copy Markdown
Collaborator

Fixes real-world problem observed with https://peppol-smp.odoo.com/

SMP returns XML with newline after certificate:

wTVTaqw7G17CmbbpORXZb+aJyCJrvKQAg68/dIrJa5IFkqo8Vdh8B4v4MhtbLqeytu5ThfCyU4/o
AE864Gu/7azxF0bNxqWfXNDxoilHSwH4q8EQQOI=
</smp:Certificate>

This causes us to write:

wTVTaqw7G17CmbbpORXZb+aJyCJrvKQAg68/dIrJa5IFkqo8Vdh8B4v4MhtbLqeytu5ThfCyU4/o
AE864Gu/7azxF0bNxqWfXNDxoilHSwH4q8EQQOI=

-----END CERTIFICATE-----

Which trips xmlsec:

SendPeppolError: xmlsec: Error: xmlSecCryptoAppKeyLoadEx failed: file=/tmp/temp-sendpeppol-certfile-d3cb5lzt.pem
Error: failed to load public key from "/tmp/temp-sendpeppol-certfile-d3cb5lzt.pem".
Error: keys manager creation failed
Unknown command

@arj03 arj03 merged commit 7f60e5b into iterasdev:master Apr 21, 2026
2 checks passed
@arj03

arj03 commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

Thanks :)

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.

3 participants