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

Make whitespace in created signature node configurable option because of C# DOTNET signature validation #248

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

guycalledseven
Copy link

@guycalledseven guycalledseven commented Feb 2, 2023

I've created my fork after many hours spent on debugging.

I've extended constructor with new default properties:

public function __construct($prefix='ds', $preserveWhiteSpace = false, $formatOutput = false)

I am not quite happy with implementation because it does not follow general whitespace configuration of DOMDocument object eg. this would be more straight forward to read:

$objDSig = new XMLSecurityDSig('');
$objDSig->preserveWhiteSpace = false;
$objDSig->formatOutput = false;

This is unfortunately not possible since XMLSecurityDSig object transforms signature template via DOMDocument to xml in it's constructor.

This is related to:

  1. Signatures done with XMLSecurityDSig do not pass C# DOTNET validation #247
  2. Signature value Issue #77
  3. Enc, DSig: Add public preserveWhiteSpace and formatOutput switches #221

Looking forward to change PR if necessary to better incorporate it in xmlseclibs package.

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.

2 participants