@pokash/n8n-nodes-ksef 0.2.15 → 0.2.16

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/node_modules/@oozcitak/dom/LICENSE +21 -0
  2. package/node_modules/@oozcitak/dom/README.md +32 -0
  3. package/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.d.ts +21 -0
  4. package/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js +79 -0
  5. package/node_modules/@oozcitak/dom/lib/algorithm/AbortAlgorithm.js.map +1 -0
  6. package/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.d.ts +8 -0
  7. package/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js +23 -0
  8. package/node_modules/@oozcitak/dom/lib/algorithm/AttrAlgorithm.js.map +1 -0
  9. package/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.d.ts +8 -0
  10. package/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js +76 -0
  11. package/node_modules/@oozcitak/dom/lib/algorithm/BoundaryPointAlgorithm.js.map +1 -0
  12. package/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.d.ts +19 -0
  13. package/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js +140 -0
  14. package/node_modules/@oozcitak/dom/lib/algorithm/CharacterDataAlgorithm.js.map +1 -0
  15. package/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.d.ts +192 -0
  16. package/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js +303 -0
  17. package/node_modules/@oozcitak/dom/lib/algorithm/CreateAlgorithm.js.map +1 -0
  18. package/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.d.ts +61 -0
  19. package/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.js +108 -0
  20. package/node_modules/@oozcitak/dom/lib/algorithm/CustomElementAlgorithm.js.map +1 -0
  21. package/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.d.ts +72 -0
  22. package/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js +288 -0
  23. package/node_modules/@oozcitak/dom/lib/algorithm/DOMAlgorithm.js.map +1 -0
  24. package/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.d.ts +21 -0
  25. package/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js +61 -0
  26. package/node_modules/@oozcitak/dom/lib/algorithm/DOMTokenListAlgorithm.js.map +1 -0
  27. package/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.d.ts +29 -0
  28. package/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js +161 -0
  29. package/node_modules/@oozcitak/dom/lib/algorithm/DocumentAlgorithm.js.map +1 -0
  30. package/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.d.ts +121 -0
  31. package/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js +608 -0
  32. package/node_modules/@oozcitak/dom/lib/algorithm/ElementAlgorithm.js.map +1 -0
  33. package/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.d.ts +146 -0
  34. package/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js +995 -0
  35. package/node_modules/@oozcitak/dom/lib/algorithm/EventAlgorithm.js.map +1 -0
  36. package/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.d.ts +33 -0
  37. package/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js +142 -0
  38. package/node_modules/@oozcitak/dom/lib/algorithm/EventTargetAlgorithm.js.map +1 -0
  39. package/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.d.ts +66 -0
  40. package/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.js +1173 -0
  41. package/node_modules/@oozcitak/dom/lib/algorithm/MutationAlgorithm.js.map +1 -0
  42. package/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.d.ts +43 -0
  43. package/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js +276 -0
  44. package/node_modules/@oozcitak/dom/lib/algorithm/MutationObserverAlgorithm.js.map +1 -0
  45. package/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.d.ts +25 -0
  46. package/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js +85 -0
  47. package/node_modules/@oozcitak/dom/lib/algorithm/NamespaceAlgorithm.js.map +1 -0
  48. package/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.d.ts +68 -0
  49. package/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js +543 -0
  50. package/node_modules/@oozcitak/dom/lib/algorithm/NodeAlgorithm.js.map +1 -0
  51. package/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.d.ts +15 -0
  52. package/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js +105 -0
  53. package/node_modules/@oozcitak/dom/lib/algorithm/NodeIteratorAlgorithm.js.map +1 -0
  54. package/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.d.ts +27 -0
  55. package/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js +125 -0
  56. package/node_modules/@oozcitak/dom/lib/algorithm/OrderedSetAlgorithm.js.map +1 -0
  57. package/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.d.ts +9 -0
  58. package/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js +69 -0
  59. package/node_modules/@oozcitak/dom/lib/algorithm/ParentNodeAlgorithm.js.map +1 -0
  60. package/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.d.ts +82 -0
  61. package/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js +829 -0
  62. package/node_modules/@oozcitak/dom/lib/algorithm/RangeAlgorithm.js.map +1 -0
  63. package/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.d.ts +8 -0
  64. package/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js +21 -0
  65. package/node_modules/@oozcitak/dom/lib/algorithm/SelectorsAlgorithm.js.map +1 -0
  66. package/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.d.ts +57 -0
  67. package/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js +316 -0
  68. package/node_modules/@oozcitak/dom/lib/algorithm/ShadowTreeAlgorithm.js.map +1 -0
  69. package/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.d.ts +30 -0
  70. package/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js +226 -0
  71. package/node_modules/@oozcitak/dom/lib/algorithm/TextAlgorithm.js.map +1 -0
  72. package/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.d.ts +8 -0
  73. package/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js +62 -0
  74. package/node_modules/@oozcitak/dom/lib/algorithm/TraversalAlgorithm.js.map +1 -0
  75. package/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.d.ts +268 -0
  76. package/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js +853 -0
  77. package/node_modules/@oozcitak/dom/lib/algorithm/TreeAlgorithm.js.map +1 -0
  78. package/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.d.ts +17 -0
  79. package/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js +147 -0
  80. package/node_modules/@oozcitak/dom/lib/algorithm/TreeWalkerAlgorithm.js.map +1 -0
  81. package/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.d.ts +8 -0
  82. package/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js +14 -0
  83. package/node_modules/@oozcitak/dom/lib/algorithm/WebIDLAlgorithm.js.map +1 -0
  84. package/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.d.ts +25 -0
  85. package/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js +164 -0
  86. package/node_modules/@oozcitak/dom/lib/algorithm/XMLAlgorithm.js.map +1 -0
  87. package/node_modules/@oozcitak/dom/lib/algorithm/index.d.ts +28 -0
  88. package/node_modules/@oozcitak/dom/lib/algorithm/index.js +34 -0
  89. package/node_modules/@oozcitak/dom/lib/algorithm/index.js.map +1 -0
  90. package/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.d.ts +15 -0
  91. package/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js +32 -0
  92. package/node_modules/@oozcitak/dom/lib/dom/AbortControllerImpl.js.map +1 -0
  93. package/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.d.ts +23 -0
  94. package/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js +59 -0
  95. package/node_modules/@oozcitak/dom/lib/dom/AbortSignalImpl.js.map +1 -0
  96. package/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.d.ts +23 -0
  97. package/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js +70 -0
  98. package/node_modules/@oozcitak/dom/lib/dom/AbstractRangeImpl.js.map +1 -0
  99. package/node_modules/@oozcitak/dom/lib/dom/AttrImpl.d.ts +45 -0
  100. package/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js +118 -0
  101. package/node_modules/@oozcitak/dom/lib/dom/AttrImpl.js.map +1 -0
  102. package/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.d.ts +21 -0
  103. package/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js +51 -0
  104. package/node_modules/@oozcitak/dom/lib/dom/CDATASectionImpl.js.map +1 -0
  105. package/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.d.ts +35 -0
  106. package/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js +132 -0
  107. package/node_modules/@oozcitak/dom/lib/dom/CharacterDataImpl.js.map +1 -0
  108. package/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.d.ts +16 -0
  109. package/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js +165 -0
  110. package/node_modules/@oozcitak/dom/lib/dom/ChildNodeImpl.js.map +1 -0
  111. package/node_modules/@oozcitak/dom/lib/dom/CommentImpl.d.ts +21 -0
  112. package/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js +52 -0
  113. package/node_modules/@oozcitak/dom/lib/dom/CommentImpl.js.map +1 -0
  114. package/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.d.ts +16 -0
  115. package/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js +60 -0
  116. package/node_modules/@oozcitak/dom/lib/dom/CustomEventImpl.js.map +1 -0
  117. package/node_modules/@oozcitak/dom/lib/dom/DOMException.d.ts +171 -0
  118. package/node_modules/@oozcitak/dom/lib/dom/DOMException.js +347 -0
  119. package/node_modules/@oozcitak/dom/lib/dom/DOMException.js.map +1 -0
  120. package/node_modules/@oozcitak/dom/lib/dom/DOMImpl.d.ts +48 -0
  121. package/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js +100 -0
  122. package/node_modules/@oozcitak/dom/lib/dom/DOMImpl.js.map +1 -0
  123. package/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.d.ts +29 -0
  124. package/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js +149 -0
  125. package/node_modules/@oozcitak/dom/lib/dom/DOMImplementationImpl.js.map +1 -0
  126. package/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.d.ts +46 -0
  127. package/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js +312 -0
  128. package/node_modules/@oozcitak/dom/lib/dom/DOMTokenListImpl.js.map +1 -0
  129. package/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.d.ts +32 -0
  130. package/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js +103 -0
  131. package/node_modules/@oozcitak/dom/lib/dom/DocumentFragmentImpl.js.map +1 -0
  132. package/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.d.ts +116 -0
  133. package/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js +545 -0
  134. package/node_modules/@oozcitak/dom/lib/dom/DocumentImpl.js.map +1 -0
  135. package/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.d.ts +11 -0
  136. package/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js +17 -0
  137. package/node_modules/@oozcitak/dom/lib/dom/DocumentOrShadowRootImpl.js.map +1 -0
  138. package/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.d.ts +39 -0
  139. package/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js +109 -0
  140. package/node_modules/@oozcitak/dom/lib/dom/DocumentTypeImpl.js.map +1 -0
  141. package/node_modules/@oozcitak/dom/lib/dom/ElementImpl.d.ts +132 -0
  142. package/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js +714 -0
  143. package/node_modules/@oozcitak/dom/lib/dom/ElementImpl.js.map +1 -0
  144. package/node_modules/@oozcitak/dom/lib/dom/EventImpl.d.ts +74 -0
  145. package/node_modules/@oozcitak/dom/lib/dom/EventImpl.js +313 -0
  146. package/node_modules/@oozcitak/dom/lib/dom/EventImpl.js.map +1 -0
  147. package/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.d.ts +30 -0
  148. package/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js +133 -0
  149. package/node_modules/@oozcitak/dom/lib/dom/EventTargetImpl.js.map +1 -0
  150. package/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.d.ts +44 -0
  151. package/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js +157 -0
  152. package/node_modules/@oozcitak/dom/lib/dom/HTMLCollectionImpl.js.map +1 -0
  153. package/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.d.ts +22 -0
  154. package/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js +184 -0
  155. package/node_modules/@oozcitak/dom/lib/dom/MutationObserverImpl.js.map +1 -0
  156. package/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.d.ts +73 -0
  157. package/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js +116 -0
  158. package/node_modules/@oozcitak/dom/lib/dom/MutationRecordImpl.js.map +1 -0
  159. package/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.d.ts +34 -0
  160. package/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js +112 -0
  161. package/node_modules/@oozcitak/dom/lib/dom/NamedNodeMapImpl.js.map +1 -0
  162. package/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.d.ts +50 -0
  163. package/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js +64 -0
  164. package/node_modules/@oozcitak/dom/lib/dom/NodeFilterImpl.js.map +1 -0
  165. package/node_modules/@oozcitak/dom/lib/dom/NodeImpl.d.ts +252 -0
  166. package/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js +891 -0
  167. package/node_modules/@oozcitak/dom/lib/dom/NodeImpl.js.map +1 -0
  168. package/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.d.ts +34 -0
  169. package/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js +86 -0
  170. package/node_modules/@oozcitak/dom/lib/dom/NodeIteratorImpl.js.map +1 -0
  171. package/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.d.ts +46 -0
  172. package/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js +198 -0
  173. package/node_modules/@oozcitak/dom/lib/dom/NodeListImpl.js.map +1 -0
  174. package/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.d.ts +49 -0
  175. package/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js +188 -0
  176. package/node_modules/@oozcitak/dom/lib/dom/NodeListStaticImpl.js.map +1 -0
  177. package/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.d.ts +12 -0
  178. package/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js +53 -0
  179. package/node_modules/@oozcitak/dom/lib/dom/NonDocumentTypeChildNodeImpl.js.map +1 -0
  180. package/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.d.ts +9 -0
  181. package/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js +31 -0
  182. package/node_modules/@oozcitak/dom/lib/dom/NonElementParentNodeImpl.js.map +1 -0
  183. package/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.d.ts +24 -0
  184. package/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js +158 -0
  185. package/node_modules/@oozcitak/dom/lib/dom/ParentNodeImpl.js.map +1 -0
  186. package/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.d.ts +25 -0
  187. package/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js +59 -0
  188. package/node_modules/@oozcitak/dom/lib/dom/ProcessingInstructionImpl.js.map +1 -0
  189. package/node_modules/@oozcitak/dom/lib/dom/RangeImpl.d.ts +71 -0
  190. package/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js +649 -0
  191. package/node_modules/@oozcitak/dom/lib/dom/RangeImpl.js.map +1 -0
  192. package/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.d.ts +33 -0
  193. package/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js +82 -0
  194. package/node_modules/@oozcitak/dom/lib/dom/ShadowRootImpl.js.map +1 -0
  195. package/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.d.ts +16 -0
  196. package/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js +35 -0
  197. package/node_modules/@oozcitak/dom/lib/dom/SlotableImpl.js.map +1 -0
  198. package/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.d.ts +13 -0
  199. package/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js +48 -0
  200. package/node_modules/@oozcitak/dom/lib/dom/StaticRangeImpl.js.map +1 -0
  201. package/node_modules/@oozcitak/dom/lib/dom/TextImpl.d.ts +28 -0
  202. package/node_modules/@oozcitak/dom/lib/dom/TextImpl.js +109 -0
  203. package/node_modules/@oozcitak/dom/lib/dom/TextImpl.js.map +1 -0
  204. package/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.d.ts +23 -0
  205. package/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js +41 -0
  206. package/node_modules/@oozcitak/dom/lib/dom/TraverserImpl.js.map +1 -0
  207. package/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.d.ts +36 -0
  208. package/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js +249 -0
  209. package/node_modules/@oozcitak/dom/lib/dom/TreeWalkerImpl.js.map +1 -0
  210. package/node_modules/@oozcitak/dom/lib/dom/WindowImpl.d.ts +26 -0
  211. package/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js +57 -0
  212. package/node_modules/@oozcitak/dom/lib/dom/WindowImpl.js.map +1 -0
  213. package/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.d.ts +11 -0
  214. package/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js +31 -0
  215. package/node_modules/@oozcitak/dom/lib/dom/XMLDocumentImpl.js.map +1 -0
  216. package/node_modules/@oozcitak/dom/lib/dom/index.d.ts +36 -0
  217. package/node_modules/@oozcitak/dom/lib/dom/index.js +102 -0
  218. package/node_modules/@oozcitak/dom/lib/dom/index.js.map +1 -0
  219. package/node_modules/@oozcitak/dom/lib/dom/interfaces.d.ts +2218 -0
  220. package/node_modules/@oozcitak/dom/lib/dom/interfaces.js +91 -0
  221. package/node_modules/@oozcitak/dom/lib/dom/interfaces.js.map +1 -0
  222. package/node_modules/@oozcitak/dom/lib/index.d.ts +3 -0
  223. package/node_modules/@oozcitak/dom/lib/index.js +11 -0
  224. package/node_modules/@oozcitak/dom/lib/index.js.map +1 -0
  225. package/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.d.ts +11 -0
  226. package/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js +37 -0
  227. package/node_modules/@oozcitak/dom/lib/parser/DOMParserImpl.js.map +1 -0
  228. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.d.ts +26 -0
  229. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js +240 -0
  230. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js.map +1 -0
  231. package/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.d.ts +159 -0
  232. package/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js +512 -0
  233. package/node_modules/@oozcitak/dom/lib/parser/XMLStringLexer.js.map +1 -0
  234. package/node_modules/@oozcitak/dom/lib/parser/index.d.ts +1 -0
  235. package/node_modules/@oozcitak/dom/lib/parser/index.js +6 -0
  236. package/node_modules/@oozcitak/dom/lib/parser/index.js.map +1 -0
  237. package/node_modules/@oozcitak/dom/lib/parser/interfaces.d.ts +131 -0
  238. package/node_modules/@oozcitak/dom/lib/parser/interfaces.js +18 -0
  239. package/node_modules/@oozcitak/dom/lib/parser/interfaces.js.map +1 -0
  240. package/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.d.ts +27 -0
  241. package/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js +56 -0
  242. package/node_modules/@oozcitak/dom/lib/serializer/LocalNameSet.js.map +1 -0
  243. package/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.d.ts +52 -0
  244. package/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js +151 -0
  245. package/node_modules/@oozcitak/dom/lib/serializer/NamespacePrefixMap.js.map +1 -0
  246. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.d.ts +166 -0
  247. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js +1479 -0
  248. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl.js.map +1 -0
  249. package/node_modules/@oozcitak/dom/lib/serializer/index.d.ts +1 -0
  250. package/node_modules/@oozcitak/dom/lib/serializer/index.js +6 -0
  251. package/node_modules/@oozcitak/dom/lib/serializer/index.js.map +1 -0
  252. package/node_modules/@oozcitak/dom/lib/serializer/interfaces.d.ts +15 -0
  253. package/node_modules/@oozcitak/dom/lib/serializer/interfaces.js +3 -0
  254. package/node_modules/@oozcitak/dom/lib/serializer/interfaces.js.map +1 -0
  255. package/node_modules/@oozcitak/dom/lib/util/Cast.d.ts +12 -0
  256. package/node_modules/@oozcitak/dom/lib/util/Cast.js +26 -0
  257. package/node_modules/@oozcitak/dom/lib/util/Cast.js.map +1 -0
  258. package/node_modules/@oozcitak/dom/lib/util/EmptySet.d.ts +13 -0
  259. package/node_modules/@oozcitak/dom/lib/util/EmptySet.js +61 -0
  260. package/node_modules/@oozcitak/dom/lib/util/EmptySet.js.map +1 -0
  261. package/node_modules/@oozcitak/dom/lib/util/Guard.d.ts +135 -0
  262. package/node_modules/@oozcitak/dom/lib/util/Guard.js +192 -0
  263. package/node_modules/@oozcitak/dom/lib/util/Guard.js.map +1 -0
  264. package/node_modules/@oozcitak/dom/lib/util/index.d.ts +3 -0
  265. package/node_modules/@oozcitak/dom/lib/util/index.js +9 -0
  266. package/node_modules/@oozcitak/dom/lib/util/index.js.map +1 -0
  267. package/node_modules/@oozcitak/dom/package.json +72 -0
  268. package/node_modules/@oozcitak/infra/LICENSE +21 -0
  269. package/node_modules/@oozcitak/infra/README.md +13 -0
  270. package/node_modules/@oozcitak/infra/lib/Base64.d.ts +12 -0
  271. package/node_modules/@oozcitak/infra/lib/Base64.js +82 -0
  272. package/node_modules/@oozcitak/infra/lib/Base64.js.map +1 -0
  273. package/node_modules/@oozcitak/infra/lib/Byte.d.ts +6 -0
  274. package/node_modules/@oozcitak/infra/lib/Byte.js +15 -0
  275. package/node_modules/@oozcitak/infra/lib/Byte.js.map +1 -0
  276. package/node_modules/@oozcitak/infra/lib/ByteSequence.d.ts +45 -0
  277. package/node_modules/@oozcitak/infra/lib/ByteSequence.js +171 -0
  278. package/node_modules/@oozcitak/infra/lib/ByteSequence.js.map +1 -0
  279. package/node_modules/@oozcitak/infra/lib/CodePoints.d.ts +82 -0
  280. package/node_modules/@oozcitak/infra/lib/CodePoints.js +85 -0
  281. package/node_modules/@oozcitak/infra/lib/CodePoints.js.map +1 -0
  282. package/node_modules/@oozcitak/infra/lib/JSON.d.ts +24 -0
  283. package/node_modules/@oozcitak/infra/lib/JSON.js +123 -0
  284. package/node_modules/@oozcitak/infra/lib/JSON.js.map +1 -0
  285. package/node_modules/@oozcitak/infra/lib/List.d.ts +101 -0
  286. package/node_modules/@oozcitak/infra/lib/List.js +325 -0
  287. package/node_modules/@oozcitak/infra/lib/List.js.map +1 -0
  288. package/node_modules/@oozcitak/infra/lib/Map.d.ts +87 -0
  289. package/node_modules/@oozcitak/infra/lib/Map.js +308 -0
  290. package/node_modules/@oozcitak/infra/lib/Map.js.map +1 -0
  291. package/node_modules/@oozcitak/infra/lib/Namespace.d.ts +6 -0
  292. package/node_modules/@oozcitak/infra/lib/Namespace.js +9 -0
  293. package/node_modules/@oozcitak/infra/lib/Namespace.js.map +1 -0
  294. package/node_modules/@oozcitak/infra/lib/Queue.d.ts +13 -0
  295. package/node_modules/@oozcitak/infra/lib/Queue.js +22 -0
  296. package/node_modules/@oozcitak/infra/lib/Queue.js.map +1 -0
  297. package/node_modules/@oozcitak/infra/lib/Set.d.ts +136 -0
  298. package/node_modules/@oozcitak/infra/lib/Set.js +467 -0
  299. package/node_modules/@oozcitak/infra/lib/Set.js.map +1 -0
  300. package/node_modules/@oozcitak/infra/lib/Stack.d.ts +13 -0
  301. package/node_modules/@oozcitak/infra/lib/Stack.js +22 -0
  302. package/node_modules/@oozcitak/infra/lib/Stack.js.map +1 -0
  303. package/node_modules/@oozcitak/infra/lib/String.d.ts +129 -0
  304. package/node_modules/@oozcitak/infra/lib/String.js +472 -0
  305. package/node_modules/@oozcitak/infra/lib/String.js.map +1 -0
  306. package/node_modules/@oozcitak/infra/lib/index.d.ts +13 -0
  307. package/node_modules/@oozcitak/infra/lib/index.js +34 -0
  308. package/node_modules/@oozcitak/infra/lib/index.js.map +1 -0
  309. package/node_modules/@oozcitak/infra/package.json +54 -0
  310. package/node_modules/@oozcitak/url/LICENSE +21 -0
  311. package/node_modules/@oozcitak/url/README.md +27 -0
  312. package/node_modules/@oozcitak/url/lib/URLAlgorithm.d.ts +267 -0
  313. package/node_modules/@oozcitak/url/lib/URLAlgorithm.js +2758 -0
  314. package/node_modules/@oozcitak/url/lib/URLAlgorithm.js.map +1 -0
  315. package/node_modules/@oozcitak/url/lib/URLImpl.d.ts +53 -0
  316. package/node_modules/@oozcitak/url/lib/URLImpl.js +377 -0
  317. package/node_modules/@oozcitak/url/lib/URLImpl.js.map +1 -0
  318. package/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.d.ts +38 -0
  319. package/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js +303 -0
  320. package/node_modules/@oozcitak/url/lib/URLSearchParamsImpl.js.map +1 -0
  321. package/node_modules/@oozcitak/url/lib/index.d.ts +2 -0
  322. package/node_modules/@oozcitak/url/lib/index.js +7 -0
  323. package/node_modules/@oozcitak/url/lib/index.js.map +1 -0
  324. package/node_modules/@oozcitak/url/lib/interfaces.d.ts +195 -0
  325. package/node_modules/@oozcitak/url/lib/interfaces.js +31 -0
  326. package/node_modules/@oozcitak/url/lib/interfaces.js.map +1 -0
  327. package/node_modules/@oozcitak/url/package.json +55 -0
  328. package/node_modules/@oozcitak/util/LICENSE +21 -0
  329. package/node_modules/@oozcitak/util/README.md +10 -0
  330. package/node_modules/@oozcitak/util/lib/CompareCache.d.ts +32 -0
  331. package/node_modules/@oozcitak/util/lib/CompareCache.js +59 -0
  332. package/node_modules/@oozcitak/util/lib/CompareCache.js.map +1 -0
  333. package/node_modules/@oozcitak/util/lib/FixedSizeSet.d.ts +64 -0
  334. package/node_modules/@oozcitak/util/lib/FixedSizeSet.js +174 -0
  335. package/node_modules/@oozcitak/util/lib/FixedSizeSet.js.map +1 -0
  336. package/node_modules/@oozcitak/util/lib/Lazy.d.ts +18 -0
  337. package/node_modules/@oozcitak/util/lib/Lazy.js +34 -0
  338. package/node_modules/@oozcitak/util/lib/Lazy.js.map +1 -0
  339. package/node_modules/@oozcitak/util/lib/ObjectCache.d.ts +71 -0
  340. package/node_modules/@oozcitak/util/lib/ObjectCache.js +181 -0
  341. package/node_modules/@oozcitak/util/lib/ObjectCache.js.map +1 -0
  342. package/node_modules/@oozcitak/util/lib/StringWalker.d.ts +49 -0
  343. package/node_modules/@oozcitak/util/lib/StringWalker.js +105 -0
  344. package/node_modules/@oozcitak/util/lib/StringWalker.js.map +1 -0
  345. package/node_modules/@oozcitak/util/lib/index.d.ts +178 -0
  346. package/node_modules/@oozcitak/util/lib/index.js +439 -0
  347. package/node_modules/@oozcitak/util/lib/index.js.map +1 -0
  348. package/node_modules/@oozcitak/util/package.json +50 -0
  349. package/node_modules/@xmldom/is-dom-node/LICENSE.md +21 -0
  350. package/node_modules/@xmldom/is-dom-node/README.md +91 -0
  351. package/node_modules/@xmldom/is-dom-node/dist/index.d.ts +33 -0
  352. package/node_modules/@xmldom/is-dom-node/dist/index.js +91 -0
  353. package/node_modules/@xmldom/is-dom-node/dist/index.js.map +1 -0
  354. package/node_modules/@xmldom/is-dom-node/package.json +69 -0
  355. package/node_modules/@xmldom/xmldom/CHANGELOG.md +468 -0
  356. package/node_modules/@xmldom/xmldom/LICENSE +8 -0
  357. package/node_modules/@xmldom/xmldom/SECURITY.md +50 -0
  358. package/node_modules/@xmldom/xmldom/index.d.ts +43 -0
  359. package/node_modules/@xmldom/xmldom/lib/.eslintrc.yml +2 -0
  360. package/node_modules/@xmldom/xmldom/lib/conventions.js +203 -0
  361. package/node_modules/@xmldom/xmldom/lib/dom-parser.js +322 -0
  362. package/node_modules/@xmldom/xmldom/lib/dom.js +1879 -0
  363. package/node_modules/@xmldom/xmldom/lib/entities.js +2166 -0
  364. package/node_modules/@xmldom/xmldom/lib/index.js +4 -0
  365. package/node_modules/@xmldom/xmldom/lib/sax.js +662 -0
  366. package/node_modules/@xmldom/xmldom/package.json +71 -0
  367. package/node_modules/@xmldom/xmldom/readme.md +356 -0
  368. package/node_modules/esprima/ChangeLog +235 -0
  369. package/node_modules/esprima/LICENSE.BSD +21 -0
  370. package/node_modules/esprima/README.md +46 -0
  371. package/node_modules/esprima/bin/esparse.js +139 -0
  372. package/node_modules/esprima/bin/esvalidate.js +236 -0
  373. package/node_modules/esprima/dist/esprima.js +6709 -0
  374. package/node_modules/esprima/package.json +112 -0
  375. package/node_modules/node-forge/LICENSE +331 -0
  376. package/node_modules/node-forge/README.md +2071 -0
  377. package/node_modules/node-forge/dist/forge.all.min.js +2 -0
  378. package/node_modules/node-forge/dist/forge.all.min.js.map +1 -0
  379. package/node_modules/node-forge/dist/forge.min.js +2 -0
  380. package/node_modules/node-forge/dist/forge.min.js.map +1 -0
  381. package/node_modules/node-forge/dist/prime.worker.min.js +2 -0
  382. package/node_modules/node-forge/dist/prime.worker.min.js.map +1 -0
  383. package/node_modules/node-forge/flash/swf/SocketPool.swf +0 -0
  384. package/node_modules/node-forge/lib/aes.js +1091 -0
  385. package/node_modules/node-forge/lib/aesCipherSuites.js +282 -0
  386. package/node_modules/node-forge/lib/asn1-validator.js +91 -0
  387. package/node_modules/node-forge/lib/asn1.js +1503 -0
  388. package/node_modules/node-forge/lib/baseN.js +186 -0
  389. package/node_modules/node-forge/lib/cipher.js +230 -0
  390. package/node_modules/node-forge/lib/cipherModes.js +999 -0
  391. package/node_modules/node-forge/lib/des.js +496 -0
  392. package/node_modules/node-forge/lib/ed25519.js +1072 -0
  393. package/node_modules/node-forge/lib/forge.js +13 -0
  394. package/node_modules/node-forge/lib/form.js +149 -0
  395. package/node_modules/node-forge/lib/hmac.js +146 -0
  396. package/node_modules/node-forge/lib/http.js +1346 -0
  397. package/node_modules/node-forge/lib/index.all.js +16 -0
  398. package/node_modules/node-forge/lib/index.js +33 -0
  399. package/node_modules/node-forge/lib/jsbn.js +1264 -0
  400. package/node_modules/node-forge/lib/kem.js +168 -0
  401. package/node_modules/node-forge/lib/log.js +319 -0
  402. package/node_modules/node-forge/lib/md.all.js +13 -0
  403. package/node_modules/node-forge/lib/md.js +11 -0
  404. package/node_modules/node-forge/lib/md5.js +289 -0
  405. package/node_modules/node-forge/lib/mgf.js +12 -0
  406. package/node_modules/node-forge/lib/mgf1.js +57 -0
  407. package/node_modules/node-forge/lib/oids.js +179 -0
  408. package/node_modules/node-forge/lib/pbe.js +1023 -0
  409. package/node_modules/node-forge/lib/pbkdf2.js +211 -0
  410. package/node_modules/node-forge/lib/pem.js +237 -0
  411. package/node_modules/node-forge/lib/pkcs1.js +276 -0
  412. package/node_modules/node-forge/lib/pkcs12.js +1078 -0
  413. package/node_modules/node-forge/lib/pkcs7.js +1260 -0
  414. package/node_modules/node-forge/lib/pkcs7asn1.js +410 -0
  415. package/node_modules/node-forge/lib/pki.js +102 -0
  416. package/node_modules/node-forge/lib/prime.js +297 -0
  417. package/node_modules/node-forge/lib/prime.worker.js +168 -0
  418. package/node_modules/node-forge/lib/prng.js +419 -0
  419. package/node_modules/node-forge/lib/pss.js +241 -0
  420. package/node_modules/node-forge/lib/random.js +191 -0
  421. package/node_modules/node-forge/lib/rc2.js +410 -0
  422. package/node_modules/node-forge/lib/rsa.js +1949 -0
  423. package/node_modules/node-forge/lib/sha1.js +319 -0
  424. package/node_modules/node-forge/lib/sha256.js +327 -0
  425. package/node_modules/node-forge/lib/sha512.js +561 -0
  426. package/node_modules/node-forge/lib/socket.js +287 -0
  427. package/node_modules/node-forge/lib/ssh.js +236 -0
  428. package/node_modules/node-forge/lib/tls.js +4282 -0
  429. package/node_modules/node-forge/lib/tlssocket.js +249 -0
  430. package/node_modules/node-forge/lib/util.js +2652 -0
  431. package/node_modules/node-forge/lib/x509.js +3242 -0
  432. package/node_modules/node-forge/lib/xhr.js +738 -0
  433. package/node_modules/node-forge/package.json +123 -0
  434. package/node_modules/sprintf-js/.npmignore +1 -0
  435. package/node_modules/sprintf-js/LICENSE +24 -0
  436. package/node_modules/sprintf-js/README.md +88 -0
  437. package/node_modules/sprintf-js/bower.json +14 -0
  438. package/node_modules/sprintf-js/demo/angular.html +20 -0
  439. package/node_modules/sprintf-js/dist/angular-sprintf.min.js +4 -0
  440. package/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +1 -0
  441. package/node_modules/sprintf-js/dist/angular-sprintf.min.map +1 -0
  442. package/node_modules/sprintf-js/dist/sprintf.min.js +4 -0
  443. package/node_modules/sprintf-js/dist/sprintf.min.js.map +1 -0
  444. package/node_modules/sprintf-js/dist/sprintf.min.map +1 -0
  445. package/node_modules/sprintf-js/gruntfile.js +36 -0
  446. package/node_modules/sprintf-js/package.json +22 -0
  447. package/node_modules/sprintf-js/src/angular-sprintf.js +18 -0
  448. package/node_modules/sprintf-js/src/sprintf.js +208 -0
  449. package/node_modules/sprintf-js/test/test.js +82 -0
  450. package/node_modules/xml-crypto/LICENSE +22 -0
  451. package/node_modules/xml-crypto/README.md +557 -0
  452. package/node_modules/xml-crypto/lib/c14n-canonicalization.d.ts +39 -0
  453. package/node_modules/xml-crypto/lib/c14n-canonicalization.js +230 -0
  454. package/node_modules/xml-crypto/lib/c14n-canonicalization.js.map +1 -0
  455. package/node_modules/xml-crypto/lib/enveloped-signature.d.ts +7 -0
  456. package/node_modules/xml-crypto/lib/enveloped-signature.js +43 -0
  457. package/node_modules/xml-crypto/lib/enveloped-signature.js.map +1 -0
  458. package/node_modules/xml-crypto/lib/exclusive-canonicalization.d.ts +38 -0
  459. package/node_modules/xml-crypto/lib/exclusive-canonicalization.js +246 -0
  460. package/node_modules/xml-crypto/lib/exclusive-canonicalization.js.map +1 -0
  461. package/node_modules/xml-crypto/lib/hash-algorithms.d.ts +13 -0
  462. package/node_modules/xml-crypto/lib/hash-algorithms.js +47 -0
  463. package/node_modules/xml-crypto/lib/hash-algorithms.js.map +1 -0
  464. package/node_modules/xml-crypto/lib/index.d.ts +5 -0
  465. package/node_modules/xml-crypto/lib/index.js +28 -0
  466. package/node_modules/xml-crypto/lib/index.js.map +1 -0
  467. package/node_modules/xml-crypto/lib/signature-algorithms.d.ts +47 -0
  468. package/node_modules/xml-crypto/lib/signature-algorithms.js +86 -0
  469. package/node_modules/xml-crypto/lib/signature-algorithms.js.map +1 -0
  470. package/node_modules/xml-crypto/lib/signed-xml.d.ts +225 -0
  471. package/node_modules/xml-crypto/lib/signed-xml.js +960 -0
  472. package/node_modules/xml-crypto/lib/signed-xml.js.map +1 -0
  473. package/node_modules/xml-crypto/lib/types.d.ts +125 -0
  474. package/node_modules/xml-crypto/lib/types.js +57 -0
  475. package/node_modules/xml-crypto/lib/types.js.map +1 -0
  476. package/node_modules/xml-crypto/lib/utils.d.ts +65 -0
  477. package/node_modules/xml-crypto/lib/utils.js +256 -0
  478. package/node_modules/xml-crypto/lib/utils.js.map +1 -0
  479. package/node_modules/xml-crypto/node_modules/xpath/LICENSE +22 -0
  480. package/node_modules/xml-crypto/node_modules/xpath/README.md +133 -0
  481. package/node_modules/xml-crypto/node_modules/xpath/docs/XPathEvaluator.md +62 -0
  482. package/node_modules/xml-crypto/node_modules/xpath/docs/XPathResult.md +47 -0
  483. package/node_modules/xml-crypto/node_modules/xpath/docs/function resolvers.md +88 -0
  484. package/node_modules/xml-crypto/node_modules/xpath/docs/namespace resolvers.md +69 -0
  485. package/node_modules/xml-crypto/node_modules/xpath/docs/parsed expressions.md +21 -0
  486. package/node_modules/xml-crypto/node_modules/xpath/docs/variable resolvers.md +89 -0
  487. package/node_modules/xml-crypto/node_modules/xpath/docs/xpath methods.md +39 -0
  488. package/node_modules/xml-crypto/node_modules/xpath/package.json +39 -0
  489. package/node_modules/xml-crypto/node_modules/xpath/test.js +1186 -0
  490. package/node_modules/xml-crypto/node_modules/xpath/xpath.d.ts +51 -0
  491. package/node_modules/xml-crypto/node_modules/xpath/xpath.js +4938 -0
  492. package/node_modules/xml-crypto/package.json +73 -0
  493. package/node_modules/xmlbuilder2/CHANGELOG.md +309 -0
  494. package/node_modules/xmlbuilder2/LICENSE +21 -0
  495. package/node_modules/xmlbuilder2/README.md +183 -0
  496. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctions.d.ts +236 -0
  497. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctions.js +108 -0
  498. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctions.js.map +1 -0
  499. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctionsCB.d.ts +17 -0
  500. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctionsCB.js +26 -0
  501. package/node_modules/xmlbuilder2/lib/builder/BuilderFunctionsCB.js.map +1 -0
  502. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.d.ts +124 -0
  503. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.js +782 -0
  504. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.js.map +1 -0
  505. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderImpl.d.ts +143 -0
  506. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderImpl.js +841 -0
  507. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderImpl.js.map +1 -0
  508. package/node_modules/xmlbuilder2/lib/builder/dom.d.ts +8 -0
  509. package/node_modules/xmlbuilder2/lib/builder/dom.js +67 -0
  510. package/node_modules/xmlbuilder2/lib/builder/dom.js.map +1 -0
  511. package/node_modules/xmlbuilder2/lib/builder/index.d.ts +4 -0
  512. package/node_modules/xmlbuilder2/lib/builder/index.js +15 -0
  513. package/node_modules/xmlbuilder2/lib/builder/index.js.map +1 -0
  514. package/node_modules/xmlbuilder2/lib/constants.d.ts +1 -0
  515. package/node_modules/xmlbuilder2/lib/constants.js +4 -0
  516. package/node_modules/xmlbuilder2/lib/constants.js.map +1 -0
  517. package/node_modules/xmlbuilder2/lib/index.d.ts +1 -0
  518. package/node_modules/xmlbuilder2/lib/index.js +10 -0
  519. package/node_modules/xmlbuilder2/lib/index.js.map +1 -0
  520. package/node_modules/xmlbuilder2/lib/interfaces.d.ts +1355 -0
  521. package/node_modules/xmlbuilder2/lib/interfaces.js +76 -0
  522. package/node_modules/xmlbuilder2/lib/interfaces.js.map +1 -0
  523. package/node_modules/xmlbuilder2/lib/readers/BaseReader.d.ts +109 -0
  524. package/node_modules/xmlbuilder2/lib/readers/BaseReader.js +167 -0
  525. package/node_modules/xmlbuilder2/lib/readers/BaseReader.js.map +1 -0
  526. package/node_modules/xmlbuilder2/lib/readers/JSONReader.d.ts +14 -0
  527. package/node_modules/xmlbuilder2/lib/readers/JSONReader.js +38 -0
  528. package/node_modules/xmlbuilder2/lib/readers/JSONReader.js.map +1 -0
  529. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.d.ts +15 -0
  530. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.js +168 -0
  531. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.js.map +1 -0
  532. package/node_modules/xmlbuilder2/lib/readers/XMLReader.d.ts +14 -0
  533. package/node_modules/xmlbuilder2/lib/readers/XMLReader.js +206 -0
  534. package/node_modules/xmlbuilder2/lib/readers/XMLReader.js.map +1 -0
  535. package/node_modules/xmlbuilder2/lib/readers/YAMLReader.d.ts +14 -0
  536. package/node_modules/xmlbuilder2/lib/readers/YAMLReader.js +44 -0
  537. package/node_modules/xmlbuilder2/lib/readers/YAMLReader.js.map +1 -0
  538. package/node_modules/xmlbuilder2/lib/readers/index.d.ts +4 -0
  539. package/node_modules/xmlbuilder2/lib/readers/index.js +11 -0
  540. package/node_modules/xmlbuilder2/lib/readers/index.js.map +1 -0
  541. package/node_modules/xmlbuilder2/lib/writers/BaseCBWriter.d.ts +110 -0
  542. package/node_modules/xmlbuilder2/lib/writers/BaseCBWriter.js +23 -0
  543. package/node_modules/xmlbuilder2/lib/writers/BaseCBWriter.js.map +1 -0
  544. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.d.ts +276 -0
  545. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.js +1603 -0
  546. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.js.map +1 -0
  547. package/node_modules/xmlbuilder2/lib/writers/JSONCBWriter.d.ts +68 -0
  548. package/node_modules/xmlbuilder2/lib/writers/JSONCBWriter.js +172 -0
  549. package/node_modules/xmlbuilder2/lib/writers/JSONCBWriter.js.map +1 -0
  550. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.d.ts +67 -0
  551. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.js +222 -0
  552. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.js.map +1 -0
  553. package/node_modules/xmlbuilder2/lib/writers/MapWriter.d.ts +27 -0
  554. package/node_modules/xmlbuilder2/lib/writers/MapWriter.js +84 -0
  555. package/node_modules/xmlbuilder2/lib/writers/MapWriter.js.map +1 -0
  556. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.d.ts +56 -0
  557. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.js +483 -0
  558. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.js.map +1 -0
  559. package/node_modules/xmlbuilder2/lib/writers/XMLCBWriter.d.ts +51 -0
  560. package/node_modules/xmlbuilder2/lib/writers/XMLCBWriter.js +165 -0
  561. package/node_modules/xmlbuilder2/lib/writers/XMLCBWriter.js.map +1 -0
  562. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.d.ts +60 -0
  563. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.js +236 -0
  564. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.js.map +1 -0
  565. package/node_modules/xmlbuilder2/lib/writers/YAMLCBWriter.d.ts +61 -0
  566. package/node_modules/xmlbuilder2/lib/writers/YAMLCBWriter.js +161 -0
  567. package/node_modules/xmlbuilder2/lib/writers/YAMLCBWriter.js.map +1 -0
  568. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.d.ts +55 -0
  569. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.js +186 -0
  570. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.js.map +1 -0
  571. package/node_modules/xmlbuilder2/lib/writers/index.d.ts +5 -0
  572. package/node_modules/xmlbuilder2/lib/writers/index.js +13 -0
  573. package/node_modules/xmlbuilder2/lib/writers/index.js.map +1 -0
  574. package/node_modules/xmlbuilder2/lib/xmlbuilder2.min.js +8 -0
  575. package/node_modules/xmlbuilder2/node_modules/argparse/CHANGELOG.md +185 -0
  576. package/node_modules/xmlbuilder2/node_modules/argparse/LICENSE +21 -0
  577. package/node_modules/xmlbuilder2/node_modules/argparse/README.md +257 -0
  578. package/node_modules/xmlbuilder2/node_modules/argparse/index.js +3 -0
  579. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/append/constant.js +47 -0
  580. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/append.js +53 -0
  581. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/count.js +40 -0
  582. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/help.js +47 -0
  583. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store/constant.js +43 -0
  584. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store/false.js +27 -0
  585. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store/true.js +26 -0
  586. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/store.js +50 -0
  587. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/subparsers.js +149 -0
  588. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action/version.js +47 -0
  589. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action.js +146 -0
  590. package/node_modules/xmlbuilder2/node_modules/argparse/lib/action_container.js +482 -0
  591. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argparse.js +14 -0
  592. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument/error.js +50 -0
  593. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument/exclusive.js +54 -0
  594. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument/group.js +75 -0
  595. package/node_modules/xmlbuilder2/node_modules/argparse/lib/argument_parser.js +1161 -0
  596. package/node_modules/xmlbuilder2/node_modules/argparse/lib/const.js +21 -0
  597. package/node_modules/xmlbuilder2/node_modules/argparse/lib/help/added_formatters.js +87 -0
  598. package/node_modules/xmlbuilder2/node_modules/argparse/lib/help/formatter.js +795 -0
  599. package/node_modules/xmlbuilder2/node_modules/argparse/lib/namespace.js +76 -0
  600. package/node_modules/xmlbuilder2/node_modules/argparse/lib/utils.js +57 -0
  601. package/node_modules/xmlbuilder2/node_modules/argparse/package.json +34 -0
  602. package/node_modules/xmlbuilder2/node_modules/js-yaml/CHANGELOG.md +557 -0
  603. package/node_modules/xmlbuilder2/node_modules/js-yaml/LICENSE +21 -0
  604. package/node_modules/xmlbuilder2/node_modules/js-yaml/README.md +299 -0
  605. package/node_modules/xmlbuilder2/node_modules/js-yaml/bin/js-yaml.js +132 -0
  606. package/node_modules/xmlbuilder2/node_modules/js-yaml/dist/js-yaml.js +3989 -0
  607. package/node_modules/xmlbuilder2/node_modules/js-yaml/dist/js-yaml.min.js +1 -0
  608. package/node_modules/xmlbuilder2/node_modules/js-yaml/index.js +7 -0
  609. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/common.js +59 -0
  610. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/dumper.js +850 -0
  611. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/exception.js +43 -0
  612. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/loader.js +1644 -0
  613. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/mark.js +76 -0
  614. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/core.js +18 -0
  615. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +25 -0
  616. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +28 -0
  617. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +17 -0
  618. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema/json.js +25 -0
  619. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/schema.js +108 -0
  620. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/binary.js +138 -0
  621. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/bool.js +35 -0
  622. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/float.js +116 -0
  623. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/int.js +173 -0
  624. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/js/function.js +93 -0
  625. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +60 -0
  626. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +28 -0
  627. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/map.js +8 -0
  628. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/merge.js +12 -0
  629. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/null.js +34 -0
  630. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/omap.js +44 -0
  631. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/pairs.js +53 -0
  632. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/seq.js +8 -0
  633. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/set.js +29 -0
  634. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/str.js +8 -0
  635. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +88 -0
  636. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/type.js +61 -0
  637. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml.js +39 -0
  638. package/node_modules/xmlbuilder2/node_modules/js-yaml/package.json +49 -0
  639. package/node_modules/xmlbuilder2/package.json +82 -0
  640. package/node_modules/xpath/LICENSE +22 -0
  641. package/node_modules/xpath/README.md +133 -0
  642. package/node_modules/xpath/package.json +43 -0
  643. package/node_modules/xpath/xpath.d.ts +51 -0
  644. package/node_modules/xpath/xpath.js +5041 -0
  645. package/package.json +9 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signed-xml.js","sourceRoot":"","sources":["../src/signed-xml.ts"],"names":[],"mappings":";;;AAgBA,iDAAiD;AACjD,yCAAyC;AAEzC,+BAAiC;AACjC,+BAA+B;AAC/B,gDAAgD;AAChD,6DAA6D;AAC7D,yDAAyD;AACzD,oDAAoD;AACpD,8DAA8D;AAC9D,iCAAiC;AAEjC,MAAa,SAAS;IAoGpB;;;OAGG;IACH,YAAY,UAA4B,EAAE;QAhG1C;;;WAGG;QACH,uBAAkB,GAA4B,SAAS,CAAC;QACxD;;WAEG;QACH,8BAAyB,GAAmC,SAAS,CAAC;QACtE;;WAEG;QACH,kCAA6B,GAAa,EAAE,CAAC;QAC7C,sBAAiB,GAAoB;YACnC,kBAAkB,EAAE,WAAU,YAAY;gBACxC,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;YACrC,CAAC;SACF,CAAC;QACF,uBAAkB,GAA4D,EAAE,CAAC;QACjF,sBAAiB,GAAmC,EAAE,CAAC;QACvD,sBAAiB,GAAG,SAAS,CAAC,iBAAiB,CAAC;QAChD,uBAAkB,GAAG,SAAS,CAAC,kBAAkB,CAAC;QAElD,iBAAiB;QACT,OAAE,GAAG,CAAC,CAAC;QACP,cAAS,GAAG,EAAE,CAAC;QACf,iBAAY,GAAG,EAAE,CAAC;QAClB,kBAAa,GAAgB,IAAI,CAAC;QAClC,mB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,MAAM,EAAE,CAAC;YAC1B,MAAM,IAAI,GAAG,CAAC;QAChB,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,EAAE,CAAC;QACd,CAAC;QAED,MAAM,iBAAiB,GAAG,IAAI,MAAM,kBAAkB,IAAI,CAAC,cAAc,KAAK,MAAM,iBAAiB,CAAC;QACtG,wDAAwD;QACxD,wFAAwF;QACxF,MAAM,qBAAqB,GAAG,IAAI,MAAM,aAAa,SAAS,yCAAyC,iBAAiB,KAAK,MAAM,YAAY,CAAC;QAEhJ,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;QAE1E,kGAAkG;QAClG,oEAAoE;QACpE,OAAO,GAAG,CAAC,eAAe,CAAC,UAAW,CAAC;IACzC,CAAC;IAED;;;;OAIG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IACH,qBAAqB;QACnB,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IAED;;;;OAIG;IACH,YAAY;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;;AA7uCH,8BA8uCC;AAhpCQ,4BAAkB,GAAG;IAC1B,EAAE,EAAE,oCAAoC;CACzC,AAFwB,CAEvB;AAEK,cAAI,GAAG,GAAG,EAAE,CAAC,IAAI,AAAb,CAAc","sourcesContent":["import type {\n CanonicalizationAlgorithmType,\n CanonicalizationOrTransformAlgorithmType,\n CanonicalizationOrTransformationAlgorithm,\n CanonicalizationOrTransformationAlgorithmProcessOptions,\n ComputeSignatureOptions,\n ErrorFirstCallback,\n GetKeyInfoContentArgs,\n HashAlgorithm,\n HashAlgorithmType,\n Reference,\n SignatureAlgorithm,\n SignatureAlgorithmType,\n SignedXmlOptions,\n} from \"./types\";\n\nimport * as isDomNode from \"@xmldom/is-dom-node\";\nimport * as xmldom from \"@xmldom/xmldom\";\nimport * as crypto from \"crypto\";\nimport { deprecate } from \"util\";\nimport * as xpath from \"xpath\";\nimport * as c14n from \"./c14n-canonicalization\";\nimport * as envelopedSignatures from \"./enveloped-signature\";\nimport * as execC14n from \"./exclusive-canonicalization\";\nimport * as hashAlgorithms from \"./hash-algorithms\";\nimport * as signatureAlgorithms from \"./signature-algorithms\";\nimport * as utils from \"./utils\";\n\nexport class SignedXml {\n idMode?: \"wssecurity\";\n idAttributes: string[];\n /**\n * A {@link Buffer} or pem encoded {@link String} containing your private key\n */\n privateKey?: crypto.KeyLike;\n publicCert?: crypto.KeyLike;\n /**\n * One of the supported signature algorithms.\n * @see {@link SignatureAlgorithmType}\n */\n signatureAlgorithm?: SignatureAlgorithmType = undefined;\n /**\n * Rules used to convert an XML document into its canonical form.\n */\n canonicalizationAlgorithm?: CanonicalizationAlgorithmType = undefined;\n /**\n * It specifies a list of namespace prefixes that should be considered \"inclusive\" during the canonicalization process.\n */\n inclusiveNamespacesPrefixList: string[] = [];\n namespaceResolver: XPathNSResolver = {\n lookupNamespaceURI: function (/* prefix */) {\n throw new Error(\"Not implemented\");\n },\n };\n implicitTransforms: ReadonlyArray<CanonicalizationOrTransformAlgorithmType> = [];\n keyInfoAttributes: { [attrName: string]: string } = {};\n getKeyInfoContent = SignedXml.getKeyInfoContent;\n getCertFromKeyInfo = SignedXml.getCertFromKeyInfo;\n\n // Internal state\n private id = 0;\n private signedXml = \"\";\n private signatureXml = \"\";\n private signatureNode: Node | null = null;\n private signatureValue = \"\";\n private originalXmlWithIds = \"\";\n private keyInfo: Node | null = null;\n\n /**\n * Contains the references that were signed.\n * @see {@link Reference}\n */\n private references: Reference[] = [];\n\n /**\n * Contains the canonicalized XML of the references that were validly signed.\n *\n * This populates with the canonical XML of the reference only after\n * verifying the signature is cryptographically authentic.\n */\n private signedReferences: string[] = [];\n\n /**\n * 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}\n */\n CanonicalizationAlgorithms: Record<\n CanonicalizationOrTransformAlgorithmType,\n new () => CanonicalizationOrTransformationAlgorithm\n > = {\n \"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\": c14n.C14nCanonicalization,\n \"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments\":\n c14n.C14nCanonicalizationWithComments,\n \"http://www.w3.org/2001/10/xml-exc-c14n#\": execC14n.ExclusiveCanonicalization,\n \"http://www.w3.org/2001/10/xml-exc-c14n#WithComments\":\n execC14n.ExclusiveCanonicalizationWithComments,\n \"http://www.w3.org/2000/09/xmldsig#enveloped-signature\": envelopedSignatures.EnvelopedSignature,\n };\n\n // TODO: In v7.x we may consider deprecating sha1\n\n /**\n * 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}\n */\n HashAlgorithms: Record<HashAlgorithmType, new () => HashAlgorithm> = {\n \"http://www.w3.org/2000/09/xmldsig#sha1\": hashAlgorithms.Sha1,\n \"http://www.w3.org/2001/04/xmlenc#sha256\": hashAlgorithms.Sha256,\n \"http://www.w3.org/2001/04/xmlenc#sha512\": hashAlgorithms.Sha512,\n };\n\n // TODO: In v7.x we may consider deprecating sha1\n\n /**\n * 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}\n */\n SignatureAlgorithms: Record<SignatureAlgorithmType, new () => SignatureAlgorithm> = {\n \"http://www.w3.org/2000/09/xmldsig#rsa-sha1\": signatureAlgorithms.RsaSha1,\n \"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\": signatureAlgorithms.RsaSha256,\n \"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512\": signatureAlgorithms.RsaSha512,\n // Disabled by default due to key confusion concerns.\n // 'http://www.w3.org/2000/09/xmldsig#hmac-sha1': SignatureAlgorithms.HmacSha1\n };\n\n static defaultNsForPrefix = {\n ds: \"http://www.w3.org/2000/09/xmldsig#\",\n };\n\n static noop = () => null;\n\n /**\n * The SignedXml constructor provides an abstraction for sign and verify xml documents. The object is constructed using\n * @param options {@link SignedXmlOptions}\n */\n constructor(options: SignedXmlOptions = {}) {\n const {\n idMode,\n idAttribute,\n privateKey,\n publicCert,\n signatureAlgorithm,\n canonicalizationAlgorithm,\n inclusiveNamespacesPrefixList,\n implicitTransforms,\n keyInfoAttributes,\n getKeyInfoContent,\n getCertFromKeyInfo,\n } = options;\n\n // Options\n this.idMode = idMode;\n this.idAttributes = [\"Id\", \"ID\", \"id\"];\n if (idAttribute) {\n this.idAttributes.unshift(idAttribute);\n }\n this.privateKey = privateKey;\n this.publicCert = publicCert;\n this.signatureAlgorithm = signatureAlgorithm ?? this.signatureAlgorithm;\n this.canonicalizationAlgorithm = canonicalizationAlgorithm;\n if (typeof inclusiveNamespacesPrefixList === \"string\") {\n this.inclusiveNamespacesPrefixList = inclusiveNamespacesPrefixList.split(\" \");\n } else if (utils.isArrayHasLength(inclusiveNamespacesPrefixList)) {\n this.inclusiveNamespacesPrefixList = inclusiveNamespacesPrefixList;\n }\n this.implicitTransforms = implicitTransforms ?? this.implicitTransforms;\n this.keyInfoAttributes = keyInfoAttributes ?? this.keyInfoAttributes;\n this.getKeyInfoContent = getKeyInfoContent ?? this.getKeyInfoContent;\n this.getCertFromKeyInfo = getCertFromKeyInfo ?? SignedXml.noop;\n this.CanonicalizationAlgorithms;\n this.HashAlgorithms;\n this.SignatureAlgorithms;\n }\n\n /**\n * Due to key-confusion issues, it's risky to have both hmac\n * and digital signature algorithms enabled at the same time.\n * This enables HMAC and disables other signing algorithms.\n */\n enableHMAC(): void {\n this.SignatureAlgorithms = {\n \"http://www.w3.org/2000/09/xmldsig#hmac-sha1\": signatureAlgorithms.HmacSha1,\n };\n this.getKeyInfoContent = SignedXml.noop;\n }\n\n /**\n * Builds the contents of a KeyInfo element as an XML string.\n *\n * For example, if the value of the prefix argument is 'foo', then\n * the resultant XML string will be \"<foo:X509Data></foo:X509Data>\"\n *\n * @return an XML string representation of the contents of a KeyInfo element, or `null` if no `KeyInfo` element should be included\n */\n static getKeyInfoContent({ publicCert, prefix }: GetKeyInfoContentArgs): string | null {\n if (publicCert == null) {\n return null;\n }\n\n prefix = prefix ? `${prefix}:` : \"\";\n\n let x509Certs = \"\";\n if (Buffer.isBuffer(publicCert)) {\n publicCert = publicCert.toString(\"latin1\");\n }\n\n let publicCertMatches: string[] = [];\n if (typeof publicCert === \"string\") {\n publicCertMatches = publicCert.match(utils.EXTRACT_X509_CERTS) || [];\n }\n\n if (publicCertMatches.length > 0) {\n x509Certs = publicCertMatches\n .map(\n (c) =>\n `<${prefix}X509Certificate>${utils\n .pemToDer(c)\n .toString(\"base64\")}</${prefix}X509Certificate>`,\n )\n .join(\"\");\n }\n\n return `<${prefix}X509Data>${x509Certs}</${prefix}X509Data>`;\n }\n\n /**\n * Returns the value of the signing certificate based on the contents of the\n * specified KeyInfo.\n *\n * @param keyInfo KeyInfo element (@see https://www.w3.org/TR/2008/REC-xmldsig-core-20080610/#sec-X509Data)\n * @return the signing certificate as a string in PEM format\n */\n static getCertFromKeyInfo(keyInfo?: Node | null): string | null {\n if (keyInfo != null) {\n const cert = xpath.select1(\".//*[local-name(.)='X509Certificate']\", keyInfo);\n if (isDomNode.isNodeLike(cert)) {\n return utils.derToPem(cert.textContent ?? \"\", \"CERTIFICATE\");\n }\n }\n\n return null;\n }\n\n /**\n * Validates the signature of the provided XML document synchronously using the configured key info provider.\n *\n * @param xml The XML document containing the signature to be validated.\n * @returns `true` if the signature is valid\n * @throws Error if no key info resolver is provided.\n */\n checkSignature(xml: string): boolean;\n /**\n * Validates the signature of the provided XML document synchronously using the configured key info provider.\n *\n * @param xml The XML document containing the signature to be validated.\n * @param callback Callback function to handle the validation result asynchronously.\n * @throws Error if the last parameter is provided and is not a function, or if no key info resolver is provided.\n */\n checkSignature(xml: string, callback: (error: Error | null, isValid?: boolean) => void): void;\n checkSignature(\n xml: string,\n callback?: (error: Error | null, isValid?: boolean) => void,\n ): unknown {\n if (callback != null && typeof callback !== \"function\") {\n throw new Error(\"Last parameter must be a callback function\");\n }\n\n this.signedXml = xml;\n\n const doc = new xmldom.DOMParser().parseFromString(xml);\n\n // Reset the references as only references from our re-parsed signedInfo node can be trusted\n this.references = [];\n\n const unverifiedSignedInfoCanon = this.getCanonSignedInfoXml(doc);\n if (!unverifiedSignedInfoCanon) {\n if (callback) {\n callback(new Error(\"Canonical signed info cannot be empty\"), false);\n return;\n }\n\n throw new Error(\"Canonical signed info cannot be empty\");\n }\n\n // unsigned, verify later to keep with consistent callback behavior\n const parsedUnverifiedSignedInfo = new xmldom.DOMParser().parseFromString(\n unverifiedSignedInfoCanon,\n \"text/xml\",\n );\n\n const unverifiedSignedInfoDoc = parsedUnverifiedSignedInfo.documentElement;\n if (!unverifiedSignedInfoDoc) {\n if (callback) {\n callback(new Error(\"Could not parse unverifiedSignedInfoCanon into a document\"), false);\n return;\n }\n\n throw new Error(\"Could not parse unverifiedSignedInfoCanon into a document\");\n }\n\n const references = utils.findChildren(unverifiedSignedInfoDoc, \"Reference\");\n if (!utils.isArrayHasLength(references)) {\n if (callback) {\n callback(new Error(\"could not find any Reference elements\"), false);\n return;\n }\n\n throw new Error(\"could not find any Reference elements\");\n }\n\n // TODO: In a future release we'd like to load the Signature and its References at the same time,\n // however, in the `.loadSignature()` method we don't have the entire document,\n // which we need to to keep the inclusive namespaces\n for (const reference of references) {\n this.loadReference(reference);\n }\n\n /* eslint-disable-next-line deprecation/deprecation */\n if (!this.getReferences().every((ref) => this.validateReference(ref, doc))) {\n /* Trustworthiness can only be determined if SignedInfo's (which holds References' DigestValue(s)\n which were validated at this stage) signature is valid. Execution does not proceed to validate\n signature phase thus each References' DigestValue must be considered to be untrusted (attacker\n might have injected any data with new new references and/or recalculated new DigestValue for\n altered Reference(s)). Returning any content via `signedReferences` would give false sense of\n trustworthiness if/when SignedInfo's (which holds references' DigestValues) signature is not\n valid(ated). Put simply: if one fails, they are all not trustworthy.\n */\n this.signedReferences = [];\n this.references.forEach((ref) => {\n ref.signedReference = undefined;\n });\n // TODO: add this breaking change here later on for even more security: `this.references = [];`\n\n if (callback) {\n callback(new Error(\"Could not validate all references\"), false);\n return;\n }\n\n // We return false because some references validated, but not all\n // We should actually be throwing an error here, but that would be a breaking change\n // See https://www.w3.org/TR/xmldsig-core/#sec-CoreValidation\n return false;\n }\n\n // (Stage B authentication step, show that the `signedInfoCanon` is signed)\n\n // First find the key & signature algorithm, these should match\n // Stage B: Take the signature algorithm and key and verify the `SignatureValue` against the canonicalized `SignedInfo`\n const signer = this.findSignatureAlgorithm(this.signatureAlgorithm);\n const key = this.getCertFromKeyInfo(this.keyInfo) || this.publicCert || this.privateKey;\n if (key == null) {\n throw new Error(\"KeyInfo or publicCert or privateKey is required to validate signature\");\n }\n\n // Check the signature verification to know whether to reset signature value or not.\n const sigRes = signer.verifySignature(unverifiedSignedInfoCanon, key, this.signatureValue);\n if (sigRes === true) {\n if (callback) {\n callback(null, true);\n } else {\n return true;\n }\n } else {\n // Ideally, we would start by verifying the `signedInfoCanon` first,\n // but that may cause some breaking changes, so we'll handle that in v7.x.\n // If we were validating `signedInfoCanon` first, we wouldn't have to reset this array.\n this.signedReferences = [];\n this.references.forEach((ref) => {\n ref.signedReference = undefined;\n });\n // TODO: add this breaking change here later on for even more security: `this.references = [];`\n\n if (callback) {\n callback(\n new Error(`invalid signature: the signature value ${this.signatureValue} is incorrect`),\n );\n return; // return early\n } else {\n throw new Error(\n `invalid signature: the signature value ${this.signatureValue} is incorrect`,\n );\n }\n }\n }\n\n private getCanonSignedInfoXml(doc: Document) {\n if (this.signatureNode == null) {\n throw new Error(\"No signature found.\");\n }\n if (typeof this.canonicalizationAlgorithm !== \"string\") {\n throw new Error(\"Missing canonicalizationAlgorithm when trying to get signed info for XML\");\n }\n\n const signedInfo = utils.findChildren(this.signatureNode, \"SignedInfo\");\n if (signedInfo.length === 0) {\n throw new Error(\"could not find SignedInfo element in the message\");\n }\n if (signedInfo.length > 1) {\n throw new Error(\n \"could not get canonicalized signed info for a signature that contains multiple SignedInfo nodes\",\n );\n }\n\n if (\n this.canonicalizationAlgorithm === \"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\" ||\n this.canonicalizationAlgorithm ===\n \"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments\"\n ) {\n if (!doc || typeof doc !== \"object\") {\n throw new Error(\n \"When canonicalization method is non-exclusive, whole xml dom must be provided as an argument\",\n );\n }\n }\n\n /**\n * Search for ancestor namespaces before canonicalization.\n */\n const ancestorNamespaces = utils.findAncestorNs(doc, \"//*[local-name()='SignedInfo']\");\n\n const c14nOptions = {\n ancestorNamespaces: ancestorNamespaces,\n };\n\n return this.getCanonXml([this.canonicalizationAlgorithm], signedInfo[0], c14nOptions);\n }\n\n private getCanonReferenceXml(doc: Document, ref: Reference, node: Node) {\n /**\n * Search for ancestor namespaces before canonicalization.\n */\n if (Array.isArray(ref.transforms)) {\n ref.ancestorNamespaces = utils.findAncestorNs(doc, ref.xpath, this.namespaceResolver);\n }\n\n const c14nOptions = {\n inclusiveNamespacesPrefixList: ref.inclusiveNamespacesPrefixList,\n ancestorNamespaces: ref.ancestorNamespaces,\n };\n\n return this.getCanonXml(ref.transforms, node, c14nOptions);\n }\n\n private calculateSignatureValue(doc: Document, callback?: ErrorFirstCallback<string>) {\n const signedInfoCanon = this.getCanonSignedInfoXml(doc);\n const signer = this.findSignatureAlgorithm(this.signatureAlgorithm);\n if (this.privateKey == null) {\n throw new Error(\"Private key is required to compute signature\");\n }\n if (typeof callback === \"function\") {\n signer.getSignature(signedInfoCanon, this.privateKey, callback);\n } else {\n this.signatureValue = signer.getSignature(signedInfoCanon, this.privateKey);\n }\n }\n\n private findSignatureAlgorithm(name?: SignatureAlgorithmType) {\n if (name == null) {\n throw new Error(\"signatureAlgorithm is required\");\n }\n const algo = this.SignatureAlgorithms[name];\n if (algo) {\n return new algo();\n } else {\n throw new Error(`signature algorithm '${name}' is not supported`);\n }\n }\n\n private findCanonicalizationAlgorithm(name: CanonicalizationOrTransformAlgorithmType) {\n if (name != null) {\n const algo = this.CanonicalizationAlgorithms[name];\n if (algo) {\n return new algo();\n }\n }\n\n throw new Error(`canonicalization algorithm '${name}' is not supported`);\n }\n\n private findHashAlgorithm(name: HashAlgorithmType) {\n const algo = this.HashAlgorithms[name];\n if (algo) {\n return new algo();\n } else {\n throw new Error(`hash algorithm '${name}' is not supported`);\n }\n }\n\n validateElementAgainstReferences(elemOrXpath: Element | string, doc: Document): Reference {\n let elem: Element;\n if (typeof elemOrXpath === \"string\") {\n const firstElem = xpath.select1(elemOrXpath, doc);\n isDomNode.assertIsElementNode(firstElem);\n elem = firstElem;\n } else {\n elem = elemOrXpath;\n }\n\n /* eslint-disable-next-line deprecation/deprecation */\n for (const ref of this.getReferences()) {\n const uri = ref.uri?.[0] === \"#\" ? ref.uri.substring(1) : ref.uri;\n\n for (const attr of this.idAttributes) {\n const elemId = elem.getAttribute(attr);\n if (uri === elemId) {\n ref.xpath = `//*[@*[local-name(.)='${attr}']='${uri}']`;\n break; // found the correct element, no need to check further\n }\n }\n\n const canonXml = this.getCanonReferenceXml(doc, ref, elem);\n const hash = this.findHashAlgorithm(ref.digestAlgorithm);\n const digest = hash.getHash(canonXml);\n\n if (utils.validateDigestValue(digest, ref.digestValue)) {\n return ref;\n }\n }\n\n throw new Error(\"No references passed validation\");\n }\n\n private validateReference(ref: Reference, doc: Document) {\n const uri = ref.uri?.[0] === \"#\" ? ref.uri.substring(1) : ref.uri;\n let elem: xpath.SelectSingleReturnType = null;\n\n if (uri === \"\") {\n elem = xpath.select1(\"//*\", doc);\n } else if (uri?.indexOf(\"'\") !== -1) {\n // xpath injection\n throw new Error(\"Cannot validate a uri with quotes inside it\");\n } else {\n let num_elements_for_id = 0;\n for (const attr of this.idAttributes) {\n const tmp_elemXpath = `//*[@*[local-name(.)='${attr}']='${uri}']`;\n const tmp_elem = xpath.select(tmp_elemXpath, doc);\n if (utils.isArrayHasLength(tmp_elem)) {\n num_elements_for_id += tmp_elem.length;\n\n if (num_elements_for_id > 1) {\n throw new Error(\n \"Cannot validate a document which contains multiple elements with the \" +\n \"same value for the ID / Id / Id attributes, in order to prevent \" +\n \"signature wrapping attack.\",\n );\n }\n\n elem = tmp_elem[0];\n ref.xpath = tmp_elemXpath;\n }\n }\n }\n\n ref.getValidatedNode = deprecate((xpathSelector?: string) => {\n xpathSelector = xpathSelector || ref.xpath;\n if (typeof xpathSelector !== \"string\" || ref.validationError != null) {\n return null;\n }\n const selectedValue = xpath.select1(xpathSelector, doc);\n return isDomNode.isNodeLike(selectedValue) ? selectedValue : null;\n }, \"`ref.getValidatedNode()` is deprecated and insecure. Use `ref.signedReference` or `this.getSignedReferences()` instead.\");\n\n if (!isDomNode.isNodeLike(elem)) {\n const validationError = new Error(\n `invalid signature: the signature references an element with uri ${ref.uri} but could not find such element in the xml`,\n );\n ref.validationError = validationError;\n return false;\n }\n\n const canonXml = this.getCanonReferenceXml(doc, ref, elem);\n const hash = this.findHashAlgorithm(ref.digestAlgorithm);\n const digest = hash.getHash(canonXml);\n\n if (!utils.validateDigestValue(digest, ref.digestValue)) {\n const validationError = new Error(\n `invalid signature: for uri ${ref.uri} calculated digest is ${digest} but the xml to validate supplies digest ${ref.digestValue}`,\n );\n ref.validationError = validationError;\n\n return false;\n }\n // This step can only be done after we have verified the `signedInfo`.\n // We verified that they have same hash,\n // thus the `canonXml` and _only_ the `canonXml` can be trusted.\n // Append this to `signedReferences`.\n this.signedReferences.push(canonXml);\n ref.signedReference = canonXml;\n\n return true;\n }\n\n findSignatures(doc: Node): Node[] {\n const nodes = xpath.select(\n \"//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']\",\n doc,\n );\n\n return isDomNode.isArrayOfNodes(nodes) ? nodes : [];\n }\n\n /**\n * Loads the signature information from the provided XML node or string.\n *\n * @param signatureNode The XML node or string representing the signature.\n */\n loadSignature(signatureNode: Node | string): void {\n if (typeof signatureNode === \"string\") {\n this.signatureNode = signatureNode = new xmldom.DOMParser().parseFromString(signatureNode);\n } else {\n this.signatureNode = signatureNode;\n }\n\n this.signatureXml = signatureNode.toString();\n\n const node = xpath.select1(\n \".//*[local-name(.)='CanonicalizationMethod']/@Algorithm\",\n signatureNode,\n );\n if (!isDomNode.isNodeLike(node)) {\n throw new Error(\"could not find CanonicalizationMethod/@Algorithm element\");\n }\n\n if (isDomNode.isAttributeNode(node)) {\n this.canonicalizationAlgorithm = node.value as CanonicalizationAlgorithmType;\n }\n\n const signatureAlgorithm = xpath.select1(\n \".//*[local-name(.)='SignatureMethod']/@Algorithm\",\n signatureNode,\n );\n\n if (isDomNode.isAttributeNode(signatureAlgorithm)) {\n this.signatureAlgorithm = signatureAlgorithm.value as SignatureAlgorithmType;\n }\n\n const signedInfoNodes = utils.findChildren(this.signatureNode, \"SignedInfo\");\n if (!utils.isArrayHasLength(signedInfoNodes)) {\n throw new Error(\"no signed info node found\");\n }\n if (signedInfoNodes.length > 1) {\n throw new Error(\"could not load signature that contains multiple SignedInfo nodes\");\n }\n\n // Try to operate on the c14n version of `signedInfo`. This forces the initial `getReferences()`\n // API call to always return references that are loaded under the canonical `SignedInfo`\n // in the case that the client access the `.references` **before** signature verification.\n\n // Ensure canonicalization algorithm is exclusive, otherwise we'd need the entire document\n let canonicalizationAlgorithmForSignedInfo = this.canonicalizationAlgorithm;\n if (\n !canonicalizationAlgorithmForSignedInfo ||\n canonicalizationAlgorithmForSignedInfo ===\n \"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\" ||\n canonicalizationAlgorithmForSignedInfo ===\n \"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments\"\n ) {\n canonicalizationAlgorithmForSignedInfo = \"http://www.w3.org/2001/10/xml-exc-c14n#\";\n }\n\n const temporaryCanonSignedInfo = this.getCanonXml(\n [canonicalizationAlgorithmForSignedInfo],\n signedInfoNodes[0],\n );\n const temporaryCanonSignedInfoXml = new xmldom.DOMParser().parseFromString(\n temporaryCanonSignedInfo,\n \"text/xml\",\n );\n const signedInfoDoc = temporaryCanonSignedInfoXml.documentElement;\n\n this.references = [];\n const references = utils.findChildren(signedInfoDoc, \"Reference\");\n\n if (!utils.isArrayHasLength(references)) {\n throw new Error(\"could not find any Reference elements\");\n }\n\n for (const reference of references) {\n this.loadReference(reference);\n }\n\n const signatureValue = xpath.select1(\n \".//*[local-name(.)='SignatureValue']/text()\",\n signatureNode,\n );\n\n if (isDomNode.isTextNode(signatureValue)) {\n this.signatureValue = signatureValue.data.replace(/\\r?\\n/g, \"\");\n }\n\n const keyInfo = xpath.select1(\".//*[local-name(.)='KeyInfo']\", signatureNode);\n\n if (isDomNode.isNodeLike(keyInfo)) {\n this.keyInfo = keyInfo;\n }\n }\n\n /**\n * Load the reference xml node to a model\n *\n */\n private loadReference(refNode: Node) {\n let nodes = utils.findChildren(refNode, \"DigestMethod\");\n if (nodes.length === 0) {\n throw new Error(`could not find DigestMethod in reference ${refNode.toString()}`);\n }\n const digestAlgoNode = nodes[0];\n\n const attr = utils.findAttr(digestAlgoNode, \"Algorithm\");\n if (!attr) {\n throw new Error(`could not find Algorithm attribute in node ${digestAlgoNode.toString()}`);\n }\n const digestAlgo = attr.value;\n\n nodes = utils.findChildren(refNode, \"DigestValue\");\n if (nodes.length === 0) {\n throw new Error(`could not find DigestValue node in reference ${refNode.toString()}`);\n }\n\n if (nodes.length > 1) {\n throw new Error(\n `could not load reference for a node that contains multiple DigestValue nodes: ${refNode.toString()}`,\n );\n }\n const digestValue = nodes[0].textContent;\n if (!digestValue) {\n throw new Error(`could not find the value of DigestValue in ${refNode.toString()}`);\n }\n\n const transforms: string[] = [];\n let inclusiveNamespacesPrefixList: string[] = [];\n nodes = utils.findChildren(refNode, \"Transforms\");\n if (nodes.length !== 0) {\n const transformsNode = nodes[0];\n const transformsAll = utils.findChildren(transformsNode, \"Transform\");\n for (const transform of transformsAll) {\n const transformAttr = utils.findAttr(transform, \"Algorithm\");\n\n if (transformAttr) {\n transforms.push(transformAttr.value);\n }\n }\n\n // This is a little strange, we are looking for children of the last child of `transformsNode`\n const inclusiveNamespaces = utils.findChildren(\n transformsAll[transformsAll.length - 1],\n \"InclusiveNamespaces\",\n );\n if (utils.isArrayHasLength(inclusiveNamespaces)) {\n // Should really only be one prefix list, but maybe there's some circumstances where more than one to let's handle it\n inclusiveNamespacesPrefixList = inclusiveNamespaces\n .flatMap((namespace) => (namespace.getAttribute(\"PrefixList\") ?? \"\").split(\" \"))\n .filter((value) => value.length > 0);\n }\n }\n\n if (utils.isArrayHasLength(this.implicitTransforms)) {\n this.implicitTransforms.forEach(function (t) {\n transforms.push(t);\n });\n }\n\n /**\n * DigestMethods take an octet stream rather than a node set. If the output of the last transform is a node set, we\n * need to canonicalize the node set to an octet stream using non-exclusive canonicalization. If there are no\n * transforms, we need to canonicalize because URI dereferencing for a same-document reference will return a node-set.\n * @see:\n * https://www.w3.org/TR/xmldsig-core1/#sec-DigestMethod\n * https://www.w3.org/TR/xmldsig-core1/#sec-ReferenceProcessingModel\n * https://www.w3.org/TR/xmldsig-core1/#sec-Same-Document\n */\n if (\n transforms.length === 0 ||\n transforms[transforms.length - 1] === \"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"\n ) {\n transforms.push(\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\");\n }\n const refUri = isDomNode.isElementNode(refNode)\n ? refNode.getAttribute(\"URI\") || undefined\n : undefined;\n\n this.addReference({\n transforms,\n digestAlgorithm: digestAlgo,\n uri: refUri,\n digestValue,\n inclusiveNamespacesPrefixList,\n isEmptyUri: false,\n });\n }\n\n /**\n * Adds a reference to the signature.\n *\n * @param xpath The XPath expression to select the XML nodes to be referenced.\n * @param transforms An array of transform algorithms to be applied to the selected nodes.\n * @param digestAlgorithm The digest algorithm to use for computing the digest value.\n * @param uri The URI identifier for the reference. If empty, an empty URI will be used.\n * @param digestValue The expected digest value for the reference.\n * @param inclusiveNamespacesPrefixList The prefix list for inclusive namespace canonicalization.\n * @param isEmptyUri Indicates whether the URI is empty. Defaults to `false`.\n */\n addReference({\n xpath,\n transforms,\n digestAlgorithm,\n uri = \"\",\n digestValue,\n inclusiveNamespacesPrefixList = [],\n isEmptyUri = false,\n }: Partial<Reference> & Pick<Reference, \"xpath\">): void {\n if (digestAlgorithm == null) {\n throw new Error(\"digestAlgorithm is required\");\n }\n\n if (!utils.isArrayHasLength(transforms)) {\n throw new Error(\"transforms must contain at least one transform algorithm\");\n }\n\n this.references.push({\n xpath,\n transforms,\n digestAlgorithm,\n uri,\n digestValue,\n inclusiveNamespacesPrefixList,\n isEmptyUri,\n getValidatedNode: () => {\n throw new Error(\n \"Reference has not been validated yet; Did you call `sig.checkSignature()`?\",\n );\n },\n });\n }\n\n /**\n * Returns the list of references.\n */\n getReferences() {\n // TODO: Refactor once `getValidatedNode` is removed\n /* Once we completely remove the deprecated `getValidatedNode()` method,\n we can change this to return a clone to prevent accidental mutations,\n e.g.:\n return [...this.references];\n */\n\n return this.references;\n }\n\n getSignedReferences() {\n return [...this.signedReferences];\n }\n\n /**\n * Compute the signature of the given XML (using the already defined settings).\n *\n * @param xml The XML to compute the signature for.\n * @param callback A callback function to handle the signature computation asynchronously.\n * @returns void\n * @throws TypeError If the xml can not be parsed.\n */\n computeSignature(xml: string): void;\n\n /**\n * Compute the signature of the given XML (using the already defined settings).\n *\n * @param xml The XML to compute the signature for.\n * @param callback A callback function to handle the signature computation asynchronously.\n * @returns void\n * @throws TypeError If the xml can not be parsed.\n */\n computeSignature(xml: string, callback: ErrorFirstCallback<SignedXml>): void;\n\n /**\n * Compute the signature of the given XML (using the already defined settings).\n *\n * @param xml The XML to compute the signature for.\n * @param opts An object containing options for the signature computation.\n * @returns If no callback is provided, returns `this` (the instance of SignedXml).\n * @throws TypeError If the xml can not be parsed, or Error if there were invalid options passed.\n */\n computeSignature(xml: string, options: ComputeSignatureOptions): void;\n\n /**\n * Compute the signature of the given XML (using the already defined settings).\n *\n * @param xml The XML to compute the signature for.\n * @param opts An object containing options for the signature computation.\n * @param callback A callback function to handle the signature computation asynchronously.\n * @returns void\n * @throws TypeError If the xml can not be parsed, or Error if there were invalid options passed.\n */\n computeSignature(\n xml: string,\n options: ComputeSignatureOptions,\n callback: ErrorFirstCallback<SignedXml>,\n ): void;\n\n computeSignature(\n xml: string,\n options?: ComputeSignatureOptions | ErrorFirstCallback<SignedXml>,\n callbackParam?: ErrorFirstCallback<SignedXml>,\n ): void {\n let callback: ErrorFirstCallback<SignedXml>;\n if (typeof options === \"function\" && callbackParam == null) {\n callback = options as ErrorFirstCallback<SignedXml>;\n options = {} as ComputeSignatureOptions;\n } else {\n callback = callbackParam as ErrorFirstCallback<SignedXml>;\n options = (options ?? {}) as ComputeSignatureOptions;\n }\n\n const doc = new xmldom.DOMParser().parseFromString(xml);\n let xmlNsAttr = \"xmlns\";\n const signatureAttrs: string[] = [];\n let currentPrefix: string;\n\n const validActions = [\"append\", \"prepend\", \"before\", \"after\"];\n\n const prefix = options.prefix;\n const attrs = options.attrs || {};\n const location = options.location || {};\n const existingPrefixes = options.existingPrefixes || {};\n\n this.namespaceResolver = {\n lookupNamespaceURI: function (prefix) {\n return prefix ? existingPrefixes[prefix] : null;\n },\n };\n\n // defaults to the root node\n location.reference = location.reference || \"/*\";\n // defaults to append action\n location.action = location.action || \"append\";\n\n if (validActions.indexOf(location.action) === -1) {\n const err = new Error(\n `location.action option has an invalid action: ${\n location.action\n }, must be any of the following values: ${validActions.join(\", \")}`,\n );\n if (!callback) {\n throw err;\n } else {\n callback(err);\n return;\n }\n }\n\n // automatic insertion of `:`\n if (prefix) {\n xmlNsAttr += `:${prefix}`;\n currentPrefix = `${prefix}:`;\n } else {\n currentPrefix = \"\";\n }\n\n Object.keys(attrs).forEach(function (name) {\n if (name !== \"xmlns\" && name !== xmlNsAttr) {\n signatureAttrs.push(`${name}=\"${attrs[name]}\"`);\n }\n });\n\n // add the xml namespace attribute\n signatureAttrs.push(`${xmlNsAttr}=\"http://www.w3.org/2000/09/xmldsig#\"`);\n\n let signatureXml = `<${currentPrefix}Signature ${signatureAttrs.join(\" \")}>`;\n\n signatureXml += this.createSignedInfo(doc, prefix);\n signatureXml += this.getKeyInfo(prefix);\n signatureXml += `</${currentPrefix}Signature>`;\n\n this.originalXmlWithIds = doc.toString();\n\n let existingPrefixesString = \"\";\n Object.keys(existingPrefixes).forEach(function (key) {\n existingPrefixesString += `xmlns:${key}=\"${existingPrefixes[key]}\" `;\n });\n\n // A trick to remove the namespaces that already exist in the xml\n // This only works if the prefix and namespace match with those in the xml\n const dummySignatureWrapper = `<Dummy ${existingPrefixesString}>${signatureXml}</Dummy>`;\n const nodeXml = new xmldom.DOMParser().parseFromString(dummySignatureWrapper);\n\n // Because we are using a dummy wrapper hack described above, we know there will be a `firstChild`\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const signatureDoc = nodeXml.documentElement.firstChild!;\n\n const referenceNode = xpath.select1(location.reference, doc);\n\n if (!isDomNode.isNodeLike(referenceNode)) {\n const err2 = new Error(\n `the following xpath cannot be used because it was not found: ${location.reference}`,\n );\n if (!callback) {\n throw err2;\n } else {\n callback(err2);\n return;\n }\n }\n\n if (location.action === \"append\") {\n referenceNode.appendChild(signatureDoc);\n } else if (location.action === \"prepend\") {\n referenceNode.insertBefore(signatureDoc, referenceNode.firstChild);\n } else if (location.action === \"before\") {\n if (referenceNode.parentNode == null) {\n throw new Error(\n \"`location.reference` refers to the root node (by default), so we can't insert `before`\",\n );\n }\n referenceNode.parentNode.insertBefore(signatureDoc, referenceNode);\n } else if (location.action === \"after\") {\n if (referenceNode.parentNode == null) {\n throw new Error(\n \"`location.reference` refers to the root node (by default), so we can't insert `after`\",\n );\n }\n referenceNode.parentNode.insertBefore(signatureDoc, referenceNode.nextSibling);\n }\n\n this.signatureNode = signatureDoc;\n const signedInfoNodes = utils.findChildren(this.signatureNode, \"SignedInfo\");\n if (signedInfoNodes.length === 0) {\n const err3 = new Error(\"could not find SignedInfo element in the message\");\n if (!callback) {\n throw err3;\n } else {\n callback(err3);\n return;\n }\n }\n const signedInfoNode = signedInfoNodes[0];\n\n if (typeof callback === \"function\") {\n // Asynchronous flow\n this.calculateSignatureValue(doc, (err, signature) => {\n if (err) {\n callback(err);\n } else {\n this.signatureValue = signature || \"\";\n signatureDoc.insertBefore(this.createSignature(prefix), signedInfoNode.nextSibling);\n this.signatureXml = signatureDoc.toString();\n this.signedXml = doc.toString();\n callback(null, this);\n }\n });\n } else {\n // Synchronous flow\n this.calculateSignatureValue(doc);\n signatureDoc.insertBefore(this.createSignature(prefix), signedInfoNode.nextSibling);\n this.signatureXml = signatureDoc.toString();\n this.signedXml = doc.toString();\n }\n }\n\n private getKeyInfo(prefix) {\n const currentPrefix = prefix ? `${prefix}:` : \"\";\n\n let keyInfoAttrs = \"\";\n if (this.keyInfoAttributes) {\n Object.keys(this.keyInfoAttributes).forEach((name) => {\n keyInfoAttrs += ` ${name}=\"${this.keyInfoAttributes[name]}\"`;\n });\n }\n\n const keyInfoContent = this.getKeyInfoContent({ publicCert: this.publicCert, prefix });\n if (keyInfoAttrs || keyInfoContent) {\n return `<${currentPrefix}KeyInfo${keyInfoAttrs}>${keyInfoContent}</${currentPrefix}KeyInfo>`;\n }\n\n return \"\";\n }\n\n /**\n * Generate the Reference nodes (as part of the signature process)\n *\n */\n private createReferences(doc, prefix) {\n let res = \"\";\n\n prefix = prefix || \"\";\n prefix = prefix ? `${prefix}:` : prefix;\n\n /* eslint-disable-next-line deprecation/deprecation */\n for (const ref of this.getReferences()) {\n const nodes = xpath.selectWithResolver(ref.xpath ?? \"\", doc, this.namespaceResolver);\n\n if (!utils.isArrayHasLength(nodes)) {\n throw new Error(\n `the following xpath cannot be signed because it was not found: ${ref.xpath}`,\n );\n }\n\n for (const node of nodes) {\n if (ref.isEmptyUri) {\n res += `<${prefix}Reference URI=\"\">`;\n } else {\n const id = this.ensureHasId(node);\n ref.uri = id;\n res += `<${prefix}Reference URI=\"#${id}\">`;\n }\n res += `<${prefix}Transforms>`;\n for (const trans of ref.transforms || []) {\n const transform = this.findCanonicalizationAlgorithm(trans);\n res += `<${prefix}Transform Algorithm=\"${transform.getAlgorithmName()}\"`;\n if (utils.isArrayHasLength(ref.inclusiveNamespacesPrefixList)) {\n res += \">\";\n res += `<InclusiveNamespaces PrefixList=\"${ref.inclusiveNamespacesPrefixList.join(\n \" \",\n )}\" xmlns=\"${transform.getAlgorithmName()}\"/>`;\n res += `</${prefix}Transform>`;\n } else {\n res += \" />\";\n }\n }\n\n const canonXml = this.getCanonReferenceXml(doc, ref, node);\n\n const digestAlgorithm = this.findHashAlgorithm(ref.digestAlgorithm);\n res +=\n `</${prefix}Transforms>` +\n `<${prefix}DigestMethod Algorithm=\"${digestAlgorithm.getAlgorithmName()}\" />` +\n `<${prefix}DigestValue>${digestAlgorithm.getHash(canonXml)}</${prefix}DigestValue>` +\n `</${prefix}Reference>`;\n }\n }\n\n return res;\n }\n\n getCanonXml(\n transforms: Reference[\"transforms\"],\n node: Node,\n options: CanonicalizationOrTransformationAlgorithmProcessOptions = {},\n ) {\n options.defaultNsForPrefix = options.defaultNsForPrefix ?? SignedXml.defaultNsForPrefix;\n options.signatureNode = this.signatureNode;\n\n const canonXml = node.cloneNode(true); // Deep clone\n let transformedXml: Node | string = canonXml;\n\n transforms.forEach((transformName) => {\n if (isDomNode.isNodeLike(transformedXml)) {\n // If, after processing, `transformedNode` is a string, we can't do anymore transforms on it\n const transform = this.findCanonicalizationAlgorithm(transformName);\n transformedXml = transform.process(transformedXml, options);\n }\n //TODO: currently transform.process may return either Node or String value (enveloped transformation returns Node, exclusive-canonicalization returns String).\n //This either needs to be more explicit in the API, or all should return the same.\n //exclusive-canonicalization returns String since it builds the Xml by hand. If it had used xmldom it would incorrectly minimize empty tags\n //to <x/> instead of <x></x> and also incorrectly handle some delicate line break issues.\n //enveloped transformation returns Node since if it would return String consider this case:\n //<x xmlns:p='ns'><p:y/></x>\n //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.\n });\n\n return transformedXml.toString();\n }\n\n /**\n * Ensure an element has Id attribute. If not create it with unique value.\n * Work with both normal and wssecurity Id flavour\n */\n private ensureHasId(node) {\n let attr;\n\n if (this.idMode === \"wssecurity\") {\n attr = utils.findAttr(\n node,\n \"Id\",\n \"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\",\n );\n } else {\n this.idAttributes.some((idAttribute) => {\n attr = utils.findAttr(node, idAttribute);\n return !!attr; // This will break the loop as soon as a truthy attr is found.\n });\n }\n\n if (attr) {\n return attr.value;\n }\n\n //add the attribute\n const id = `_${this.id++}`;\n\n if (this.idMode === \"wssecurity\") {\n node.setAttributeNS(\n \"http://www.w3.org/2000/xmlns/\",\n \"xmlns:wsu\",\n \"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\",\n );\n node.setAttributeNS(\n \"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\",\n \"wsu:Id\",\n id,\n );\n } else {\n node.setAttribute(\"Id\", id);\n }\n\n return id;\n }\n\n /**\n * Create the SignedInfo element\n *\n */\n private createSignedInfo(doc, prefix) {\n if (typeof this.canonicalizationAlgorithm !== \"string\") {\n throw new Error(\n \"Missing canonicalizationAlgorithm when trying to create signed info for XML\",\n );\n }\n const transform = this.findCanonicalizationAlgorithm(this.canonicalizationAlgorithm);\n const algo = this.findSignatureAlgorithm(this.signatureAlgorithm);\n let currentPrefix;\n\n currentPrefix = prefix || \"\";\n currentPrefix = currentPrefix ? `${currentPrefix}:` : currentPrefix;\n\n let res = `<${currentPrefix}SignedInfo>`;\n res += `<${currentPrefix}CanonicalizationMethod Algorithm=\"${transform.getAlgorithmName()}\"`;\n if (utils.isArrayHasLength(this.inclusiveNamespacesPrefixList)) {\n res += \">\";\n res += `<InclusiveNamespaces PrefixList=\"${this.inclusiveNamespacesPrefixList.join(\n \" \",\n )}\" xmlns=\"${transform.getAlgorithmName()}\"/>`;\n res += `</${currentPrefix}CanonicalizationMethod>`;\n } else {\n res += \" />\";\n }\n res += `<${currentPrefix}SignatureMethod Algorithm=\"${algo.getAlgorithmName()}\" />`;\n\n res += this.createReferences(doc, prefix);\n res += `</${currentPrefix}SignedInfo>`;\n return res;\n }\n\n /**\n * Create the Signature element\n *\n */\n private createSignature(prefix?: string) {\n let xmlNsAttr = \"xmlns\";\n\n if (prefix) {\n xmlNsAttr += `:${prefix}`;\n prefix += \":\";\n } else {\n prefix = \"\";\n }\n\n const signatureValueXml = `<${prefix}SignatureValue>${this.signatureValue}</${prefix}SignatureValue>`;\n //the canonicalization requires to get a valid xml node.\n //we need to wrap the info in a dummy signature since it contains the default namespace.\n const dummySignatureWrapper = `<${prefix}Signature ${xmlNsAttr}=\"http://www.w3.org/2000/09/xmldsig#\">${signatureValueXml}</${prefix}Signature>`;\n\n const doc = new xmldom.DOMParser().parseFromString(dummySignatureWrapper);\n\n // Because we are using a dummy wrapper hack described above, we know there will be a `firstChild`\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return doc.documentElement.firstChild!;\n }\n\n /**\n * Returns just the signature part, must be called only after {@link computeSignature}\n *\n * @returns The signature XML.\n */\n getSignatureXml(): string {\n return this.signatureXml;\n }\n\n /**\n * Returns the original xml with Id attributes added on relevant elements (required for validation), must be called only after {@link computeSignature}\n *\n * @returns The original XML with IDs.\n */\n getOriginalXmlWithIds(): string {\n return this.originalXmlWithIds;\n }\n\n /**\n * Returns the original xml document with the signature in it, must be called only after {@link computeSignature}\n *\n * @returns The signed XML.\n */\n getSignedXml(): string {\n return this.signedXml;\n }\n}\n"]}
