goxmldsig
goxmldsig copied to clipboard
Empty default ID attribute fails builds
Just copy pasting the exact Signing
code from README, produces the following error. And so does in complex code whenever I try it.
panic: Missing ID attribute
When I look closely into the source code, the default ID attribute that is being set has an empty value. And I can't even find any option to set the ID attr, since in my XML the attribute is actually referenceId
and not ID
.
The SigningContext has an IdAttribute you can set before signing (there's also an IdAttribute in ValidationContext which can be set before validating).
Is that what you're looking for?