@pokash/n8n-nodes-ksef 0.2.16 → 0.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (645) hide show
  1. package/package.json +5 -12
  2. package/node_modules/@oozcitak/dom/LICENSE +0 -21
  3. package/node_modules/@oozcitak/dom/README.md +0 -32
  4. package/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.d.ts +0 -21
  5. package/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js +0 -79
  6. package/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js.map +0 -1
  7. package/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.d.ts +0 -8
  8. package/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js +0 -23
  9. package/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js.map +0 -1
  10. package/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.d.ts +0 -8
  11. package/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js +0 -76
  12. package/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js.map +0 -1
  13. package/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.d.ts +0 -19
  14. package/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js +0 -140
  15. package/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js.map +0 -1
  16. package/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.d.ts +0 -192
  17. package/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js +0 -303
  18. package/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js.map +0 -1
  19. package/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.d.ts +0 -61
  20. package/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.js +0 -108
  21. package/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.js.map +0 -1
  22. package/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.d.ts +0 -72
  23. package/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js +0 -288
  24. package/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js.map +0 -1
  25. package/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.d.ts +0 -21
  26. package/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js +0 -61
  27. package/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js.map +0 -1
  28. package/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.d.ts +0 -29
  29. package/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js +0 -161
  30. package/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js.map +0 -1
  31. package/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.d.ts +0 -121
  32. package/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js +0 -608
  33. package/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js.map +0 -1
  34. package/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.d.ts +0 -146
  35. package/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js +0 -995
  36. package/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js.map +0 -1
  37. package/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.d.ts +0 -33
  38. package/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js +0 -142
  39. package/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js.map +0 -1
  40. package/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.d.ts +0 -66
  41. package/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.js +0 -1173
  42. package/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.js.map +0 -1
  43. package/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.d.ts +0 -43
  44. package/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js +0 -276
  45. package/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js.map +0 -1
  46. package/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.d.ts +0 -25
  47. package/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js +0 -85
  48. package/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js.map +0 -1
  49. package/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.d.ts +0 -68
  50. package/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js +0 -543
  51. package/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js.map +0 -1
  52. package/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.d.ts +0 -15
  53. package/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js +0 -105
  54. package/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js.map +0 -1
  55. package/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.d.ts +0 -27
  56. package/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js +0 -125
  57. package/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js.map +0 -1
  58. package/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.d.ts +0 -9
  59. package/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js +0 -69
  60. package/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js.map +0 -1
  61. package/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.d.ts +0 -82
  62. package/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js +0 -829
  63. package/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js.map +0 -1
  64. package/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.d.ts +0 -8
  65. package/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js +0 -21
  66. package/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js.map +0 -1
  67. package/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.d.ts +0 -57
  68. package/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js +0 -316
  69. package/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js.map +0 -1
  70. package/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.d.ts +0 -30
  71. package/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js +0 -226
  72. package/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js.map +0 -1
  73. package/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.d.ts +0 -8
  74. package/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js +0 -62
  75. package/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js.map +0 -1
  76. package/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.d.ts +0 -268
  77. package/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js +0 -853
  78. package/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js.map +0 -1
  79. package/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.d.ts +0 -17
  80. package/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js +0 -147
  81. package/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js.map +0 -1
  82. package/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.d.ts +0 -8
  83. package/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js +0 -14
  84. package/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js.map +0 -1
  85. package/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.d.ts +0 -25
  86. package/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js +0 -164
  87. package/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js.map +0 -1
  88. package/node_modules/@oozcitak/dom/lib/algorithm/index.d.ts +0 -28
  89. package/node_modules/@oozcitak/dom/lib/algorithm/index.js +0 -34
  90. package/node_modules/@oozcitak/dom/lib/algorithm/index.js.map +0 -1
  91. package/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.d.ts +0 -15
  92. package/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js +0 -32
  93. package/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js.map +0 -1
  94. package/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.d.ts +0 -23
  95. package/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js +0 -59
  96. package/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js.map +0 -1
  97. package/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.d.ts +0 -23
  98. package/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js +0 -70
  99. package/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js.map +0 -1
  100. package/node_modules/@oozcitak/dom/lib/dom/AttrImpl.d.ts +0 -45
  101. package/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js +0 -118
  102. package/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js.map +0 -1
  103. package/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.d.ts +0 -21
  104. package/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js +0 -51
  105. package/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js.map +0 -1
  106. package/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.d.ts +0 -35
  107. package/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js +0 -132
  108. package/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js.map +0 -1
  109. package/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.d.ts +0 -16
  110. package/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js +0 -165
  111. package/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js.map +0 -1
  112. package/node_modules/@oozcitak/dom/lib/dom/CommentImpl.d.ts +0 -21
  113. package/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js +0 -52
  114. package/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js.map +0 -1
  115. package/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.d.ts +0 -16
  116. package/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js +0 -60
  117. package/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js.map +0 -1
  118. package/node_modules/@oozcitak/dom/lib/dom/DOMException.d.ts +0 -171
  119. package/node_modules/@oozcitak/dom/lib/dom/DOMException.js +0 -347
  120. package/node_modules/@oozcitak/dom/lib/dom/DOMException.js.map +0 -1
  121. package/node_modules/@oozcitak/dom/lib/dom/DOMImpl.d.ts +0 -48
  122. package/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js +0 -100
  123. package/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js.map +0 -1
  124. package/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.d.ts +0 -29
  125. package/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js +0 -149
  126. package/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js.map +0 -1
  127. package/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.d.ts +0 -46
  128. package/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js +0 -312
  129. package/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js.map +0 -1
  130. package/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.d.ts +0 -32
  131. package/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js +0 -103
  132. package/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js.map +0 -1
  133. package/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.d.ts +0 -116
  134. package/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js +0 -545
  135. package/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js.map +0 -1
  136. package/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.d.ts +0 -11
  137. package/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js +0 -17
  138. package/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js.map +0 -1
  139. package/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.d.ts +0 -39
  140. package/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js +0 -109
  141. package/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js.map +0 -1
  142. package/node_modules/@oozcitak/dom/lib/dom/ElementImpl.d.ts +0 -132
  143. package/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js +0 -714
  144. package/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js.map +0 -1
  145. package/node_modules/@oozcitak/dom/lib/dom/EventImpl.d.ts +0 -74
  146. package/node_modules/@oozcitak/dom/lib/dom/EventImpl.js +0 -313
  147. package/node_modules/@oozcitak/dom/lib/dom/EventImpl.js.map +0 -1
  148. package/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.d.ts +0 -30
  149. package/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js +0 -133
  150. package/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js.map +0 -1
  151. package/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.d.ts +0 -44
  152. package/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js +0 -157
  153. package/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js.map +0 -1
  154. package/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.d.ts +0 -22
  155. package/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js +0 -184
  156. package/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js.map +0 -1
  157. package/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.d.ts +0 -73
  158. package/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js +0 -116
  159. package/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js.map +0 -1
  160. package/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.d.ts +0 -34
  161. package/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js +0 -112
  162. package/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js.map +0 -1
  163. package/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.d.ts +0 -50
  164. package/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js +0 -64
  165. package/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js.map +0 -1
  166. package/node_modules/@oozcitak/dom/lib/dom/NodeImpl.d.ts +0 -252
  167. package/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js +0 -891
  168. package/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js.map +0 -1
  169. package/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.d.ts +0 -34
  170. package/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js +0 -86
  171. package/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js.map +0 -1
  172. package/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.d.ts +0 -46
  173. package/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js +0 -198
  174. package/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js.map +0 -1
  175. package/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.d.ts +0 -49
  176. package/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js +0 -188
  177. package/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js.map +0 -1
  178. package/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.d.ts +0 -12
  179. package/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js +0 -53
  180. package/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js.map +0 -1
  181. package/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.d.ts +0 -9
  182. package/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js +0 -31
  183. package/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js.map +0 -1
  184. package/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.d.ts +0 -24
  185. package/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js +0 -158
  186. package/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js.map +0 -1
  187. package/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.d.ts +0 -25
  188. package/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js +0 -59
  189. package/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js.map +0 -1
  190. package/node_modules/@oozcitak/dom/lib/dom/RangeImpl.d.ts +0 -71
  191. package/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js +0 -649
  192. package/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js.map +0 -1
  193. package/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.d.ts +0 -33
  194. package/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js +0 -82
  195. package/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js.map +0 -1
  196. package/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.d.ts +0 -16
  197. package/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js +0 -35
  198. package/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js.map +0 -1
  199. package/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.d.ts +0 -13
  200. package/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js +0 -48
  201. package/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js.map +0 -1
  202. package/node_modules/@oozcitak/dom/lib/dom/TextImpl.d.ts +0 -28
  203. package/node_modules/@oozcitak/dom/lib/dom/TextImpl.js +0 -109
  204. package/node_modules/@oozcitak/dom/lib/dom/TextImpl.js.map +0 -1
  205. package/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.d.ts +0 -23
  206. package/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js +0 -41
  207. package/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js.map +0 -1
  208. package/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.d.ts +0 -36
  209. package/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js +0 -249
  210. package/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js.map +0 -1
  211. package/node_modules/@oozcitak/dom/lib/dom/WindowImpl.d.ts +0 -26
  212. package/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js +0 -57
  213. package/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js.map +0 -1
  214. package/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.d.ts +0 -11
  215. package/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js +0 -31
  216. package/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js.map +0 -1
  217. package/node_modules/@oozcitak/dom/lib/dom/index.d.ts +0 -36
  218. package/node_modules/@oozcitak/dom/lib/dom/index.js +0 -102
  219. package/node_modules/@oozcitak/dom/lib/dom/index.js.map +0 -1
  220. package/node_modules/@oozcitak/dom/lib/dom/interfaces.d.ts +0 -2218
  221. package/node_modules/@oozcitak/dom/lib/dom/interfaces.js +0 -91
  222. package/node_modules/@oozcitak/dom/lib/dom/interfaces.js.map +0 -1
  223. package/node_modules/@oozcitak/dom/lib/index.d.ts +0 -3
  224. package/node_modules/@oozcitak/dom/lib/index.js +0 -11
  225. package/node_modules/@oozcitak/dom/lib/index.js.map +0 -1
  226. package/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.d.ts +0 -11
  227. package/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js +0 -37
  228. package/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js.map +0 -1
  229. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.d.ts +0 -26
  230. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js +0 -240
  231. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js.map +0 -1
  232. package/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.d.ts +0 -159
  233. package/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js +0 -512
  234. package/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js.map +0 -1
  235. package/node_modules/@oozcitak/dom/lib/parser/index.d.ts +0 -1
  236. package/node_modules/@oozcitak/dom/lib/parser/index.js +0 -6
  237. package/node_modules/@oozcitak/dom/lib/parser/index.js.map +0 -1
  238. package/node_modules/@oozcitak/dom/lib/parser/interfaces.d.ts +0 -131
  239. package/node_modules/@oozcitak/dom/lib/parser/interfaces.js +0 -18
  240. package/node_modules/@oozcitak/dom/lib/parser/interfaces.js.map +0 -1
  241. package/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.d.ts +0 -27
  242. package/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js +0 -56
  243. package/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js.map +0 -1
  244. package/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.d.ts +0 -52
  245. package/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js +0 -151
  246. package/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js.map +0 -1
  247. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.d.ts +0 -166
  248. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js +0 -1479
  249. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js.map +0 -1
  250. package/node_modules/@oozcitak/dom/lib/serializer/index.d.ts +0 -1
  251. package/node_modules/@oozcitak/dom/lib/serializer/index.js +0 -6
  252. package/node_modules/@oozcitak/dom/lib/serializer/index.js.map +0 -1
  253. package/node_modules/@oozcitak/dom/lib/serializer/interfaces.d.ts +0 -15
  254. package/node_modules/@oozcitak/dom/lib/serializer/interfaces.js +0 -3
  255. package/node_modules/@oozcitak/dom/lib/serializer/interfaces.js.map +0 -1
  256. package/node_modules/@oozcitak/dom/lib/util/Cast.d.ts +0 -12
  257. package/node_modules/@oozcitak/dom/lib/util/Cast.js +0 -26
  258. package/node_modules/@oozcitak/dom/lib/util/Cast.js.map +0 -1
  259. package/node_modules/@oozcitak/dom/lib/util/EmptySet.d.ts +0 -13
  260. package/node_modules/@oozcitak/dom/lib/util/EmptySet.js +0 -61
  261. package/node_modules/@oozcitak/dom/lib/util/EmptySet.js.map +0 -1
  262. package/node_modules/@oozcitak/dom/lib/util/Guard.d.ts +0 -135
  263. package/node_modules/@oozcitak/dom/lib/util/Guard.js +0 -192
  264. package/node_modules/@oozcitak/dom/lib/util/Guard.js.map +0 -1
  265. package/node_modules/@oozcitak/dom/lib/util/index.d.ts +0 -3
  266. package/node_modules/@oozcitak/dom/lib/util/index.js +0 -9
  267. package/node_modules/@oozcitak/dom/lib/util/index.js.map +0 -1
  268. package/node_modules/@oozcitak/dom/package.json +0 -72
  269. package/node_modules/@oozcitak/infra/LICENSE +0 -21
  270. package/node_modules/@oozcitak/infra/README.md +0 -13
  271. package/node_modules/@oozcitak/infra/lib/Base64.d.ts +0 -12
  272. package/node_modules/@oozcitak/infra/lib/Base64.js +0 -82
  273. package/node_modules/@oozcitak/infra/lib/Base64.js.map +0 -1
  274. package/node_modules/@oozcitak/infra/lib/Byte.d.ts +0 -6
  275. package/node_modules/@oozcitak/infra/lib/Byte.js +0 -15
  276. package/node_modules/@oozcitak/infra/lib/Byte.js.map +0 -1
  277. package/node_modules/@oozcitak/infra/lib/ByteSequence.d.ts +0 -45
  278. package/node_modules/@oozcitak/infra/lib/ByteSequence.js +0 -171
  279. package/node_modules/@oozcitak/infra/lib/ByteSequence.js.map +0 -1
  280. package/node_modules/@oozcitak/infra/lib/CodePoints.d.ts +0 -82
  281. package/node_modules/@oozcitak/infra/lib/CodePoints.js +0 -85
  282. package/node_modules/@oozcitak/infra/lib/CodePoints.js.map +0 -1
  283. package/node_modules/@oozcitak/infra/lib/JSON.d.ts +0 -24
  284. package/node_modules/@oozcitak/infra/lib/JSON.js +0 -123
  285. package/node_modules/@oozcitak/infra/lib/JSON.js.map +0 -1
  286. package/node_modules/@oozcitak/infra/lib/List.d.ts +0 -101
  287. package/node_modules/@oozcitak/infra/lib/List.js +0 -325
  288. package/node_modules/@oozcitak/infra/lib/List.js.map +0 -1
  289. package/node_modules/@oozcitak/infra/lib/Map.d.ts +0 -87
  290. package/node_modules/@oozcitak/infra/lib/Map.js +0 -308
  291. package/node_modules/@oozcitak/infra/lib/Map.js.map +0 -1
  292. package/node_modules/@oozcitak/infra/lib/Namespace.d.ts +0 -6
  293. package/node_modules/@oozcitak/infra/lib/Namespace.js +0 -9
  294. package/node_modules/@oozcitak/infra/lib/Namespace.js.map +0 -1
  295. package/node_modules/@oozcitak/infra/lib/Queue.d.ts +0 -13
  296. package/node_modules/@oozcitak/infra/lib/Queue.js +0 -22
  297. package/node_modules/@oozcitak/infra/lib/Queue.js.map +0 -1
  298. package/node_modules/@oozcitak/infra/lib/Set.d.ts +0 -136
  299. package/node_modules/@oozcitak/infra/lib/Set.js +0 -467
  300. package/node_modules/@oozcitak/infra/lib/Set.js.map +0 -1
  301. package/node_modules/@oozcitak/infra/lib/Stack.d.ts +0 -13
  302. package/node_modules/@oozcitak/infra/lib/Stack.js +0 -22
  303. package/node_modules/@oozcitak/infra/lib/Stack.js.map +0 -1
  304. package/node_modules/@oozcitak/infra/lib/String.d.ts +0 -129
  305. package/node_modules/@oozcitak/infra/lib/String.js +0 -472
  306. package/node_modules/@oozcitak/infra/lib/String.js.map +0 -1
  307. package/node_modules/@oozcitak/infra/lib/index.d.ts +0 -13
  308. package/node_modules/@oozcitak/infra/lib/index.js +0 -34
  309. package/node_modules/@oozcitak/infra/lib/index.js.map +0 -1
  310. package/node_modules/@oozcitak/infra/package.json +0 -54
  311. package/node_modules/@oozcitak/url/LICENSE +0 -21
  312. package/node_modules/@oozcitak/url/README.md +0 -27
  313. package/node_modules/@oozcitak/url/lib/URLAlgorithm.d.ts +0 -267
  314. package/node_modules/@oozcitak/url/lib/URLAlgorithm.js +0 -2758
  315. package/node_modules/@oozcitak/url/lib/URLAlgorithm.js.map +0 -1
  316. package/node_modules/@oozcitak/url/lib/URLImpl.d.ts +0 -53
  317. package/node_modules/@oozcitak/url/lib/URLImpl.js +0 -377
  318. package/node_modules/@oozcitak/url/lib/URLImpl.js.map +0 -1
  319. package/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.d.ts +0 -38
  320. package/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js +0 -303
  321. package/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js.map +0 -1
  322. package/node_modules/@oozcitak/url/lib/index.d.ts +0 -2
  323. package/node_modules/@oozcitak/url/lib/index.js +0 -7
  324. package/node_modules/@oozcitak/url/lib/index.js.map +0 -1
  325. package/node_modules/@oozcitak/url/lib/interfaces.d.ts +0 -195
  326. package/node_modules/@oozcitak/url/lib/interfaces.js +0 -31
  327. package/node_modules/@oozcitak/url/lib/interfaces.js.map +0 -1
  328. package/node_modules/@oozcitak/url/package.json +0 -55
  329. package/node_modules/@oozcitak/util/LICENSE +0 -21
  330. package/node_modules/@oozcitak/util/README.md +0 -10
  331. package/node_modules/@oozcitak/util/lib/CompareCache.d.ts +0 -32
  332. package/node_modules/@oozcitak/util/lib/CompareCache.js +0 -59
  333. package/node_modules/@oozcitak/util/lib/CompareCache.js.map +0 -1
  334. package/node_modules/@oozcitak/util/lib/FixedSizeSet.d.ts +0 -64
  335. package/node_modules/@oozcitak/util/lib/FixedSizeSet.js +0 -174
  336. package/node_modules/@oozcitak/util/lib/FixedSizeSet.js.map +0 -1
  337. package/node_modules/@oozcitak/util/lib/Lazy.d.ts +0 -18
  338. package/node_modules/@oozcitak/util/lib/Lazy.js +0 -34
  339. package/node_modules/@oozcitak/util/lib/Lazy.js.map +0 -1
  340. package/node_modules/@oozcitak/util/lib/ObjectCache.d.ts +0 -71
  341. package/node_modules/@oozcitak/util/lib/ObjectCache.js +0 -181
  342. package/node_modules/@oozcitak/util/lib/ObjectCache.js.map +0 -1
  343. package/node_modules/@oozcitak/util/lib/StringWalker.d.ts +0 -49
  344. package/node_modules/@oozcitak/util/lib/StringWalker.js +0 -105
  345. package/node_modules/@oozcitak/util/lib/StringWalker.js.map +0 -1
  346. package/node_modules/@oozcitak/util/lib/index.d.ts +0 -178
  347. package/node_modules/@oozcitak/util/lib/index.js +0 -439
  348. package/node_modules/@oozcitak/util/lib/index.js.map +0 -1
  349. package/node_modules/@oozcitak/util/package.json +0 -50
  350. package/node_modules/@xmldom/is-dom-node/LICENSE.md +0 -21
  351. package/node_modules/@xmldom/is-dom-node/README.md +0 -91
  352. package/node_modules/@xmldom/is-dom-node/dist/index.d.ts +0 -33
  353. package/node_modules/@xmldom/is-dom-node/dist/index.js +0 -91
  354. package/node_modules/@xmldom/is-dom-node/dist/index.js.map +0 -1
  355. package/node_modules/@xmldom/is-dom-node/package.json +0 -69
  356. package/node_modules/@xmldom/xmldom/CHANGELOG.md +0 -468
  357. package/node_modules/@xmldom/xmldom/LICENSE +0 -8
  358. package/node_modules/@xmldom/xmldom/SECURITY.md +0 -50
  359. package/node_modules/@xmldom/xmldom/index.d.ts +0 -43
  360. package/node_modules/@xmldom/xmldom/lib/.eslintrc.yml +0 -2
  361. package/node_modules/@xmldom/xmldom/lib/conventions.js +0 -203
  362. package/node_modules/@xmldom/xmldom/lib/dom-parser.js +0 -322
  363. package/node_modules/@xmldom/xmldom/lib/dom.js +0 -1879
  364. package/node_modules/@xmldom/xmldom/lib/entities.js +0 -2166
  365. package/node_modules/@xmldom/xmldom/lib/index.js +0 -4
  366. package/node_modules/@xmldom/xmldom/lib/sax.js +0 -662
  367. package/node_modules/@xmldom/xmldom/package.json +0 -71
  368. package/node_modules/@xmldom/xmldom/readme.md +0 -356
  369. package/node_modules/esprima/ChangeLog +0 -235
  370. package/node_modules/esprima/LICENSE.BSD +0 -21
  371. package/node_modules/esprima/README.md +0 -46
  372. package/node_modules/esprima/bin/esparse.js +0 -139
  373. package/node_modules/esprima/bin/esvalidate.js +0 -236
  374. package/node_modules/esprima/dist/esprima.js +0 -6709
  375. package/node_modules/esprima/package.json +0 -112
  376. package/node_modules/node-forge/LICENSE +0 -331
  377. package/node_modules/node-forge/README.md +0 -2071
  378. package/node_modules/node-forge/dist/forge.all.min.js +0 -2
  379. package/node_modules/node-forge/dist/forge.all.min.js.map +0 -1
  380. package/node_modules/node-forge/dist/forge.min.js +0 -2
  381. package/node_modules/node-forge/dist/forge.min.js.map +0 -1
  382. package/node_modules/node-forge/dist/prime.worker.min.js +0 -2
  383. package/node_modules/node-forge/dist/prime.worker.min.js.map +0 -1
  384. package/node_modules/node-forge/flash/swf/SocketPool.swf +0 -0
  385. package/node_modules/node-forge/lib/aes.js +0 -1091
  386. package/node_modules/node-forge/lib/aesCipherSuites.js +0 -282
  387. package/node_modules/node-forge/lib/asn1-validator.js +0 -91
  388. package/node_modules/node-forge/lib/asn1.js +0 -1503
  389. package/node_modules/node-forge/lib/baseN.js +0 -186
  390. package/node_modules/node-forge/lib/cipher.js +0 -230
  391. package/node_modules/node-forge/lib/cipherModes.js +0 -999
  392. package/node_modules/node-forge/lib/des.js +0 -496
  393. package/node_modules/node-forge/lib/ed25519.js +0 -1072
  394. package/node_modules/node-forge/lib/forge.js +0 -13
  395. package/node_modules/node-forge/lib/form.js +0 -149
  396. package/node_modules/node-forge/lib/hmac.js +0 -146
  397. package/node_modules/node-forge/lib/http.js +0 -1346
  398. package/node_modules/node-forge/lib/index.all.js +0 -16
  399. package/node_modules/node-forge/lib/index.js +0 -33
  400. package/node_modules/node-forge/lib/jsbn.js +0 -1264
  401. package/node_modules/node-forge/lib/kem.js +0 -168
  402. package/node_modules/node-forge/lib/log.js +0 -319
  403. package/node_modules/node-forge/lib/md.all.js +0 -13
  404. package/node_modules/node-forge/lib/md.js +0 -11
  405. package/node_modules/node-forge/lib/md5.js +0 -289
  406. package/node_modules/node-forge/lib/mgf.js +0 -12
  407. package/node_modules/node-forge/lib/mgf1.js +0 -57
  408. package/node_modules/node-forge/lib/oids.js +0 -179
  409. package/node_modules/node-forge/lib/pbe.js +0 -1023
  410. package/node_modules/node-forge/lib/pbkdf2.js +0 -211
  411. package/node_modules/node-forge/lib/pem.js +0 -237
  412. package/node_modules/node-forge/lib/pkcs1.js +0 -276
  413. package/node_modules/node-forge/lib/pkcs12.js +0 -1078
  414. package/node_modules/node-forge/lib/pkcs7.js +0 -1260
  415. package/node_modules/node-forge/lib/pkcs7asn1.js +0 -410
  416. package/node_modules/node-forge/lib/pki.js +0 -102
  417. package/node_modules/node-forge/lib/prime.js +0 -297
  418. package/node_modules/node-forge/lib/prime.worker.js +0 -168
  419. package/node_modules/node-forge/lib/prng.js +0 -419
  420. package/node_modules/node-forge/lib/pss.js +0 -241
  421. package/node_modules/node-forge/lib/random.js +0 -191
  422. package/node_modules/node-forge/lib/rc2.js +0 -410
  423. package/node_modules/node-forge/lib/rsa.js +0 -1949
  424. package/node_modules/node-forge/lib/sha1.js +0 -319
  425. package/node_modules/node-forge/lib/sha256.js +0 -327
  426. package/node_modules/node-forge/lib/sha512.js +0 -561
  427. package/node_modules/node-forge/lib/socket.js +0 -287
  428. package/node_modules/node-forge/lib/ssh.js +0 -236
  429. package/node_modules/node-forge/lib/tls.js +0 -4282
  430. package/node_modules/node-forge/lib/tlssocket.js +0 -249
  431. package/node_modules/node-forge/lib/util.js +0 -2652
  432. package/node_modules/node-forge/lib/x509.js +0 -3242
  433. package/node_modules/node-forge/lib/xhr.js +0 -738
  434. package/node_modules/node-forge/package.json +0 -123
  435. package/node_modules/sprintf-js/.npmignore +0 -1
  436. package/node_modules/sprintf-js/LICENSE +0 -24
  437. package/node_modules/sprintf-js/README.md +0 -88
  438. package/node_modules/sprintf-js/bower.json +0 -14
  439. package/node_modules/sprintf-js/demo/angular.html +0 -20
  440. package/node_modules/sprintf-js/dist/angular-sprintf.min.js +0 -4
  441. package/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +0 -1
  442. package/node_modules/sprintf-js/dist/angular-sprintf.min.map +0 -1
  443. package/node_modules/sprintf-js/dist/sprintf.min.js +0 -4
  444. package/node_modules/sprintf-js/dist/sprintf.min.js.map +0 -1
  445. package/node_modules/sprintf-js/dist/sprintf.min.map +0 -1
  446. package/node_modules/sprintf-js/gruntfile.js +0 -36
  447. package/node_modules/sprintf-js/package.json +0 -22
  448. package/node_modules/sprintf-js/src/angular-sprintf.js +0 -18
  449. package/node_modules/sprintf-js/src/sprintf.js +0 -208
  450. package/node_modules/sprintf-js/test/test.js +0 -82
  451. package/node_modules/xml-crypto/LICENSE +0 -22
  452. package/node_modules/xml-crypto/README.md +0 -557
  453. package/node_modules/xml-crypto/lib/c14n-canonicalization.d.ts +0 -39
  454. package/node_modules/xml-crypto/lib/c14n-canonicalization.js +0 -230
  455. package/node_modules/xml-crypto/lib/c14n-canonicalization.js.map +0 -1
  456. package/node_modules/xml-crypto/lib/enveloped-signature.d.ts +0 -7
  457. package/node_modules/xml-crypto/lib/enveloped-signature.js +0 -43
  458. package/node_modules/xml-crypto/lib/enveloped-signature.js.map +0 -1
  459. package/node_modules/xml-crypto/lib/exclusive-canonicalization.d.ts +0 -38
  460. package/node_modules/xml-crypto/lib/exclusive-canonicalization.js +0 -246
  461. package/node_modules/xml-crypto/lib/exclusive-canonicalization.js.map +0 -1
  462. package/node_modules/xml-crypto/lib/hash-algorithms.d.ts +0 -13
  463. package/node_modules/xml-crypto/lib/hash-algorithms.js +0 -47
  464. package/node_modules/xml-crypto/lib/hash-algorithms.js.map +0 -1
  465. package/node_modules/xml-crypto/lib/index.d.ts +0 -5
  466. package/node_modules/xml-crypto/lib/index.js +0 -28
  467. package/node_modules/xml-crypto/lib/index.js.map +0 -1
  468. package/node_modules/xml-crypto/lib/signature-algorithms.d.ts +0 -47
  469. package/node_modules/xml-crypto/lib/signature-algorithms.js +0 -86
  470. package/node_modules/xml-crypto/lib/signature-algorithms.js.map +0 -1
  471. package/node_modules/xml-crypto/lib/signed-xml.d.ts +0 -225
  472. package/node_modules/xml-crypto/lib/signed-xml.js +0 -960
  473. package/node_modules/xml-crypto/lib/signed-xml.js.map +0 -1
  474. package/node_modules/xml-crypto/lib/types.d.ts +0 -125
  475. package/node_modules/xml-crypto/lib/types.js +0 -57
  476. package/node_modules/xml-crypto/lib/types.js.map +0 -1
  477. package/node_modules/xml-crypto/lib/utils.d.ts +0 -65
  478. package/node_modules/xml-crypto/lib/utils.js +0 -256
  479. package/node_modules/xml-crypto/lib/utils.js.map +0 -1
  480. package/node_modules/xml-crypto/node_modules/xpath/LICENSE +0 -22
  481. package/node_modules/xml-crypto/node_modules/xpath/README.md +0 -133
  482. package/node_modules/xml-crypto/node_modules/xpath/docs/XPathEvaluator.md +0 -62
  483. package/node_modules/xml-crypto/node_modules/xpath/docs/XPathResult.md +0 -47
  484. package/node_modules/xml-crypto/node_modules/xpath/docs/function resolvers.md +0 -88
  485. package/node_modules/xml-crypto/node_modules/xpath/docs/namespace resolvers.md +0 -69
  486. package/node_modules/xml-crypto/node_modules/xpath/docs/parsed expressions.md +0 -21
  487. package/node_modules/xml-crypto/node_modules/xpath/docs/variable resolvers.md +0 -89
  488. package/node_modules/xml-crypto/node_modules/xpath/docs/xpath methods.md +0 -39
  489. package/node_modules/xml-crypto/node_modules/xpath/package.json +0 -39
  490. package/node_modules/xml-crypto/node_modules/xpath/test.js +0 -1186
  491. package/node_modules/xml-crypto/node_modules/xpath/xpath.d.ts +0 -51
  492. package/node_modules/xml-crypto/node_modules/xpath/xpath.js +0 -4938
  493. package/node_modules/xml-crypto/package.json +0 -73
  494. package/node_modules/xmlbuilder2/CHANGELOG.md +0 -309
  495. package/node_modules/xmlbuilder2/LICENSE +0 -21
  496. package/node_modules/xmlbuilder2/README.md +0 -183
  497. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctions.d.ts +0 -236
  498. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctions.js +0 -108
  499. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctions.js.map +0 -1
  500. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctionsCB.d.ts +0 -17
  501. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctionsCB.js +0 -26
  502. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctionsCB.js.map +0 -1
  503. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.d.ts +0 -124
  504. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.js +0 -782
  505. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.js.map +0 -1
  506. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderImpl.d.ts +0 -143
  507. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderImpl.js +0 -841
  508. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderImpl.js.map +0 -1
  509. package/node_modules/xmlbuilder2/lib/builder/dom.d.ts +0 -8
  510. package/node_modules/xmlbuilder2/lib/builder/dom.js +0 -67
  511. package/node_modules/xmlbuilder2/lib/builder/dom.js.map +0 -1
  512. package/node_modules/xmlbuilder2/lib/builder/index.d.ts +0 -4
  513. package/node_modules/xmlbuilder2/lib/builder/index.js +0 -15
  514. package/node_modules/xmlbuilder2/lib/builder/index.js.map +0 -1
  515. package/node_modules/xmlbuilder2/lib/constants.d.ts +0 -1
  516. package/node_modules/xmlbuilder2/lib/constants.js +0 -4
  517. package/node_modules/xmlbuilder2/lib/constants.js.map +0 -1
  518. package/node_modules/xmlbuilder2/lib/index.d.ts +0 -1
  519. package/node_modules/xmlbuilder2/lib/index.js +0 -10
  520. package/node_modules/xmlbuilder2/lib/index.js.map +0 -1
  521. package/node_modules/xmlbuilder2/lib/interfaces.d.ts +0 -1355
  522. package/node_modules/xmlbuilder2/lib/interfaces.js +0 -76
  523. package/node_modules/xmlbuilder2/lib/interfaces.js.map +0 -1
  524. package/node_modules/xmlbuilder2/lib/readers/BaseReader.d.ts +0 -109
  525. package/node_modules/xmlbuilder2/lib/readers/BaseReader.js +0 -167
  526. package/node_modules/xmlbuilder2/lib/readers/BaseReader.js.map +0 -1
  527. package/node_modules/xmlbuilder2/lib/readers/JSONReader.d.ts +0 -14
  528. package/node_modules/xmlbuilder2/lib/readers/JSONReader.js +0 -38
  529. package/node_modules/xmlbuilder2/lib/readers/JSONReader.js.map +0 -1
  530. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.d.ts +0 -15
  531. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.js +0 -168
  532. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.js.map +0 -1
  533. package/node_modules/xmlbuilder2/lib/readers/XMLReader.d.ts +0 -14
  534. package/node_modules/xmlbuilder2/lib/readers/XMLReader.js +0 -206
  535. package/node_modules/xmlbuilder2/lib/readers/XMLReader.js.map +0 -1
  536. package/node_modules/xmlbuilder2/lib/readers/YAMLReader.d.ts +0 -14
  537. package/node_modules/xmlbuilder2/lib/readers/YAMLReader.js +0 -44
  538. package/node_modules/xmlbuilder2/lib/readers/YAMLReader.js.map +0 -1
  539. package/node_modules/xmlbuilder2/lib/readers/index.d.ts +0 -4
  540. package/node_modules/xmlbuilder2/lib/readers/index.js +0 -11
  541. package/node_modules/xmlbuilder2/lib/readers/index.js.map +0 -1
  542. package/node_modules/xmlbuilder2/lib/writers/BaseCBWriter.d.ts +0 -110
  543. package/node_modules/xmlbuilder2/lib/writers/BaseCBWriter.js +0 -23
  544. package/node_modules/xmlbuilder2/lib/writers/BaseCBWriter.js.map +0 -1
  545. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.d.ts +0 -276
  546. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.js +0 -1603
  547. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.js.map +0 -1
  548. package/node_modules/xmlbuilder2/lib/writers/JSONCBWriter.d.ts +0 -68
  549. package/node_modules/xmlbuilder2/lib/writers/JSONCBWriter.js +0 -172
  550. package/node_modules/xmlbuilder2/lib/writers/JSONCBWriter.js.map +0 -1
  551. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.d.ts +0 -67
  552. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.js +0 -222
  553. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.js.map +0 -1
  554. package/node_modules/xmlbuilder2/lib/writers/MapWriter.d.ts +0 -27
  555. package/node_modules/xmlbuilder2/lib/writers/MapWriter.js +0 -84
  556. package/node_modules/xmlbuilder2/lib/writers/MapWriter.js.map +0 -1
  557. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.d.ts +0 -56
  558. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.js +0 -483
  559. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.js.map +0 -1
  560. package/node_modules/xmlbuilder2/lib/writers/XMLCBWriter.d.ts +0 -51
  561. package/node_modules/xmlbuilder2/lib/writers/XMLCBWriter.js +0 -165
  562. package/node_modules/xmlbuilder2/lib/writers/XMLCBWriter.js.map +0 -1
  563. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.d.ts +0 -60
  564. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.js +0 -236
  565. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.js.map +0 -1
  566. package/node_modules/xmlbuilder2/lib/writers/YAMLCBWriter.d.ts +0 -61
  567. package/node_modules/xmlbuilder2/lib/writers/YAMLCBWriter.js +0 -161
  568. package/node_modules/xmlbuilder2/lib/writers/YAMLCBWriter.js.map +0 -1
  569. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.d.ts +0 -55
  570. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.js +0 -186
  571. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.js.map +0 -1
  572. package/node_modules/xmlbuilder2/lib/writers/index.d.ts +0 -5
  573. package/node_modules/xmlbuilder2/lib/writers/index.js +0 -13
  574. package/node_modules/xmlbuilder2/lib/writers/index.js.map +0 -1
  575. package/node_modules/xmlbuilder2/lib/xmlbuilder2.min.js +0 -8
  576. package/node_modules/xmlbuilder2/node_modules/argparse/CHANGELOG.md +0 -185
  577. package/node_modules/xmlbuilder2/node_modules/argparse/LICENSE +0 -21
  578. package/node_modules/xmlbuilder2/node_modules/argparse/README.md +0 -257
  579. package/node_modules/xmlbuilder2/node_modules/argparse/index.js +0 -3
  580. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/append/constant.js +0 -47
  581. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/append.js +0 -53
  582. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/count.js +0 -40
  583. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/help.js +0 -47
  584. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store/constant.js +0 -43
  585. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store/false.js +0 -27
  586. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store/true.js +0 -26
  587. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store.js +0 -50
  588. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/subparsers.js +0 -149
  589. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/version.js +0 -47
  590. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action.js +0 -146
  591. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action_container.js +0 -482
  592. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argparse.js +0 -14
  593. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument/error.js +0 -50
  594. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument/exclusive.js +0 -54
  595. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument/group.js +0 -75
  596. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument_parser.js +0 -1161
  597. package/node_modules/xmlbuilder2/node_modules/argparse/lib/const.js +0 -21
  598. package/node_modules/xmlbuilder2/node_modules/argparse/lib/help/added_formatters.js +0 -87
  599. package/node_modules/xmlbuilder2/node_modules/argparse/lib/help/formatter.js +0 -795
  600. package/node_modules/xmlbuilder2/node_modules/argparse/lib/namespace.js +0 -76
  601. package/node_modules/xmlbuilder2/node_modules/argparse/lib/utils.js +0 -57
  602. package/node_modules/xmlbuilder2/node_modules/argparse/package.json +0 -34
  603. package/node_modules/xmlbuilder2/node_modules/js-yaml/CHANGELOG.md +0 -557
  604. package/node_modules/xmlbuilder2/node_modules/js-yaml/LICENSE +0 -21
  605. package/node_modules/xmlbuilder2/node_modules/js-yaml/README.md +0 -299
  606. package/node_modules/xmlbuilder2/node_modules/js-yaml/bin/js-yaml.js +0 -132
  607. package/node_modules/xmlbuilder2/node_modules/js-yaml/dist/js-yaml.js +0 -3989
  608. package/node_modules/xmlbuilder2/node_modules/js-yaml/dist/js-yaml.min.js +0 -1
  609. package/node_modules/xmlbuilder2/node_modules/js-yaml/index.js +0 -7
  610. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/common.js +0 -59
  611. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/dumper.js +0 -850
  612. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/exception.js +0 -43
  613. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/loader.js +0 -1644
  614. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/mark.js +0 -76
  615. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/core.js +0 -18
  616. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +0 -25
  617. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +0 -28
  618. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +0 -17
  619. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/json.js +0 -25
  620. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema.js +0 -108
  621. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/binary.js +0 -138
  622. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/bool.js +0 -35
  623. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/float.js +0 -116
  624. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/int.js +0 -173
  625. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/js/function.js +0 -93
  626. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +0 -60
  627. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +0 -28
  628. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/map.js +0 -8
  629. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/merge.js +0 -12
  630. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/null.js +0 -34
  631. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/omap.js +0 -44
  632. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/pairs.js +0 -53
  633. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/seq.js +0 -8
  634. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/set.js +0 -29
  635. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/str.js +0 -8
  636. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +0 -88
  637. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type.js +0 -61
  638. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml.js +0 -39
  639. package/node_modules/xmlbuilder2/node_modules/js-yaml/package.json +0 -49
  640. package/node_modules/xmlbuilder2/package.json +0 -82
  641. package/node_modules/xpath/LICENSE +0 -22
  642. package/node_modules/xpath/README.md +0 -133
  643. package/node_modules/xpath/package.json +0 -43
  644. package/node_modules/xpath/xpath.d.ts +0 -51
  645. package/node_modules/xpath/xpath.js +0 -5041
