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

Add option for digest algorithm #1273

Merged
merged 2 commits into from
Feb 12, 2025
Merged

Add option for digest algorithm #1273

merged 2 commits into from
Feb 12, 2025

Conversation

pzemljic-git
Copy link
Contributor

Currently, the digest algorithm is hard coded to sha256 even when passing a different signature algorithm like sha1. However, some web services require differnt digest algorithms. This change adds a new option for passing the digest algorithm:

client.setSecurity(new soap.WSSecurityCert(
privateKey,
publicKey,
'',
{
signatureAlgorithm: 'http://www.w3.org/2000/09/xmldsig#rsa-sha1',
digestAlgorithm : 'http://www.w3.org/2000/09/xmldsig#sha1',
}
));

@w666
Copy link
Collaborator

w666 commented Feb 11, 2025

Hi @pzemljic-git,

I think default value is required, and it must be the same as the one currently used. As you can see tests are failing atm.

Could you also add a test that default value can be overridden?
Maybe doc changes are needed as well, but I can help with that,

Thanks.

@pzemljic-git
Copy link
Contributor Author

Hi @w666,

Good point, thanks! I added the default value, added a test, and updated the documentation.

Best regards,
Peter

@w666
Copy link
Collaborator

w666 commented Feb 12, 2025

Looks good to me, thanks for the contribution.
When do you need new release?

@w666 w666 merged commit afd156a into vpulim:master Feb 12, 2025
1 check passed
@pzemljic-git
Copy link
Contributor Author

No rush on the release. I can use my fork for now. Thanks for merging and feedback!

@w666
Copy link
Collaborator

w666 commented Feb 14, 2025

1.1.8 has been released.

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