-
Notifications
You must be signed in to change notification settings - Fork 176
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
Initial code to sign keyinfo #464
base: master
Are you sure you want to change the base?
Conversation
any plans to merge this? |
@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. |
@@ -901,7 +937,14 @@ export class SignedXml { | |||
|
|||
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>`; |
There was a problem hiding this comment.
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 ?
should we remove whitespace before signing ? |
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 should I implement or active this somehow ? I think this broke in your pull request, in main is working well |
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