@@ -1,960 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SignedXml = void 0;
4
- const isDomNode = require("@xmldom/is-dom-node");
5
- const xmldom = require("@xmldom/xmldom");
6
- const util_1 = require("util");
7
- const xpath = require("xpath");
8
- const c14n = require("./c14n-canonicalization");
9
- const envelopedSignatures = require("./enveloped-signature");
10
- const execC14n = require("./exclusive-canonicalization");
11
- const hashAlgorithms = require("./hash-algorithms");
12
- const signatureAlgorithms = require("./signature-algorithms");
13
- const utils = require("./utils");
14
- class SignedXml {
15
- /**
16
- * The SignedXml constructor provides an abstraction for sign and verify xml documents. The object is constructed using
17
- * @param options {@link SignedXmlOptions}
18
- */
19
- constructor(options = {}) {
20
- /**
21
- * One of the supported signature algorithms.
22
- * @see {@link SignatureAlgorithmType}
23
- */
24
- this.signatureAlgorithm = undefined;
25
- /**
26
- * Rules used to convert an XML document into its canonical form.
27
- */
28
- this.canonicalizationAlgorithm = undefined;
29
- /**
30
- * It specifies a list of namespace prefixes that should be considered "inclusive" during the canonicalization process.
31
- */
32
- this.inclusiveNamespacesPrefixList = [];
33
- this.namespaceResolver = {
34
- lookupNamespaceURI: function ( /* prefix */) {
35
- throw new Error("Not implemented");
36
- },
37
- };
38
- this.implicitTransforms = [];
39
- this.keyInfoAttributes = {};
40
- this.getKeyInfoContent = SignedXml.getKeyInfoContent;
41
- this.getCertFromKeyInfo = SignedXml.getCertFromKeyInfo;
42
- // Internal state
43
- this.id = 0;
44
- this.signedXml = "";
45
- this.signatureXml = "";
46
- this.signatureNode = null;
47
- this.signatureValue = "";
48
- this.originalXmlWithIds = "";
49
- this.keyInfo = null;
50
- /**
51
- * Contains the references that were signed.
52
- * @see {@link Reference}
53
- */
54
- this.references = [];
55
- /**
56
- * Contains the canonicalized XML of the references that were validly signed.
57
- *
58
- * This populates with the canonical XML of the reference only after
59
- * verifying the signature is cryptographically authentic.
60
- */
61
- this.signedReferences = [];
62
- /**
63
- * To add a new transformation algorithm create a new class that implements the {@link TransformationAlgorithm} interface, and register it here. More info: {@link https://github.com/node-saml/xml-crypto#customizing-algorithms|Customizing Algorithms}
64
- */
65
- this.CanonicalizationAlgorithms = {
66
- "http://www.w3.org/TR/2001/REC-xml-c14n-20010315": c14n.C14nCanonicalization,
67
- "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments": c14n.C14nCanonicalizationWithComments,
68
- "http://www.w3.org/2001/10/xml-exc-c14n#": execC14n.ExclusiveCanonicalization,
69
- "http://www.w3.org/2001/10/xml-exc-c14n#WithComments": execC14n.ExclusiveCanonicalizationWithComments,
70
- "http://www.w3.org/2000/09/xmldsig#enveloped-signature": envelopedSignatures.EnvelopedSignature,
71
- };
72
- // TODO: In v7.x we may consider deprecating sha1
73
- /**
74
- * To add a new hash algorithm create a new class that implements the {@link HashAlgorithm} interface, and register it here. More info: {@link https://github.com/node-saml/xml-crypto#customizing-algorithms|Customizing Algorithms}
75
- */
76
- this.HashAlgorithms = {
77
- "http://www.w3.org/2000/09/xmldsig#sha1": hashAlgorithms.Sha1,
78
- "http://www.w3.org/2001/04/xmlenc#sha256": hashAlgorithms.Sha256,
79
- "http://www.w3.org/2001/04/xmlenc#sha512": hashAlgorithms.Sha512,
80
- };
81
- // TODO: In v7.x we may consider deprecating sha1
82
- /**
83
- * To add a new signature algorithm create a new class that implements the {@link SignatureAlgorithm} interface, and register it here. More info: {@link https://github.com/node-saml/xml-crypto#customizing-algorithms|Customizing Algorithms}
84
- */
85
- this.SignatureAlgorithms = {
86
- "http://www.w3.org/2000/09/xmldsig#rsa-sha1": signatureAlgorithms.RsaSha1,
87
- "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256": signatureAlgorithms.RsaSha256,
88
- "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512": signatureAlgorithms.RsaSha512,
89
- // Disabled by default due to key confusion concerns.
90
- // 'http://www.w3.org/2000/09/xmldsig#hmac-sha1': SignatureAlgorithms.HmacSha1
91
- };
92
- const { idMode, idAttribute, privateKey, publicCert, signatureAlgorithm, canonicalizationAlgorithm, inclusiveNamespacesPrefixList, implicitTransforms, keyInfoAttributes, getKeyInfoContent, getCertFromKeyInfo, } = options;
93
- // Options
94
- this.idMode = idMode;
95
- this.idAttributes = ["Id", "ID", "id"];
96
- if (idAttribute) {
97
- this.idAttributes.unshift(idAttribute);
98
- }
99
- this.privateKey = privateKey;
100
- this.publicCert = publicCert;
101
- this.signatureAlgorithm = signatureAlgorithm ?? this.signatureAlgorithm;
102
- this.canonicalizationAlgorithm = canonicalizationAlgorithm;
103
- if (typeof inclusiveNamespacesPrefixList === "string") {
104
- this.inclusiveNamespacesPrefixList = inclusiveNamespacesPrefixList.split(" ");
105
- }
106
- else if (utils.isArrayHasLength(inclusiveNamespacesPrefixList)) {
107
- this.inclusiveNamespacesPrefixList = inclusiveNamespacesPrefixList;
108
- }
109
- this.implicitTransforms = implicitTransforms ?? this.implicitTransforms;
110
- this.keyInfoAttributes = keyInfoAttributes ?? this.keyInfoAttributes;
111
- this.getKeyInfoContent = getKeyInfoContent ?? this.getKeyInfoContent;
112
- this.getCertFromKeyInfo = getCertFromKeyInfo ?? SignedXml.noop;
113
- this.CanonicalizationAlgorithms;
114
- this.HashAlgorithms;
115
- this.SignatureAlgorithms;
116
- }
117
- /**
118
- * Due to key-confusion issues, it's risky to have both hmac
119
- * and digital signature algorithms enabled at the same time.
120
- * This enables HMAC and disables other signing algorithms.
121
- */
122
- enableHMAC() {
123
- this.SignatureAlgorithms = {
124
- "http://www.w3.org/2000/09/xmldsig#hmac-sha1": signatureAlgorithms.HmacSha1,
125
- };
126
- this.getKeyInfoContent = SignedXml.noop;
127
- }
128
- /**
129
- * Builds the contents of a KeyInfo element as an XML string.
130
- *
131
- * For example, if the value of the prefix argument is 'foo', then
132
- * the resultant XML string will be "<foo:X509Data></foo:X509Data>"
133
- *
134
- * @return an XML string representation of the contents of a KeyInfo element, or `null` if no `KeyInfo` element should be included
135
- */
136
- static getKeyInfoContent({ publicCert, prefix }) {
137
- if (publicCert == null) {
138
- return null;
139
- }
140
- prefix = prefix ? `${prefix}:` : "";
141
- let x509Certs = "";
142
- if (Buffer.isBuffer(publicCert)) {
143
- publicCert = publicCert.toString("latin1");
144
- }
145
- let publicCertMatches = [];
146
- if (typeof publicCert === "string") {
147
- publicCertMatches = publicCert.match(utils.EXTRACT_X509_CERTS) || [];
148
- }
149
- if (publicCertMatches.length > 0) {
150
- x509Certs = publicCertMatches
151
- .map((c) => `<${prefix}X509Certificate>${utils
152
- .pemToDer(c)
153
- .toString("base64")}</${prefix}X509Certificate>`)
154
- .join("");
155
- }
156
- return `<${prefix}X509Data>${x509Certs}</${prefix}X509Data>`;
157
- }
158
- /**
159
- * Returns the value of the signing certificate based on the contents of the
160
- * specified KeyInfo.
161
- *
162
- * @param keyInfo KeyInfo element (@see https://www.w3.org/TR/2008/REC-xmldsig-core-20080610/#sec-X509Data)
163
- * @return the signing certificate as a string in PEM format
164
- */
165
- static getCertFromKeyInfo(keyInfo) {
166
- if (keyInfo != null) {
167
- const cert = xpath.select1(".//*[local-name(.)='X509Certificate']", keyInfo);
168
- if (isDomNode.isNodeLike(cert)) {
169
- return utils.derToPem(cert.textContent ?? "", "CERTIFICATE");
170
- }
171
- }
172
- return null;
173
- }
174
- checkSignature(xml, callback) {
175
- if (callback != null && typeof callback !== "function") {
176
- throw new Error("Last parameter must be a callback function");
177
- }
178
- this.signedXml = xml;
179
- const doc = new xmldom.DOMParser().parseFromString(xml);
180
- // Reset the references as only references from our re-parsed signedInfo node can be trusted
181
- this.references = [];
182
- const unverifiedSignedInfoCanon = this.getCanonSignedInfoXml(doc);
183
- if (!unverifiedSignedInfoCanon) {
184
- if (callback) {
185
- callback(new Error("Canonical signed info cannot be empty"), false);
186
- return;
187
- }
188
- throw new Error("Canonical signed info cannot be empty");
189
- }
190
- // unsigned, verify later to keep with consistent callback behavior
191
- const parsedUnverifiedSignedInfo = new xmldom.DOMParser().parseFromString(unverifiedSignedInfoCanon, "text/xml");
192
- const unverifiedSignedInfoDoc = parsedUnverifiedSignedInfo.documentElement;
193
- if (!unverifiedSignedInfoDoc) {
194
- if (callback) {
195
- callback(new Error("Could not parse unverifiedSignedInfoCanon into a document"), false);
196
- return;
197
- }
198
- throw new Error("Could not parse unverifiedSignedInfoCanon into a document");
199
- }
200
- const references = utils.findChildren(unverifiedSignedInfoDoc, "Reference");
201
- if (!utils.isArrayHasLength(references)) {
202
- if (callback) {
203
- callback(new Error("could not find any Reference elements"), false);
204
- return;
205
- }
206
- throw new Error("could not find any Reference elements");
207
- }
208
- // TODO: In a future release we'd like to load the Signature and its References at the same time,
209
- // however, in the `.loadSignature()` method we don't have the entire document,
210
- // which we need to to keep the inclusive namespaces
211
- for (const reference of references) {
212
- this.loadReference(reference);
213
- }
214
- /* eslint-disable-next-line deprecation/deprecation */
215
- if (!this.getReferences().every((ref) => this.validateReference(ref, doc))) {
216
- /* Trustworthiness can only be determined if SignedInfo's (which holds References' DigestValue(s)
217
- which were validated at this stage) signature is valid. Execution does not proceed to validate
218
- signature phase thus each References' DigestValue must be considered to be untrusted (attacker
219
- might have injected any data with new new references and/or recalculated new DigestValue for
220
- altered Reference(s)). Returning any content via `signedReferences` would give false sense of
221
- trustworthiness if/when SignedInfo's (which holds references' DigestValues) signature is not
222
- valid(ated). Put simply: if one fails, they are all not trustworthy.
223
- */
224
- this.signedReferences = [];
225
- this.references.forEach((ref) => {
226
- ref.signedReference = undefined;
227
- });
228
- // TODO: add this breaking change here later on for even more security: `this.references = [];`
229
- if (callback) {
230
- callback(new Error("Could not validate all references"), false);
231
- return;
232
- }
233
- // We return false because some references validated, but not all
234
- // We should actually be throwing an error here, but that would be a breaking change
235
- // See https://www.w3.org/TR/xmldsig-core/#sec-CoreValidation
236
- return false;
237
- }
238
- // (Stage B authentication step, show that the `signedInfoCanon` is signed)
239
- // First find the key & signature algorithm, these should match
240
- // Stage B: Take the signature algorithm and key and verify the `SignatureValue` against the canonicalized `SignedInfo`
241
- const signer = this.findSignatureAlgorithm(this.signatureAlgorithm);
242
- const key = this.getCertFromKeyInfo(this.keyInfo) || this.publicCert || this.privateKey;
243
- if (key == null) {
244
- throw new Error("KeyInfo or publicCert or privateKey is required to validate signature");
245
- }
246
- // Check the signature verification to know whether to reset signature value or not.
247
- const sigRes = signer.verifySignature(unverifiedSignedInfoCanon, key, this.signatureValue);
248
- if (sigRes === true) {
249
- if (callback) {
250
- callback(null, true);
251
- }
252
- else {
253
- return true;
254
- }
255
- }
256
- else {
257
- // Ideally, we would start by verifying the `signedInfoCanon` first,
258
- // but that may cause some breaking changes, so we'll handle that in v7.x.
259
- // If we were validating `signedInfoCanon` first, we wouldn't have to reset this array.
260
- this.signedReferences = [];
261
- this.references.forEach((ref) => {
262
- ref.signedReference = undefined;
263
- });
264
- // TODO: add this breaking change here later on for even more security: `this.references = [];`
265
- if (callback) {
266
- callback(new Error(`invalid signature: the signature value ${this.signatureValue} is incorrect`));
267
- return; // return early
268
- }
269
- else {
270
- throw new Error(`invalid signature: the signature value ${this.signatureValue} is incorrect`);
271
- }
272
- }
273
- }
274
- getCanonSignedInfoXml(doc) {
275
- if (this.signatureNode == null) {
276
- throw new Error("No signature found.");
277
- }
278
- if (typeof this.canonicalizationAlgorithm !== "string") {
279
- throw new Error("Missing canonicalizationAlgorithm when trying to get signed info for XML");
280
- }
281
- const signedInfo = utils.findChildren(this.signatureNode, "SignedInfo");
282
- if (signedInfo.length === 0) {
283
- throw new Error("could not find SignedInfo element in the message");
284
- }
285
- if (signedInfo.length > 1) {
286
- throw new Error("could not get canonicalized signed info for a signature that contains multiple SignedInfo nodes");
287
- }
288
- if (this.canonicalizationAlgorithm === "http://www.w3.org/TR/2001/REC-xml-c14n-20010315" ||
289
- this.canonicalizationAlgorithm ===
290
- "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments") {
291
- if (!doc || typeof doc !== "object") {
292
- throw new Error("When canonicalization method is non-exclusive, whole xml dom must be provided as an argument");
293
- }
294
- }
295
- /**
296
- * Search for ancestor namespaces before canonicalization.
297
- */
298
- const ancestorNamespaces = utils.findAncestorNs(doc, "//*[local-name()='SignedInfo']");
299
- const c14nOptions = {
300
- ancestorNamespaces: ancestorNamespaces,
301
- };
302
- return this.getCanonXml([this.canonicalizationAlgorithm], signedInfo[0], c14nOptions);
303
- }
304
- getCanonReferenceXml(doc, ref, node) {
305
- /**
306
- * Search for ancestor namespaces before canonicalization.
307
- */
308
- if (Array.isArray(ref.transforms)) {
309
- ref.ancestorNamespaces = utils.findAncestorNs(doc, ref.xpath, this.namespaceResolver);
310
- }
311
- const c14nOptions = {
312
- inclusiveNamespacesPrefixList: ref.inclusiveNamespacesPrefixList,
313
- ancestorNamespaces: ref.ancestorNamespaces,
314
- };
315
- return this.getCanonXml(ref.transforms, node, c14nOptions);
316
- }
317
- calculateSignatureValue(doc, callback) {
318
- const signedInfoCanon = this.getCanonSignedInfoXml(doc);
319
- const signer = this.findSignatureAlgorithm(this.signatureAlgorithm);
320
- if (this.privateKey == null) {
321
- throw new Error("Private key is required to compute signature");
322
- }
323
- if (typeof callback === "function") {
324
- signer.getSignature(signedInfoCanon, this.privateKey, callback);
325
- }
326
- else {
327
- this.signatureValue = signer.getSignature(signedInfoCanon, this.privateKey);
328
- }
329
- }
330
- findSignatureAlgorithm(name) {
331
- if (name == null) {
332
- throw new Error("signatureAlgorithm is required");
333
- }
334
- const algo = this.SignatureAlgorithms[name];
335
- if (algo) {
336
- return new algo();
337
- }
338
- else {
339
- throw new Error(`signature algorithm '${name}' is not supported`);
340
- }
341
- }
342
- findCanonicalizationAlgorithm(name) {
343
- if (name != null) {
344
- const algo = this.CanonicalizationAlgorithms[name];
345
- if (algo) {
346
- return new algo();
347
- }
348
- }
349
- throw new Error(`canonicalization algorithm '${name}' is not supported`);
350
- }
351
- findHashAlgorithm(name) {
352
- const algo = this.HashAlgorithms[name];
353
- if (algo) {
354
- return new algo();
355
- }
356
- else {
357
- throw new Error(`hash algorithm '${name}' is not supported`);
358
- }
359
- }
360
- validateElementAgainstReferences(elemOrXpath, doc) {
361
- let elem;
362
- if (typeof elemOrXpath === "string") {
363
- const firstElem = xpath.select1(elemOrXpath, doc);
364
- isDomNode.assertIsElementNode(firstElem);
365
- elem = firstElem;
366
- }
367
- else {
368
- elem = elemOrXpath;
369
- }
370
- /* eslint-disable-next-line deprecation/deprecation */
371
- for (const ref of this.getReferences()) {
372
- const uri = ref.uri?.[0] === "#" ? ref.uri.substring(1) : ref.uri;
373
- for (const attr of this.idAttributes) {
374
- const elemId = elem.getAttribute(attr);
375
- if (uri === elemId) {
376
- ref.xpath = `//*[@*[local-name(.)='${attr}']='${uri}']`;
377
- break; // found the correct element, no need to check further
378
- }
379
- }
380
- const canonXml = this.getCanonReferenceXml(doc, ref, elem);
381
- const hash = this.findHashAlgorithm(ref.digestAlgorithm);
382
- const digest = hash.getHash(canonXml);
383
- if (utils.validateDigestValue(digest, ref.digestValue)) {
384
- return ref;
385
- }
386
- }
387
- throw new Error("No references passed validation");
388
- }
389
- validateReference(ref, doc) {
390
- const uri = ref.uri?.[0] === "#" ? ref.uri.substring(1) : ref.uri;
391
- let elem = null;
392
- if (uri === "") {
393
- elem = xpath.select1("//*", doc);
394
- }
395
- else if (uri?.indexOf("'") !== -1) {
396
- // xpath injection
397
- throw new Error("Cannot validate a uri with quotes inside it");
398
- }
399
- else {
400
- let num_elements_for_id = 0;
401
- for (const attr of this.idAttributes) {
402
- const tmp_elemXpath = `//*[@*[local-name(.)='${attr}']='${uri}']`;
403
- const tmp_elem = xpath.select(tmp_elemXpath, doc);
404
- if (utils.isArrayHasLength(tmp_elem)) {
405
- num_elements_for_id += tmp_elem.length;
406
- if (num_elements_for_id > 1) {
407
- throw new Error("Cannot validate a document which contains multiple elements with the " +
408
- "same value for the ID / Id / Id attributes, in order to prevent " +
409
- "signature wrapping attack.");
410
- }
411
- elem = tmp_elem[0];
412
- ref.xpath = tmp_elemXpath;
413
- }
414
- }
415
- }
416
- ref.getValidatedNode = (0, util_1.deprecate)((xpathSelector) => {
417
- xpathSelector = xpathSelector || ref.xpath;
418
- if (typeof xpathSelector !== "string" || ref.validationError != null) {
419
- return null;
420
- }
421
- const selectedValue = xpath.select1(xpathSelector, doc);
422
- return isDomNode.isNodeLike(selectedValue) ? selectedValue : null;
423
- }, "`ref.getValidatedNode()` is deprecated and insecure. Use `ref.signedReference` or `this.getSignedReferences()` instead.");
424
- if (!isDomNode.isNodeLike(elem)) {
425
- const validationError = new Error(`invalid signature: the signature references an element with uri ${ref.uri} but could not find such element in the xml`);
426
- ref.validationError = validationError;
427
- return false;
428
- }
429
- const canonXml = this.getCanonReferenceXml(doc, ref, elem);
430
- const hash = this.findHashAlgorithm(ref.digestAlgorithm);
431
- const digest = hash.getHash(canonXml);
432
- if (!utils.validateDigestValue(digest, ref.digestValue)) {
433
- const validationError = new Error(`invalid signature: for uri ${ref.uri} calculated digest is ${digest} but the xml to validate supplies digest ${ref.digestValue}`);
434
- ref.validationError = validationError;
435
- return false;
436
- }
437
- // This step can only be done after we have verified the `signedInfo`.
438
- // We verified that they have same hash,
439
- // thus the `canonXml` and _only_ the `canonXml` can be trusted.
440
- // Append this to `signedReferences`.
441
- this.signedReferences.push(canonXml);
442
- ref.signedReference = canonXml;
443
- return true;
444
- }
445
- findSignatures(doc) {
446
- const nodes = xpath.select("//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']", doc);
447
- return isDomNode.isArrayOfNodes(nodes) ? nodes : [];
448
- }
449
- /**
450
- * Loads the signature information from the provided XML node or string.
451
- *
452
- * @param signatureNode The XML node or string representing the signature.
453
- */
454
- loadSignature(signatureNode) {
455
- if (typeof signatureNode === "string") {
456
- this.signatureNode = signatureNode = new xmldom.DOMParser().parseFromString(signatureNode);
457
- }
458
- else {
459
- this.signatureNode = signatureNode;
460
- }
461
- this.signatureXml = signatureNode.toString();
462
- const node = xpath.select1(".//*[local-name(.)='CanonicalizationMethod']/@Algorithm", signatureNode);
463
- if (!isDomNode.isNodeLike(node)) {
464
- throw new Error("could not find CanonicalizationMethod/@Algorithm element");
465
- }
466
- if (isDomNode.isAttributeNode(node)) {
467
- this.canonicalizationAlgorithm = node.value;
468
- }
469
- const signatureAlgorithm = xpath.select1(".//*[local-name(.)='SignatureMethod']/@Algorithm", signatureNode);
470
- if (isDomNode.isAttributeNode(signatureAlgorithm)) {
471
- this.signatureAlgorithm = signatureAlgorithm.value;
472
- }
473
- const signedInfoNodes = utils.findChildren(this.signatureNode, "SignedInfo");
474
- if (!utils.isArrayHasLength(signedInfoNodes)) {
475
- throw new Error("no signed info node found");
476
- }
477
- if (signedInfoNodes.length > 1) {
478
- throw new Error("could not load signature that contains multiple SignedInfo nodes");
479
- }
480
- // Try to operate on the c14n version of `signedInfo`. This forces the initial `getReferences()`
481
- // API call to always return references that are loaded under the canonical `SignedInfo`
482
- // in the case that the client access the `.references` **before** signature verification.
483
- // Ensure canonicalization algorithm is exclusive, otherwise we'd need the entire document
484
- let canonicalizationAlgorithmForSignedInfo = this.canonicalizationAlgorithm;
485
- if (!canonicalizationAlgorithmForSignedInfo ||
486
- canonicalizationAlgorithmForSignedInfo ===
487
- "http://www.w3.org/TR/2001/REC-xml-c14n-20010315" ||
488
- canonicalizationAlgorithmForSignedInfo ===
489
- "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments") {
490
- canonicalizationAlgorithmForSignedInfo = "http://www.w3.org/2001/10/xml-exc-c14n#";
491
- }
492
- const temporaryCanonSignedInfo = this.getCanonXml([canonicalizationAlgorithmForSignedInfo], signedInfoNodes[0]);
493
- const temporaryCanonSignedInfoXml = new xmldom.DOMParser().parseFromString(temporaryCanonSignedInfo, "text/xml");
494
- const signedInfoDoc = temporaryCanonSignedInfoXml.documentElement;
495
- this.references = [];
496
- const references = utils.findChildren(signedInfoDoc, "Reference");
497
- if (!utils.isArrayHasLength(references)) {
498
- throw new Error("could not find any Reference elements");
499
- }
500
- for (const reference of references) {
501
- this.loadReference(reference);
502
- }
503
- const signatureValue = xpath.select1(".//*[local-name(.)='SignatureValue']/text()", signatureNode);
504
- if (isDomNode.isTextNode(signatureValue)) {
505
- this.signatureValue = signatureValue.data.replace(/\r?\n/g, "");
506
- }
507
- const keyInfo = xpath.select1(".//*[local-name(.)='KeyInfo']", signatureNode);
508
- if (isDomNode.isNodeLike(keyInfo)) {
509
- this.keyInfo = keyInfo;
510
- }
511
- }
512
- /**
513
- * Load the reference xml node to a model
514
- *
515
- */
516
- loadReference(refNode) {
517
- let nodes = utils.findChildren(refNode, "DigestMethod");
518
- if (nodes.length === 0) {
519
- throw new Error(`could not find DigestMethod in reference ${refNode.toString()}`);
520
- }
521
- const digestAlgoNode = nodes[0];
522
- const attr = utils.findAttr(digestAlgoNode, "Algorithm");
523
- if (!attr) {
524
- throw new Error(`could not find Algorithm attribute in node ${digestAlgoNode.toString()}`);
525
- }
526
- const digestAlgo = attr.value;
527
- nodes = utils.findChildren(refNode, "DigestValue");
528
- if (nodes.length === 0) {
529
- throw new Error(`could not find DigestValue node in reference ${refNode.toString()}`);
530
- }
531
- if (nodes.length > 1) {
532
- throw new Error(`could not load reference for a node that contains multiple DigestValue nodes: ${refNode.toString()}`);
533
- }
534
- const digestValue = nodes[0].textContent;
535
- if (!digestValue) {
536
- throw new Error(`could not find the value of DigestValue in ${refNode.toString()}`);
537
- }
538
- const transforms = [];
539
- let inclusiveNamespacesPrefixList = [];
540
- nodes = utils.findChildren(refNode, "Transforms");
541
- if (nodes.length !== 0) {
542
- const transformsNode = nodes[0];
543
- const transformsAll = utils.findChildren(transformsNode, "Transform");
544
- for (const transform of transformsAll) {
545
- const transformAttr = utils.findAttr(transform, "Algorithm");
546
- if (transformAttr) {
547
- transforms.push(transformAttr.value);
548
- }
549
- }
550
- // This is a little strange, we are looking for children of the last child of `transformsNode`
551
- const inclusiveNamespaces = utils.findChildren(transformsAll[transformsAll.length - 1], "InclusiveNamespaces");
552
- if (utils.isArrayHasLength(inclusiveNamespaces)) {
553
- // Should really only be one prefix list, but maybe there's some circumstances where more than one to let's handle it
554
- inclusiveNamespacesPrefixList = inclusiveNamespaces
555
- .flatMap((namespace) => (namespace.getAttribute("PrefixList") ?? "").split(" "))
556
- .filter((value) => value.length > 0);
557
- }
558
- }
559
- if (utils.isArrayHasLength(this.implicitTransforms)) {
560
- this.implicitTransforms.forEach(function (t) {
561
- transforms.push(t);
562
- });
563
- }
564
- /**
565
- * DigestMethods take an octet stream rather than a node set. If the output of the last transform is a node set, we
566
- * need to canonicalize the node set to an octet stream using non-exclusive canonicalization. If there are no
567
- * transforms, we need to canonicalize because URI dereferencing for a same-document reference will return a node-set.
568
- * @see:
569
- * https://www.w3.org/TR/xmldsig-core1/#sec-DigestMethod
570
- * https://www.w3.org/TR/xmldsig-core1/#sec-ReferenceProcessingModel
571
- * https://www.w3.org/TR/xmldsig-core1/#sec-Same-Document
572
- */
573
- if (transforms.length === 0 ||
574
- transforms[transforms.length - 1] === "http://www.w3.org/2000/09/xmldsig#enveloped-signature") {
575
- transforms.push("http://www.w3.org/TR/2001/REC-xml-c14n-20010315");
576
- }
577
- const refUri = isDomNode.isElementNode(refNode)
578
- ? refNode.getAttribute("URI") || undefined
579
- : undefined;
580
- this.addReference({
581
- transforms,
582
- digestAlgorithm: digestAlgo,
583
- uri: refUri,
584
- digestValue,
585
- inclusiveNamespacesPrefixList,
586
- isEmptyUri: false,
587
- });
588
- }
589
- /**
590
- * Adds a reference to the signature.
591
- *
592
- * @param xpath The XPath expression to select the XML nodes to be referenced.
593
- * @param transforms An array of transform algorithms to be applied to the selected nodes.
594
- * @param digestAlgorithm The digest algorithm to use for computing the digest value.
595
- * @param uri The URI identifier for the reference. If empty, an empty URI will be used.
596
- * @param digestValue The expected digest value for the reference.
597
- * @param inclusiveNamespacesPrefixList The prefix list for inclusive namespace canonicalization.
598
- * @param isEmptyUri Indicates whether the URI is empty. Defaults to `false`.
599
- */
600
- addReference({ xpath, transforms, digestAlgorithm, uri = "", digestValue, inclusiveNamespacesPrefixList = [], isEmptyUri = false, }) {
601
- if (digestAlgorithm == null) {
602
- throw new Error("digestAlgorithm is required");
603
- }
604
- if (!utils.isArrayHasLength(transforms)) {
605
- throw new Error("transforms must contain at least one transform algorithm");
606
- }
607
- this.references.push({
608
- xpath,
609
- transforms,
610
- digestAlgorithm,
611
- uri,
612
- digestValue,
613
- inclusiveNamespacesPrefixList,
614
- isEmptyUri,
615
- getValidatedNode: () => {
616
- throw new Error("Reference has not been validated yet; Did you call `sig.checkSignature()`?");
617
- },
618
- });
619
- }
620
- /**
621
- * Returns the list of references.
622
- */
623
- getReferences() {
624
- // TODO: Refactor once `getValidatedNode` is removed
625
- /* Once we completely remove the deprecated `getValidatedNode()` method,
626
- we can change this to return a clone to prevent accidental mutations,
627
- e.g.:
628
- return [...this.references];
629
- */
630
- return this.references;
631
- }
632
- getSignedReferences() {
633
- return [...this.signedReferences];
634
- }
635
- computeSignature(xml, options, callbackParam) {
636
- let callback;
637
- if (typeof options === "function" && callbackParam == null) {
638
- callback = options;
639
- options = {};
640
- }
641
- else {
642
- callback = callbackParam;
643
- options = (options ?? {});
644
- }
645
- const doc = new xmldom.DOMParser().parseFromString(xml);
646
- let xmlNsAttr = "xmlns";
647
- const signatureAttrs = [];
648
- let currentPrefix;
649
- const validActions = ["append", "prepend", "before", "after"];
650
- const prefix = options.prefix;
651
- const attrs = options.attrs || {};
652
- const location = options.location || {};
653
- const existingPrefixes = options.existingPrefixes || {};
654
- this.namespaceResolver = {
655
- lookupNamespaceURI: function (prefix) {
656
- return prefix ? existingPrefixes[prefix] : null;
657
- },
658
- };
659
- // defaults to the root node
660
- location.reference = location.reference || "/*";
661
- // defaults to append action
662
- location.action = location.action || "append";
663
- if (validActions.indexOf(location.action) === -1) {
664
- const err = new Error(`location.action option has an invalid action: ${location.action}, must be any of the following values: ${validActions.join(", ")}`);
665
- if (!callback) {
666
- throw err;
667
- }
668
- else {
669
- callback(err);
670
- return;
671
- }
672
- }
673
- // automatic insertion of `:`
674
- if (prefix) {
675
- xmlNsAttr += `:${prefix}`;
676
- currentPrefix = `${prefix}:`;
677
- }
678
- else {
679
- currentPrefix = "";
680
- }
681
- Object.keys(attrs).forEach(function (name) {
682
- if (name !== "xmlns" && name !== xmlNsAttr) {
683
- signatureAttrs.push(`${name}="${attrs[name]}"`);
684
- }
685
- });
686
- // add the xml namespace attribute
687
- signatureAttrs.push(`${xmlNsAttr}="http://www.w3.org/2000/09/xmldsig#"`);
688
- let signatureXml = `<${currentPrefix}Signature ${signatureAttrs.join(" ")}>`;
689
- signatureXml += this.createSignedInfo(doc, prefix);
690
- signatureXml += this.getKeyInfo(prefix);
691
- signatureXml += `</${currentPrefix}Signature>`;
692
- this.originalXmlWithIds = doc.toString();
693
- let existingPrefixesString = "";
694
- Object.keys(existingPrefixes).forEach(function (key) {
695
- existingPrefixesString += `xmlns:${key}="${existingPrefixes[key]}" `;
696
- });
697
- // A trick to remove the namespaces that already exist in the xml
698
- // This only works if the prefix and namespace match with those in the xml
699
- const dummySignatureWrapper = `<Dummy ${existingPrefixesString}>${signatureXml}</Dummy>`;
700
- const nodeXml = new xmldom.DOMParser().parseFromString(dummySignatureWrapper);
701
- // Because we are using a dummy wrapper hack described above, we know there will be a `firstChild`
702
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
703
- const signatureDoc = nodeXml.documentElement.firstChild;
704
- const referenceNode = xpath.select1(location.reference, doc);
705
- if (!isDomNode.isNodeLike(referenceNode)) {
706
- const err2 = new Error(`the following xpath cannot be used because it was not found: ${location.reference}`);
707
- if (!callback) {
708
- throw err2;
709
- }
710
- else {
711
- callback(err2);
712
- return;
713
- }
714
- }
715
- if (location.action === "append") {
716
- referenceNode.appendChild(signatureDoc);
717
- }
718
- else if (location.action === "prepend") {
719
- referenceNode.insertBefore(signatureDoc, referenceNode.firstChild);
720
- }
721
- else if (location.action === "before") {
722
- if (referenceNode.parentNode == null) {
723
- throw new Error("`location.reference` refers to the root node (by default), so we can't insert `before`");
724
- }
725
- referenceNode.parentNode.insertBefore(signatureDoc, referenceNode);
726
- }
727
- else if (location.action === "after") {
728
- if (referenceNode.parentNode == null) {
729
- throw new Error("`location.reference` refers to the root node (by default), so we can't insert `after`");
730
- }
731
- referenceNode.parentNode.insertBefore(signatureDoc, referenceNode.nextSibling);
732
- }
733
- this.signatureNode = signatureDoc;
734
- const signedInfoNodes = utils.findChildren(this.signatureNode, "SignedInfo");
735
- if (signedInfoNodes.length === 0) {
736
- const err3 = new Error("could not find SignedInfo element in the message");
737
- if (!callback) {
738
- throw err3;
739
- }
740
- else {
741
- callback(err3);
742
- return;
743
- }
744
- }
745
- const signedInfoNode = signedInfoNodes[0];
746
- if (typeof callback === "function") {
747
- // Asynchronous flow
748
- this.calculateSignatureValue(doc, (err, signature) => {
749
- if (err) {
750
- callback(err);
751
- }
752
- else {
753
- this.signatureValue = signature || "";
754
- signatureDoc.insertBefore(this.createSignature(prefix), signedInfoNode.nextSibling);
755
- this.signatureXml = signatureDoc.toString();
756
- this.signedXml = doc.toString();
757
- callback(null, this);
758
- }
759
- });
760
- }
761
- else {
762
- // Synchronous flow
763
- this.calculateSignatureValue(doc);
764
- signatureDoc.insertBefore(this.createSignature(prefix), signedInfoNode.nextSibling);
765
- this.signatureXml = signatureDoc.toString();
766
- this.signedXml = doc.toString();
767
- }
768
- }
769
- getKeyInfo(prefix) {
770
- const currentPrefix = prefix ? `${prefix}:` : "";
771
- let keyInfoAttrs = "";
772
- if (this.keyInfoAttributes) {
773
- Object.keys(this.keyInfoAttributes).forEach((name) => {
774
- keyInfoAttrs += ` ${name}="${this.keyInfoAttributes[name]}"`;
775
- });
776
- }
777
- const keyInfoContent = this.getKeyInfoContent({ publicCert: this.publicCert, prefix });
778
- if (keyInfoAttrs || keyInfoContent) {
779
- return `<${currentPrefix}KeyInfo${keyInfoAttrs}>${keyInfoContent}</${currentPrefix}KeyInfo>`;
780
- }
781
- return "";
782
- }
783
- /**
784
- * Generate the Reference nodes (as part of the signature process)
785
- *
786
- */
787
- createReferences(doc, prefix) {
788
- let res = "";
789
- prefix = prefix || "";
790
- prefix = prefix ? `${prefix}:` : prefix;
791
- /* eslint-disable-next-line deprecation/deprecation */
792
- for (const ref of this.getReferences()) {
793
- const nodes = xpath.selectWithResolver(ref.xpath ?? "", doc, this.namespaceResolver);
794
- if (!utils.isArrayHasLength(nodes)) {
795
- throw new Error(`the following xpath cannot be signed because it was not found: ${ref.xpath}`);
796
- }
797
- for (const node of nodes) {
798
- if (ref.isEmptyUri) {
799
- res += `<${prefix}Reference URI="">`;
800
- }
801
- else {
802
- const id = this.ensureHasId(node);
803
- ref.uri = id;
804
- res += `<${prefix}Reference URI="#${id}">`;
805
- }
806
- res += `<${prefix}Transforms>`;
807
- for (const trans of ref.transforms || []) {
808
- const transform = this.findCanonicalizationAlgorithm(trans);
809
- res += `<${prefix}Transform Algorithm="${transform.getAlgorithmName()}"`;
810
- if (utils.isArrayHasLength(ref.inclusiveNamespacesPrefixList)) {
811
- res += ">";
812
- res += `<InclusiveNamespaces PrefixList="${ref.inclusiveNamespacesPrefixList.join(" ")}" xmlns="${transform.getAlgorithmName()}"/>`;
813
- res += `</${prefix}Transform>`;
814
- }
815
- else {
816
- res += " />";
817
- }
818
- }
819
- const canonXml = this.getCanonReferenceXml(doc, ref, node);
820
- const digestAlgorithm = this.findHashAlgorithm(ref.digestAlgorithm);
821
- res +=
822
- `</${prefix}Transforms>` +
823
- `<${prefix}DigestMethod Algorithm="${digestAlgorithm.getAlgorithmName()}" />` +
824
- `<${prefix}DigestValue>${digestAlgorithm.getHash(canonXml)}</${prefix}DigestValue>` +
825
- `</${prefix}Reference>`;
826
- }
827
- }
828
- return res;
829
- }
830
- getCanonXml(transforms, node, options = {}) {
831
- options.defaultNsForPrefix = options.defaultNsForPrefix ?? SignedXml.defaultNsForPrefix;
832
- options.signatureNode = this.signatureNode;
833
- const canonXml = node.cloneNode(true); // Deep clone
834
- let transformedXml = canonXml;
835
- transforms.forEach((transformName) => {
836
- if (isDomNode.isNodeLike(transformedXml)) {
837
- // If, after processing, `transformedNode` is a string, we can't do anymore transforms on it
838
- const transform = this.findCanonicalizationAlgorithm(transformName);
839
- transformedXml = transform.process(transformedXml, options);
840
- }
841
- //TODO: currently transform.process may return either Node or String value (enveloped transformation returns Node, exclusive-canonicalization returns String).
842
- //This either needs to be more explicit in the API, or all should return the same.
843
- //exclusive-canonicalization returns String since it builds the Xml by hand. If it had used xmldom it would incorrectly minimize empty tags
844
- //to <x/> instead of <x></x> and also incorrectly handle some delicate line break issues.
845
- //enveloped transformation returns Node since if it would return String consider this case:
846
- //<x xmlns:p='ns'><p:y/></x>
847
- //if only y is the node to sign then a string would be <p:y/> without the definition of the p namespace. probably xmldom toString() should have added it.
848
- });
849
- return transformedXml.toString();
850
- }
851
- /**
852
- * Ensure an element has Id attribute. If not create it with unique value.
853
- * Work with both normal and wssecurity Id flavour
854
- */
855
- ensureHasId(node) {
856
- let attr;
857
- if (this.idMode === "wssecurity") {
858
- attr = utils.findAttr(node, "Id", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd");
859
- }
860
- else {
861
- this.idAttributes.some((idAttribute) => {
862
- attr = utils.findAttr(node, idAttribute);
863
- return !!attr; // This will break the loop as soon as a truthy attr is found.
864
- });
865
- }
866
- if (attr) {
867
- return attr.value;
868
- }
869
- //add the attribute
870
- const id = `_${this.id++}`;
871
- if (this.idMode === "wssecurity") {
872
- node.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:wsu", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd");
873
- node.setAttributeNS("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd", "wsu:Id", id);
874
- }
875
- else {
876
- node.setAttribute("Id", id);
877
- }
878
- return id;
879
- }
880
- /**
881
- * Create the SignedInfo element
882
- *
883
- */
884
- createSignedInfo(doc, prefix) {
885
- if (typeof this.canonicalizationAlgorithm !== "string") {
886
- throw new Error("Missing canonicalizationAlgorithm when trying to create signed info for XML");
887
- }
888
- const transform = this.findCanonicalizationAlgorithm(this.canonicalizationAlgorithm);
889
- const algo = this.findSignatureAlgorithm(this.signatureAlgorithm);
890
- let currentPrefix;
891
- currentPrefix = prefix || "";
892
- currentPrefix = currentPrefix ? `${currentPrefix}:` : currentPrefix;
893
- let res = `<${currentPrefix}SignedInfo>`;
894
- res += `<${currentPrefix}CanonicalizationMethod Algorithm="${transform.getAlgorithmName()}"`;
895
- if (utils.isArrayHasLength(this.inclusiveNamespacesPrefixList)) {
896
- res += ">";
897
- res += `<InclusiveNamespaces PrefixList="${this.inclusiveNamespacesPrefixList.join(" ")}" xmlns="${transform.getAlgorithmName()}"/>`;
898
- res += `</${currentPrefix}CanonicalizationMethod>`;
899
- }
900
- else {
901
- res += " />";
902
- }
903
- res += `<${currentPrefix}SignatureMethod Algorithm="${algo.getAlgorithmName()}" />`;
904
- res += this.createReferences(doc, prefix);
905
- res += `</${currentPrefix}SignedInfo>`;
906
- return res;
907
- }
908
- /**
909
- * Create the Signature element
910
- *
911
- */
912
- createSignature(prefix) {
913
- let xmlNsAttr = "xmlns";
914
- if (prefix) {
915
- xmlNsAttr += `:${prefix}`;
916
- prefix += ":";
917
- }
918
- else {
919
- prefix = "";
920
- }
921
- const signatureValueXml = `<${prefix}SignatureValue>${this.signatureValue}</${prefix}SignatureValue>`;
922
- //the canonicalization requires to get a valid xml node.
923
- //we need to wrap the info in a dummy signature since it contains the default namespace.
924
- const dummySignatureWrapper = `<${prefix}Signature ${xmlNsAttr}="http://www.w3.org/2000/09/xmldsig#">${signatureValueXml}</${prefix}Signature>`;
925
- const doc = new xmldom.DOMParser().parseFromString(dummySignatureWrapper);
926
- // Because we are using a dummy wrapper hack described above, we know there will be a `firstChild`
927
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
928
- return doc.documentElement.firstChild;
929
- }
930
- /**
931
- * Returns just the signature part, must be called only after {@link computeSignature}
932
- *
933
- * @returns The signature XML.
934
- */
935
- getSignatureXml() {
936
- return this.signatureXml;
937
- }
938
- /**
939
- * Returns the original xml with Id attributes added on relevant elements (required for validation), must be called only after {@link computeSignature}
940
- *
941
- * @returns The original XML with IDs.
942
- */
943
- getOriginalXmlWithIds() {
944
- return this.originalXmlWithIds;
945
- }
946
- /**
947
- * Returns the original xml document with the signature in it, must be called only after {@link computeSignature}
948
- *
949
- * @returns The signed XML.
950
- */
951
- getSignedXml() {
952
- return this.signedXml;
953
- }
954
- }
955
- exports.SignedXml = SignedXml;
956
- SignedXml.defaultNsForPrefix = {
957
- ds: "http://www.w3.org/2000/09/xmldsig#",
958
- };
959
- SignedXml.noop = () => null;
960
- //# sourceMappingURL=signed-xml.js.map