Skip to content

Conversation

@cjbarth
Copy link
Contributor

@cjbarth cjbarth commented Apr 11, 2024

This is to provide a helper function to sign all children of the root node and a way to include keyinfo in the signature.

Closes: #463

@sibelius
Copy link

any plans to merge this?

@cjbarth
Copy link
Contributor Author

cjbarth commented Jan 31, 2025

@sibelius , yes, there are plans to merge this once it is done. Please feel free to contribute; I can use all the help I can get as recently I don't have much time for development on this project.

const keyInfoContent = this.getKeyInfoContent({ publicCert: this.publicCert, prefix });
if (keyInfoAttrs || keyInfoContent) {
return `<${currentPrefix}KeyInfo${keyInfoAttrs}>${keyInfoContent}</${currentPrefix}KeyInfo>`;
const keyInfoXml = `<${currentPrefix}KeyInfo${keyInfoAttrs}>${keyInfoContent}<fake>2</fake></${currentPrefix}KeyInfo>`;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fake is correct ?

or just testing ?

@sibelius
Copy link

should we remove whitespace before signing ?

@sibelius
Copy link

sibelius commented Jan 31, 2025

I'm checking the output from this reference implementation that works https://github.com/bacen/pix-dict-quickstart/blob/master/src/main/java/br/gov/bcb/pi/dict/xml/XMLSigner.java#L63

and the output of this package

xml-crypto does not keep the \n inside ds:SignatureValue

here is a print with the signature with \n
image

should I implement or active this somehow ?

I think this broke in your pull request, in main is working well

@cjbarth
Copy link
Contributor Author

cjbarth commented Oct 17, 2025

@sibelius , sorry for not catching all these comments and thank you for your interest in this. It appears that some of the work that @shunkica has done in #506 might superceede this. He commented as much here. I'm waiting to hear back on him before I squander any more of yours or my time on this draft. Feel free to have a look at his work.

@coderabbitai
Copy link

coderabbitai bot commented Oct 17, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

[ENHANCEMENT]: Improve experience of adding a Reference to the Signature.

2 participants