Skip to content

Trying to use add_sign adds new line characters in embedded signature #148

@gsvitak

Description

@gsvitak

Hello,

I was noticed in #78 that the signature was not using the signature api. I am trying to use the OneLogin_Saml2_Utils.add_sign method to embed the signature in the AuthnRequest for the HTTP-POST binding. The method works great but it appears to add new lines/carriage returns to the signature value.

Based on the HTTP-POST sample (https://www.samltool.com/generic_sso_req.php), I think the new lines/carriage returns will cause issues with the IDP.

Can you please confirm if the extra characters will cause an issue? Also, can you please offer a suggestion on how to eliminate the characters?

I have validated my SP cert and private key are formatted properly by stepping through the constructor of OneLogin_Saml2_Settings

self.format_sp_cert()
self.format_sp_key()

Thanks for the help in advance.
Greg

<ds:SignatureValue>R/+/4XFlWhEptIXukn5hkkalFimlutchfYlEoVMhTWd+QlId818h1CiplPSlUnGZ
         Eor55SNaXdn8vdyDv54MmYkMJRW1+kp+/P7HijVWaCisR5hXghZnazLXWkFJOyuH
         k2MQCT7ZIe4EDmsRZterDfRlcpqdlNfWJkXKq07EmuqgiPF6t8WtVBxrEZ/Pcu3+
         GY8K4+p0KgJp3ocr985+Zbyo9jtepO4+xRjyEfL3CqfHLR6+Xa91A1DH2oAVJTZZ
         HCC2iy30zRqGACoHHTd2mEcyG3i5n456W3LEYE/xNeVu3bL3/EdRNUP+gcyLGL9f STDwaxGbuJx00cjtT8bKjQ==</ds:SignatureValue> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions