-
Notifications
You must be signed in to change notification settings - Fork 173
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
Mark getKeyInfo()
private as it has no public consumers
#412
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #412 +/- ##
=======================================
Coverage 73.36% 73.36%
=======================================
Files 9 9
Lines 901 901
Branches 239 239
=======================================
Hits 661 661
Misses 142 142
Partials 98 98 ☔ View full report in Codecov by Sentry. |
Hey! Why have you done this? I used my own redefined getKeyInfo to make the signature xades-compliant by adding Object section:
So how should I do this now? |
Thank you for bringing this to our attention. You're the first case I'm aware of that is using this function like this. What is more, there is no test suite covering this at all. Many have found leveraging I know that If not, please, let's continue this discussion and get this change reverted with a test suite to make sure it doesn't break again. Or, please feel free to make a PR that enables XAdES-compliance in our codebase so that you don't need custom code. It seems from a quick Google that we probably need to modify let signatureXml = `<${currentPrefix}Signature ${signatureAttrs.join(" ")}>`;
signatureXml += this.createSignedInfo(doc, prefix);
signatureXml += this.getKeyInfo(prefix);
const xadesSignedProperties = this.getXadesSignedProperties();
const xadesUnsignedProperties = this.getXadesInsignedProperties();
if (xadesSignedProperties != null || xadesUnsignedProperties != null) {
signatureXml += `<${currentPrefix}Object><QualifyingProperties>`
if (xadesSignedProperties != null) {
signatureXml += `<SignedProperties>${xadesSignedProperties}</SignedProperties>`
}
if (xadesUnsignedProperties != null) {
signatureXml += `<UnsignedProperties>${xadesUnsignedProperties}</UnsignedProperties>`
}
signatureXml += `</QualifyingProperties></${currentPrefix}Object>`
}
signatureXml += `</${currentPrefix}Signature>`; If something like that looks right, please put up a PR with some tests and we'll get it merged and released as 5.1. Again, thank you for bringing this to everyone's attention and for your support of this open-source project! |
Thanks for your kind attitude) |
I have finally prepared a PR: #444 |
No description provided.