@@ -0,0 +1,125 @@
1
+ /// <reference types="node" />
2
+ import * as crypto from "crypto";
3
+ export type ErrorFirstCallback<T> = (err: Error | null, result?: T) => void;
4
+ export type CanonicalizationAlgorithmType = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315" | "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments" | "http://www.w3.org/2001/10/xml-exc-c14n#" | "http://www.w3.org/2001/10/xml-exc-c14n#WithComments" | string;
5
+ export type CanonicalizationOrTransformAlgorithmType = CanonicalizationAlgorithmType | "http://www.w3.org/2000/09/xmldsig#enveloped-signature";
6
+ export type HashAlgorithmType = "http://www.w3.org/2000/09/xmldsig#sha1" | "http://www.w3.org/2001/04/xmlenc#sha256" | "http://www.w3.org/2001/04/xmlenc#sha512" | string;
7
+ export type SignatureAlgorithmType = "http://www.w3.org/2000/09/xmldsig#rsa-sha1" | "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" | "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512" | "http://www.w3.org/2000/09/xmldsig#hmac-sha1" | string;
8
+ /**
9
+ * @param cert the certificate as a string or array of strings (@see https://www.w3.org/TR/2008/REC-xmldsig-core-20080610/#sec-X509Data)
10
+ * @param prefix an optional namespace alias to be used for the generated XML
11
+ */
12
+ export interface GetKeyInfoContentArgs {
13
+ publicCert?: crypto.KeyLike;
14
+ prefix?: string | null;
15
+ }
16
+ /**
17
+ * Options for the SignedXml constructor.
18
+ */
19
+ export interface SignedXmlOptions {
20
+ idMode?: "wssecurity";
21
+ idAttribute?: string;
22
+ privateKey?: crypto.KeyLike;
23
+ publicCert?: crypto.KeyLike;
24
+ signatureAlgorithm?: SignatureAlgorithmType;
25
+ canonicalizationAlgorithm?: CanonicalizationAlgorithmType;
26
+ inclusiveNamespacesPrefixList?: string | string[];
27
+ implicitTransforms?: ReadonlyArray<CanonicalizationOrTransformAlgorithmType>;
28
+ keyInfoAttributes?: Record<string, string>;
29
+ getKeyInfoContent?(args?: GetKeyInfoContentArgs): string | null;
30
+ getCertFromKeyInfo?(keyInfo?: Node | null): string | null;
31
+ }
32
+ export interface NamespacePrefix {
33
+ prefix: string;
34
+ namespaceURI: string;
35
+ }
36
+ export interface RenderedNamespace {
37
+ rendered: string;
38
+ newDefaultNs: string;
39
+ }
40
+ export interface CanonicalizationOrTransformationAlgorithmProcessOptions {
41
+ defaultNs?: string;
42
+ defaultNsForPrefix?: Record<string, string>;
43
+ ancestorNamespaces?: NamespacePrefix[];
44
+ signatureNode?: Node | null;
45
+ inclusiveNamespacesPrefixList?: string[];
46
+ }
47
+ export interface ComputeSignatureOptionsLocation {
48
+ reference?: string;
49
+ action?: "append" | "prepend" | "before" | "after";
50
+ }
51
+ /**
52
+ * Options for the computeSignature method.
53
+ *
54
+ * - `prefix` {String} Adds a prefix for the generated signature tags
55
+ * - `attrs` {Object} A hash of attributes and values `attrName: value` to add to the signature root node
56
+ * - `location` {{ reference: String, action: String }}
57
+ * - `existingPrefixes` {Object} A hash of prefixes and namespaces `prefix: namespace` already in the xml
58
+ * An object with a `reference` key which should
59
+ * contain a XPath expression, an `action` key which
60
+ * should contain one of the following values:
61
+ * `append`, `prepend`, `before`, `after`
62
+ */
63
+ export interface ComputeSignatureOptions {
64
+ prefix?: string;
65
+ attrs?: Record<string, string>;
66
+ location?: ComputeSignatureOptionsLocation;
67
+ existingPrefixes?: Record<string, string>;
68
+ }
69
+ /**
70
+ * Represents a reference node for XML digital signature.
71
+ */
72
+ export interface Reference {
73
+ xpath?: string;
74
+ transforms: ReadonlyArray<CanonicalizationOrTransformAlgorithmType>;
75
+ digestAlgorithm: HashAlgorithmType;
76
+ uri: string;
77
+ digestValue?: unknown;
78
+ inclusiveNamespacesPrefixList: string[];
79
+ isEmptyUri: boolean;
80
+ ancestorNamespaces?: NamespacePrefix[];
81
+ validationError?: Error;
82
+ getValidatedNode(xpathSelector?: string): Node | null;
83
+ signedReference?: string;
84
+ }
85
+ /** Implement this to create a new CanonicalizationOrTransformationAlgorithm */
86
+ export interface CanonicalizationOrTransformationAlgorithm {
87
+ process(node: Node, options: CanonicalizationOrTransformationAlgorithmProcessOptions): Node | string;
88
+ getAlgorithmName(): CanonicalizationOrTransformAlgorithmType;
89
+ }
90
+ /** Implement this to create a new HashAlgorithm */
91
+ export interface HashAlgorithm {
92
+ getAlgorithmName(): HashAlgorithmType;
93
+ getHash(xml: string): string;
94
+ }
95
+ /** Extend this to create a new SignatureAlgorithm */
96
+ export interface SignatureAlgorithm {
97
+ /**
98
+ * Sign the given string using the given key
99
+ */
100
+ getSignature(signedInfo: crypto.BinaryLike, privateKey: crypto.KeyLike): string;
101
+ getSignature(signedInfo: crypto.BinaryLike, privateKey: crypto.KeyLike, callback?: ErrorFirstCallback<string>): void;
102
+ /**
103
+ * Verify the given signature of the given string using key
104
+ *
105
+ * @param key a public cert, public key, or private key can be passed here
106
+ */
107
+ verifySignature(material: string, key: crypto.KeyLike, signatureValue: string): boolean;
108
+ verifySignature(material: string, key: crypto.KeyLike, signatureValue: string, callback?: ErrorFirstCallback<boolean>): void;
109
+ getAlgorithmName(): SignatureAlgorithmType;
110
+ }
111
+ /** Implement this to create a new TransformAlgorithm */
112
+ export interface TransformAlgorithm {
113
+ getAlgorithmName(): CanonicalizationOrTransformAlgorithmType;
114
+ process(node: Node): string;
115
+ }
116
+ /**
117
+ * This function will add a callback version of a sync function.
118
+ *
119
+ * This follows the factory pattern.
120
+ * Just call this function, passing the function that you'd like to add a callback version of.
121
+ */
122
+ export declare function createOptionalCallbackFunction<T, A extends unknown[]>(syncVersion: (...args: A) => T): {
123
+ (...args: A): T;
124
+ (...args: [...A, ErrorFirstCallback<T>]): void;
125
+ };
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ /* eslint-disable no-unused-vars */
3
+ // Type definitions for @node-saml/xml-crypto
4
+ // Project: https://github.com/node-saml/xml-crypto#readme
5
+ // Original definitions by: Eric Heikes <https://github.com/eheikes>
6
+ // Max Chehab <https://github.com/maxchehab>
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.createOptionalCallbackFunction = void 0;
9
+ /**
10
+ * ### Sign
11
+ * #### Properties
12
+ * - {@link SignedXml#privateKey} [required]
13
+ * - {@link SignedXml#publicCert} [optional]
14
+ * - {@link SignedXml#signatureAlgorithm} [optional]
15
+ * - {@link SignedXml#canonicalizationAlgorithm} [optional]
16
+ * #### Api
17
+ * - {@link SignedXml#addReference}
18
+ * - {@link SignedXml#computeSignature}
19
+ * - {@link SignedXml#getSignedXml}
20
+ * - {@link SignedXml#getSignatureXml}
21
+ * - {@link SignedXml#getOriginalXmlWithIds}
22
+ *
23
+ * ### Verify
24
+ * #### Properties
25
+ * - {@link SignedXml#publicCert} [optional]
26
+ * #### Api
27
+ * - {@link SignedXml#loadSignature}
28
+ * - {@link SignedXml#checkSignature}
29
+ */
30
+ function isErrorFirstCallback(possibleCallback) {
31
+ return typeof possibleCallback === "function";
32
+ }
33
+ /**
34
+ * This function will add a callback version of a sync function.
35
+ *
36
+ * This follows the factory pattern.
37
+ * Just call this function, passing the function that you'd like to add a callback version of.
38
+ */
39
+ function createOptionalCallbackFunction(syncVersion) {
40
+ return ((...args) => {
41
+ const possibleCallback = args[args.length - 1];
42
+ if (isErrorFirstCallback(possibleCallback)) {
43
+ try {
44
+ const result = syncVersion(...args.slice(0, -1));
45
+ possibleCallback(null, result);
46
+ }
47
+ catch (err) {
48
+ possibleCallback(err instanceof Error ? err : new Error("Unknown error"));
49
+ }
50
+ }
51
+ else {
52
+ return syncVersion(...args);
53
+ }
54
+ });
55
+ }
56
+ exports.createOptionalCallbackFunction = createOptionalCallbackFunction;
57
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,mCAAmC;AACnC,6CAA6C;AAC7C,0DAA0D;AAC1D,oEAAoE;AACpE,qEAAqE;;;AA0LrE;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,SAAS,oBAAoB,CAC3B,gBAAyB;IAEzB,OAAO,OAAO,gBAAgB,KAAK,UAAU,CAAC;AAChD,CAAC;AAED;;;;;GAKG;AACH,SAAgB,8BAA8B,CAC5C,WAA8B;IAK9B,OAAO,CAAC,CAAC,GAAG,IAAuC,EAAE,EAAE;QACrD,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC/C,IAAI,oBAAoB,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC3C,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,WAAW,CAAC,GAAI,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAO,CAAC,CAAC;gBACxD,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YACjC,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,gBAAgB,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;YAC5E,CAAC;QACH,CAAC;aAAM,CAAC;YACN,OAAO,WAAW,CAAC,GAAI,IAAU,CAAC,CAAC;QACrC,CAAC;IACH,CAAC,CAGA,CAAC;AACJ,CAAC;AAtBD,wEAsBC","sourcesContent":["/* eslint-disable no-unused-vars */\n// Type definitions for @node-saml/xml-crypto\n// Project: https://github.com/node-saml/xml-crypto#readme\n// Original definitions by: Eric Heikes <https://github.com/eheikes>\n// Max Chehab <https://github.com/maxchehab>\n\n/// <reference types=\"node\" />\n\nimport * as crypto from \"crypto\";\n\nexport type ErrorFirstCallback<T> = (err: Error | null, result?: T) => void;\n\nexport type CanonicalizationAlgorithmType =\n | \"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\"\n | \"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments\"\n | \"http://www.w3.org/2001/10/xml-exc-c14n#\"\n | \"http://www.w3.org/2001/10/xml-exc-c14n#WithComments\"\n | string;\n\nexport type CanonicalizationOrTransformAlgorithmType =\n | CanonicalizationAlgorithmType\n | \"http://www.w3.org/2000/09/xmldsig#enveloped-signature\";\n\nexport type HashAlgorithmType =\n | \"http://www.w3.org/2000/09/xmldsig#sha1\"\n | \"http://www.w3.org/2001/04/xmlenc#sha256\"\n | \"http://www.w3.org/2001/04/xmlenc#sha512\"\n | string;\n\nexport type SignatureAlgorithmType =\n | \"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"\n | \"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\"\n | \"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512\"\n | \"http://www.w3.org/2000/09/xmldsig#hmac-sha1\"\n | string;\n\n/**\n * @param cert the certificate as a string or array of strings (@see https://www.w3.org/TR/2008/REC-xmldsig-core-20080610/#sec-X509Data)\n * @param prefix an optional namespace alias to be used for the generated XML\n */\nexport interface GetKeyInfoContentArgs {\n publicCert?: crypto.KeyLike;\n prefix?: string | null;\n}\n\n/**\n * Options for the SignedXml constructor.\n */\nexport interface SignedXmlOptions {\n idMode?: \"wssecurity\";\n idAttribute?: string;\n privateKey?: crypto.KeyLike;\n publicCert?: crypto.KeyLike;\n signatureAlgorithm?: SignatureAlgorithmType;\n canonicalizationAlgorithm?: CanonicalizationAlgorithmType;\n inclusiveNamespacesPrefixList?: string | string[];\n implicitTransforms?: ReadonlyArray<CanonicalizationOrTransformAlgorithmType>;\n keyInfoAttributes?: Record<string, string>;\n getKeyInfoContent?(args?: GetKeyInfoContentArgs): string | null;\n getCertFromKeyInfo?(keyInfo?: Node | null): string | null;\n}\n\nexport interface NamespacePrefix {\n prefix: string;\n namespaceURI: string;\n}\n\nexport interface RenderedNamespace {\n rendered: string;\n newDefaultNs: string;\n}\n\nexport interface CanonicalizationOrTransformationAlgorithmProcessOptions {\n defaultNs?: string;\n defaultNsForPrefix?: Record<string, string>;\n ancestorNamespaces?: NamespacePrefix[];\n signatureNode?: Node | null;\n inclusiveNamespacesPrefixList?: string[];\n}\n\nexport interface ComputeSignatureOptionsLocation {\n reference?: string;\n action?: \"append\" | \"prepend\" | \"before\" | \"after\";\n}\n\n/**\n * Options for the computeSignature method.\n *\n * - `prefix` {String} Adds a prefix for the generated signature tags\n * - `attrs` {Object} A hash of attributes and values `attrName: value` to add to the signature root node\n * - `location` {{ reference: String, action: String }}\n * - `existingPrefixes` {Object} A hash of prefixes and namespaces `prefix: namespace` already in the xml\n * An object with a `reference` key which should\n * contain a XPath expression, an `action` key which\n * should contain one of the following values:\n * `append`, `prepend`, `before`, `after`\n */\nexport interface ComputeSignatureOptions {\n prefix?: string;\n attrs?: Record<string, string>;\n location?: ComputeSignatureOptionsLocation;\n existingPrefixes?: Record<string, string>;\n}\n\n/**\n * Represents a reference node for XML digital signature.\n */\nexport interface Reference {\n // The XPath expression that selects the data to be signed.\n xpath?: string;\n\n // An array of transforms to be applied to the data before signing.\n transforms: ReadonlyArray<CanonicalizationOrTransformAlgorithmType>;\n\n // The algorithm used to calculate the digest value of the data.\n digestAlgorithm: HashAlgorithmType;\n\n // The URI that identifies the data to be signed.\n uri: string;\n\n // Optional. The digest value of the referenced data.\n digestValue?: unknown;\n\n // A list of namespace prefixes to be treated as \"inclusive\" during canonicalization.\n inclusiveNamespacesPrefixList: string[];\n\n // Optional. Indicates whether the URI is empty.\n isEmptyUri: boolean;\n\n // Optional. The type of the reference node.\n ancestorNamespaces?: NamespacePrefix[];\n\n validationError?: Error;\n\n getValidatedNode(xpathSelector?: string): Node | null;\n\n signedReference?: string;\n}\n\n/** Implement this to create a new CanonicalizationOrTransformationAlgorithm */\nexport interface CanonicalizationOrTransformationAlgorithm {\n process(\n node: Node,\n options: CanonicalizationOrTransformationAlgorithmProcessOptions,\n ): Node | string;\n\n getAlgorithmName(): CanonicalizationOrTransformAlgorithmType;\n}\n\n/** Implement this to create a new HashAlgorithm */\nexport interface HashAlgorithm {\n getAlgorithmName(): HashAlgorithmType;\n\n getHash(xml: string): string;\n}\n\n/** Extend this to create a new SignatureAlgorithm */\nexport interface SignatureAlgorithm {\n /**\n * Sign the given string using the given key\n */\n getSignature(signedInfo: crypto.BinaryLike, privateKey: crypto.KeyLike): string;\n getSignature(\n signedInfo: crypto.BinaryLike,\n privateKey: crypto.KeyLike,\n callback?: ErrorFirstCallback<string>,\n ): void;\n /**\n * Verify the given signature of the given string using key\n *\n * @param key a public cert, public key, or private key can be passed here\n */\n verifySignature(material: string, key: crypto.KeyLike, signatureValue: string): boolean;\n verifySignature(\n material: string,\n key: crypto.KeyLike,\n signatureValue: string,\n callback?: ErrorFirstCallback<boolean>,\n ): void;\n\n getAlgorithmName(): SignatureAlgorithmType;\n}\n\n/** Implement this to create a new TransformAlgorithm */\nexport interface TransformAlgorithm {\n getAlgorithmName(): CanonicalizationOrTransformAlgorithmType;\n\n process(node: Node): string;\n}\n\n/**\n * ### Sign\n * #### Properties\n * - {@link SignedXml#privateKey} [required]\n * - {@link SignedXml#publicCert} [optional]\n * - {@link SignedXml#signatureAlgorithm} [optional]\n * - {@link SignedXml#canonicalizationAlgorithm} [optional]\n * #### Api\n * - {@link SignedXml#addReference}\n * - {@link SignedXml#computeSignature}\n * - {@link SignedXml#getSignedXml}\n * - {@link SignedXml#getSignatureXml}\n * - {@link SignedXml#getOriginalXmlWithIds}\n *\n * ### Verify\n * #### Properties\n * - {@link SignedXml#publicCert} [optional]\n * #### Api\n * - {@link SignedXml#loadSignature}\n * - {@link SignedXml#checkSignature}\n */\n\nfunction isErrorFirstCallback<T>(\n possibleCallback: unknown,\n): possibleCallback is ErrorFirstCallback<T> {\n return typeof possibleCallback === \"function\";\n}\n\n/**\n * This function will add a callback version of a sync function.\n *\n * This follows the factory pattern.\n * Just call this function, passing the function that you'd like to add a callback version of.\n */\nexport function createOptionalCallbackFunction<T, A extends unknown[]>(\n syncVersion: (...args: A) => T,\n): {\n (...args: A): T;\n (...args: [...A, ErrorFirstCallback<T>]): void;\n} {\n return ((...args: A | [...A, ErrorFirstCallback<T>]) => {\n const possibleCallback = args[args.length - 1];\n if (isErrorFirstCallback(possibleCallback)) {\n try {\n const result = syncVersion(...(args.slice(0, -1) as A));\n possibleCallback(null, result);\n } catch (err) {\n possibleCallback(err instanceof Error ? err : new Error(\"Unknown error\"));\n }\n } else {\n return syncVersion(...(args as A));\n }\n }) as {\n (...args: A): T;\n (...args: [...A, ErrorFirstCallback<T>]): void;\n };\n}\n"]}
@@ -0,0 +1,65 @@
1
+ /// <reference types="node" />
2
+ import type { NamespacePrefix } from "./types";
3
+ export declare function isArrayHasLength(array: unknown): array is unknown[];
4
+ export declare function findAttr(element: Element, localName: string, namespace?: string): Attr | null;
5
+ export declare function findChildren(node: Node | Document, localName: string, namespace?: string): Element[];
6
+ /** @deprecated */
7
+ export declare function findChilds(node: Node | Document, localName: string, namespace?: string): Element[];
8
+ export declare function encodeSpecialCharactersInAttribute(attributeValue: any): any;
9
+ export declare function encodeSpecialCharactersInText(text: string): string;
10
+ /**
11
+ * PEM format has wide range of usages, but this library
12
+ * is enforcing RFC7468 which focuses on PKIX, PKCS and CMS.
13
+ *
14
+ * https://www.rfc-editor.org/rfc/rfc7468
15
+ *
16
+ * PEM_FORMAT_REGEX is validating given PEM file against RFC7468 'stricttextualmsg' definition.
17
+ *
18
+ * With few exceptions;
19
+ * - 'posteb' MAY have 'eol', but it is not mandatory.
20
+ * - 'preeb' and 'posteb' lines are limited to 64 characters, but
21
+ * should not cause any issues in context of PKIX, PKCS and CMS.
22
+ */
23
+ export declare const PEM_FORMAT_REGEX: RegExp;
24
+ export declare const EXTRACT_X509_CERTS: RegExp;
25
+ export declare const BASE64_REGEX: RegExp;
26
+ /**
27
+ * -----BEGIN [LABEL]-----
28
+ * base64([DATA])
29
+ * -----END [LABEL]-----
30
+ *
31
+ * Above is shown what PEM file looks like. As can be seen, base64 data
32
+ * can be in single line or multiple lines.
33
+ *
34
+ * This function normalizes PEM presentation to;
35
+ * - contain PEM header and footer as they are given
36
+ * - normalize line endings to '\n'
37
+ * - normalize line length to maximum of 64 characters
38
+ * - ensure that 'preeb' has line ending '\n'
39
+ *
40
+ * With a couple of notes:
41
+ * - 'eol' is normalized to '\n'
42
+ *
43
+ * @param pem The PEM string to normalize to RFC7468 'stricttextualmsg' definition
44
+ */
45
+ export declare function normalizePem(pem: string): string;
46
+ /**
47
+ * @param pem The PEM-encoded base64 certificate to strip headers from
48
+ */
49
+ export declare function pemToDer(pem: string): Buffer;
50
+ /**
51
+ * @param der The DER-encoded base64 certificate to add PEM headers too
52
+ * @param pemLabel The label of the header and footer to add
53
+ */
54
+ export declare function derToPem(der: string | Buffer, pemLabel?: "CERTIFICATE" | "PRIVATE KEY" | "RSA PUBLIC KEY"): string;
55
+ /**
56
+ * Extract ancestor namespaces in order to import it to root of document subset
57
+ * which is being canonicalized for non-exclusive c14n.
58
+ *
59
+ * @param doc - Usually a product from `new xmldom.DOMParser().parseFromString()`
60
+ * @param docSubsetXpath - xpath query to get document subset being canonicalized
61
+ * @param namespaceResolver - xpath namespace resolver
62
+ * @returns i.e. [{prefix: "saml", namespaceURI: "urn:oasis:names:tc:SAML:2.0:assertion"}]
63
+ */
64
+ export declare function findAncestorNs(doc: Document, docSubsetXpath?: string, namespaceResolver?: XPathNSResolver): NamespacePrefix[];
65
+ export declare function validateDigestValue(digest: any, expectedDigest: any): boolean;