From ec79da12a7ceb6fdc8d6513b9df143127ac65c86 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Tue, 21 Apr 2026 11:20:47 +0200 Subject: [PATCH] Strip newlines from certificate --- src/peppol_py/smp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peppol_py/smp.py b/src/peppol_py/smp.py index 347f186..4a24230 100644 --- a/src/peppol_py/smp.py +++ b/src/peppol_py/smp.py @@ -122,7 +122,7 @@ def get_service_info_for_participant_from_smp(participant_id, document_type, tes endpoint_url = endpoint_e.findtext('./{*}EndpointReference/{*}Address') certificate = endpoint_e.findtext('./{*}Certificate') if certificate: - certificate = b'-----BEGIN CERTIFICATE-----\n' + certificate.encode('ascii') + b'\n-----END CERTIFICATE-----' + certificate = b'-----BEGIN CERTIFICATE-----\n' + certificate.strip().encode('ascii') + b'\n-----END CERTIFICATE-----' break