c# - Signing Xml elements in same document with different keys -
business scenario:
- an update can contain packages.
- a package can contain changes.
- each package must approved somebody.
- after approval, package may not changed.
to executed, update must have 100% approved packages.
development thoughts:
- all data saved xml files.
- xml "package" elements signed upon approval.
problem:
no matter try , google up, examples signing a whole document or signing sub-elements with same key whole document. sign every sub-element (package) different key, key of 1 approves package. need 1 signature per element. while .net framework functions seem support this, strange behaviours. example when signing elements, need give uri of element. if give same id packages, verifies, if give different id each element , refer id in respective signatures, can verify first. idea of id doesn't make sense scenario in first place because have signature element in 1:1 relationship.
i can post code, before do, know if possible? have not seen prohibit want do, have not seen indicator should work either. has done or can point me resource have not yet found? or have better idea how implement requirements using standards?
it possible sign different elements in same xml document different keys. adds multiple signatures different internal references (#<id>) document.
internal reference id required, there no way around supported standards. reference empty or missing uri not indicate parent element signed complete document signed.
if can't add ids packages can use non-standard means achieve goal effectivly treating each package independent xml document , leaving reference uri empty. mean xml document packages can verified program, because have split xml document multiple documents before verification.
in .net implementation doesn't work if signatures placed inside tags should signed. either due me missing or due bug.
placing signatures @ top level directly inside root element works.
working implementation can found in my answer other question.
Comments
Post a Comment