hanko_xml 0.1.0

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 (56) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +44 -0
  3. data/Cargo.lock +401 -0
  4. data/Cargo.toml +7 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +222 -0
  7. data/THIRD_PARTY_LICENSES.md +392 -0
  8. data/dependencies.yml +87 -0
  9. data/ext/hanko_xml/Cargo.toml +20 -0
  10. data/ext/hanko_xml/build/vendor.rs +817 -0
  11. data/ext/hanko_xml/build.rs +298 -0
  12. data/ext/hanko_xml/extconf.rb +6 -0
  13. data/ext/hanko_xml/src/dsig.rs +1851 -0
  14. data/ext/hanko_xml/src/errors.rs +151 -0
  15. data/ext/hanko_xml/src/lib.rs +490 -0
  16. data/ext/hanko_xml/src/sys.rs +43 -0
  17. data/lib/hanko_xml/algorithms.rb +228 -0
  18. data/lib/hanko_xml/dom.rb +137 -0
  19. data/lib/hanko_xml/errors.rb +132 -0
  20. data/lib/hanko_xml/exc-c14n.xsd +26 -0
  21. data/lib/hanko_xml/input.rb +50 -0
  22. data/lib/hanko_xml/key.rb +213 -0
  23. data/lib/hanko_xml/key_info.rb +67 -0
  24. data/lib/hanko_xml/native_version.rb +75 -0
  25. data/lib/hanko_xml/nokogiri_ext.rb +34 -0
  26. data/lib/hanko_xml/placement.rb +127 -0
  27. data/lib/hanko_xml/policy.rb +502 -0
  28. data/lib/hanko_xml/reference.rb +49 -0
  29. data/lib/hanko_xml/signature_info.rb +134 -0
  30. data/lib/hanko_xml/signed_document.rb +155 -0
  31. data/lib/hanko_xml/signer.rb +572 -0
  32. data/lib/hanko_xml/template.rb +150 -0
  33. data/lib/hanko_xml/transform.rb +87 -0
  34. data/lib/hanko_xml/verification.rb +377 -0
  35. data/lib/hanko_xml/verifier.rb +694 -0
  36. data/lib/hanko_xml/version.rb +5 -0
  37. data/lib/hanko_xml/xades/verifier.rb +319 -0
  38. data/lib/hanko_xml/xades.rb +287 -0
  39. data/lib/hanko_xml/xml.rb +93 -0
  40. data/lib/hanko_xml/xmldsig-core-schema.xsd +332 -0
  41. data/lib/hanko_xml.rb +122 -0
  42. data/sig/hanko_xml/key.rbs +48 -0
  43. data/sig/hanko_xml/native.rbs +12 -0
  44. data/sig/hanko_xml/native_version.rbs +13 -0
  45. data/sig/hanko_xml/nokogiri_ext.rbs +23 -0
  46. data/sig/hanko_xml/placement.rbs +27 -0
  47. data/sig/hanko_xml/policy.rbs +83 -0
  48. data/sig/hanko_xml/reference.rbs +36 -0
  49. data/sig/hanko_xml/signed_document.rbs +66 -0
  50. data/sig/hanko_xml/signer.rbs +50 -0
  51. data/sig/hanko_xml/template.rbs +41 -0
  52. data/sig/hanko_xml/verification.rbs +100 -0
  53. data/sig/hanko_xml/verifier.rbs +45 -0
  54. data/sig/hanko_xml/xades.rbs +70 -0
  55. data/sig/hanko_xml.rbs +62 -0
  56. metadata +105 -0
data/README.md ADDED
@@ -0,0 +1,222 @@
1
+ <p align="center">
2
+ <img src="assets/hanko-mark.png" alt="HankoXml" width="120" height="120">
3
+ </p>
4
+
5
+ <h1 align="center">HankoXml</h1>
6
+
7
+ <p align="center">
8
+ A high-performance, strictly secure XML Digital Signature (XML-DSig) library for Ruby.
9
+ </p>
10
+
11
+ ---
12
+
13
+ HankoXml is backed by a native Rust extension that binds directly to [libxmlsec1](https://www.aleksey.com/xmlsec/) using [Magnus](https://github.com/matsadler/magnus). It is designed to be completely byte-faithful, blazingly fast, and natively immune to XML Signature Wrapping (XSW) attacks.
14
+
15
+ It works nicely with Nokogiri, signing and verifying the documents you already hold without fragile re-serialization, and it works without Nokogiri too: verification runs on plain bytes.
16
+
17
+ ## Features
18
+ - **Full XML-DSig Support:** Sign and verify Enveloped, Enveloping, and Detached signatures.
19
+ - **Nokogiri Native, Nokogiri Optional:** Signs and verifies the Nokogiri documents you already hold, with opt-in `doc.sign!` / `doc.signature_valid?` shorthands (`require "hanko_xml/nokogiri_ext"`), and verifies Strings, files and IOs without Nokogiri.
20
+ - **XSW Defense:** Provides a robust `Policy` engine and structural `signed?(node)` checks to defeat XML Signature Wrapping (XSW) attacks.
21
+ - **Rust-Backed:** Memory-safe FFI boundaries, zero shell-outs to CLI binaries, and massive performance gains over pure-Ruby cryptography.
22
+
23
+ A feature and security comparison with Python [SignXML](https://pypi.org/project/signxml/), including a plan to close the remaining gaps (XAdES first), lives in [`docs/src/content/guide/comparison-signxml.md`](docs/src/content/guide/comparison-signxml.md).
24
+
25
+ ## Requirements
26
+
27
+ Most users install a precompiled platform gem and do **not** need a local build
28
+ toolchain.
29
+
30
+ - Ruby 3.1+
31
+
32
+ Precompiled gems are published for:
33
+
34
+ - `x86_64-linux`
35
+ - `aarch64-linux`
36
+ - `arm64-darwin`
37
+ - `x64-mingw-ucrt`
38
+
39
+ ### Building from source (fallback)
40
+
41
+ If RubyGems falls back to the source gem for your platform, HankoXml compiles
42
+ its Rust extension against the local `libxmlsec1`, so the build toolchain has
43
+ to be present:
44
+
45
+ - Rust toolchain (stable)
46
+ - `libxmlsec1` and `libxml2` development headers, `pkg-config`, and libclang
47
+ (bindgen generates the FFI bindings during the build):
48
+ - **macOS:** `brew install libxmlsec1 libxml2 pkg-config`
49
+ - **Debian/Ubuntu:** `apt install libxmlsec1-dev libxml2-dev pkg-config libclang-dev`
50
+
51
+ Supported libxmlsec1: `>= 1.2.30, < 1.4`.
52
+
53
+ *(Note for macOS: Homebrew's `libxml2` is keg-only. HankoXml's `build.rs` automatically works around this by resolving absolute library paths during compilation.)*
54
+
55
+ ### Version safety
56
+
57
+ bindgen bakes xmlsec's and libxml2's struct layouts into the compiled
58
+ extension, and a later mismatch is invisible to the dynamic linker — every
59
+ symbol still resolves, and a field is then read at the wrong offset. HankoXml
60
+ checks for this when it loads and raises `HankoXml::NativeVersionMismatch`
61
+ rather than returning a wrong answer from `verify!`:
62
+
63
+ ```ruby
64
+ HankoXml::NativeVersion.build_versions
65
+ # => { xmlsec: "1.3.12", libxml2: "2.15.3", crypto: "openssl" }
66
+ ```
67
+
68
+ If you installed from source and later upgrade libxmlsec1 through your OS
69
+ package manager, rebuild the extension with `gem pristine hanko_xml`.
70
+
71
+ ## Installation
72
+
73
+ Add this line to your application's Gemfile:
74
+
75
+ ```ruby
76
+ gem "hanko_xml"
77
+ ```
78
+
79
+ Nokogiri is optional, and `hanko_xml` does not depend on it or load it. Pick
80
+ the setup that fits:
81
+
82
+ - **With Nokogiri** (most projects already have it): add `gem "nokogiri"` and
83
+ `require "nokogiri"`. Everything is available, including signing, the
84
+ Nokogiri API below, and node-level `signed?` checks.
85
+ - **Bytes only**: leave Nokogiri out. Verification works on a String, a path
86
+ or an IO, with the same policy, schema and structural checks. Signing works
87
+ when the document already holds the `<Signature>` template. Building one, and
88
+ the DOM features, raise `HankoXml::NokogiriRequired`, naming what needs
89
+ Nokogiri.
90
+
91
+ | Capability | With Nokogiri | Bytes only |
92
+ |---|---|---|
93
+ | `valid?`, `verify!`, `Verifier`, `signature_present?` | yes | yes |
94
+ | `sign` into a template the document already holds | yes | yes, one template per call |
95
+ | `sign` that builds the template, `sign!`, `Signer#template` | yes | raises `NokogiriRequired` |
96
+ | `Verification#signed?`, `#at_signed`, `#signed_nodes` | yes | raises; `#covers_root?` still answers |
97
+ | Custom `Nokogiri::XML::Schema`, `signature:` XPath, `resolver:`, XAdES | yes | raises `NokogiriRequired` |
98
+
99
+ `HankoXml.capabilities` reports the same thing at runtime. On Linux with
100
+ system libraries, whichever of hanko_xml and Nokogiri loads first decides which
101
+ libxml2 the other runs on, so HankoXml leaves the load order to you.
102
+
103
+ ## Usage
104
+
105
+ ### 1. The Nokogiri API (Recommended)
106
+
107
+ HankoXml can extend Nokogiri directly, making signing and verifying incredibly
108
+ ergonomic. The extension is opt-in: `require "hanko_xml"` alone does not touch
109
+ Nokogiri's classes, and `require "hanko_xml/nokogiri_ext"` adds `#sign`,
110
+ `#sign!`, `#signature_valid?`, `#signatures` and `#signature_present?` to
111
+ `Nokogiri::XML::Document` and `Node`.
112
+
113
+ ```ruby
114
+ require "nokogiri"
115
+ require "hanko_xml"
116
+ require "hanko_xml/nokogiri_ext"
117
+
118
+ doc = Nokogiri::XML(File.read("document.xml"))
119
+ private_key = File.read("private.pem")
120
+ certificate = File.read("public.crt")
121
+
122
+ # Sign the document in place
123
+ doc.sign!(key: private_key, certificate: certificate)
124
+
125
+ # Safely serialize without destroying the signature bytes
126
+ File.write("signed.xml", doc.to_xml(save_with: Nokogiri::XML::Node::SaveOptions::AS_XML))
127
+
128
+ # Verify it later
129
+ signed_doc = Nokogiri::XML(File.read("signed.xml"))
130
+ if signed_doc.signature_valid?(certificate: certificate)
131
+ puts "Signature is valid!"
132
+ end
133
+ ```
134
+
135
+ ### 2. The Module API
136
+
137
+ If you prefer not to load the Nokogiri extension, use the top-level module:
138
+
139
+ #### Verification
140
+
141
+ This works with or without Nokogiri:
142
+
143
+ ```ruby
144
+ require "hanko_xml"
145
+ require "pathname"
146
+
147
+ xml = File.read("signed.xml")
148
+
149
+ # Raises HankoXml::VerificationError if the signature is invalid or tampered with
150
+ result = HankoXml.verify!(xml, certificate: Pathname("public.crt"))
151
+
152
+ puts result.valid? # => true
153
+ ```
154
+
155
+ #### Signing (Immutable)
156
+ ```ruby
157
+ # Returns a safe `SignedDocument` wrapper without mutating the original
158
+ # A String is PEM content, not a filename: pass files as Pathname (or File.read them).
159
+ signed_doc = HankoXml.sign(xml, key: Pathname("private.pem"), certificate: Pathname("public.crt"))
160
+
161
+ puts signed_doc.to_s
162
+ ```
163
+
164
+ ### Defending against XML Signature Wrapping (XSW)
165
+
166
+ A signature is only secure if it actually signed the data you are looking at. Attackers often wrap or move the `<Signature>` block to trick naive verifiers. HankoXml provides a structural `signed?` check on the verification result to prove a specific node was cryptographically covered by the digest.
167
+
168
+ ```ruby
169
+ result = HankoXml.verify!(doc, certificate: cert)
170
+
171
+ # Find the critical data in your document
172
+ payload = doc.at_xpath("//Invoice")
173
+
174
+ # Ensure the attacker didn't move it outside the signed block
175
+ unless result.signed?(payload)
176
+ raise "XSW Attack Detected: The invoice was tampered with!"
177
+ end
178
+ ```
179
+
180
+ ### Trust Anchors & Verification Options
181
+
182
+ You can verify signatures against multiple certificates, strict schemas, or specific validation times.
183
+
184
+ ```ruby
185
+ HankoXml.verify!(
186
+ doc,
187
+ # Pass a single cert, an array of certs, an OpenSSL::X509::Store, or a mapping of <KeyName>s
188
+ store: my_trusted_ca_store,
189
+
190
+ # Ensure the certificate was valid at a specific time
191
+ verification_time: Time.parse("2023-01-01"),
192
+
193
+ # Pre-validate the <Signature> structure against the W3C XSD to prevent parser exploits
194
+ schema: :default,
195
+
196
+ # Enforce strict security policies (no SHA-1, no external references)
197
+ policy: HankoXml::Policy.strict
198
+ )
199
+ ```
200
+
201
+ ## Contributing
202
+
203
+ Bug reports and pull requests are welcome on GitHub at https://github.com/danimaribeiro/HankoXml.
204
+
205
+ `bundle exec rake compile spec` by default builds the Rust extension against
206
+ your system's `libxmlsec1` (see "Building from source" above), which is fine
207
+ for day-to-day development. But the system library's build configuration can
208
+ differ from the pinned, vendored `libxmlsec1` that CI and the released gem
209
+ actually use — on macOS with Homebrew's `libxmlsec1`, this has been observed
210
+ to make some native URI-restriction and `KeyValue` specs fail or hang. Before
211
+ relying on a full local `bundle exec rspec` run (e.g. to validate a security
212
+ fix), rebuild against the vendored library instead:
213
+
214
+ ```sh
215
+ HANKO_XML_VENDOR=1 bundle exec rake compile spec
216
+ ```
217
+
218
+ See [VENDORING.md](VENDORING.md) for details on what gets vendored and why.
219
+
220
+ ## License
221
+
222
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,392 @@
1
+ # Third-party licenses for vendored platform gems
2
+
3
+ The precompiled platform gems for `hanko_xml` statically vendor these upstream
4
+ libraries from `dependencies.yml`:
5
+
6
+ - libxml2 2.15.4 — MIT
7
+ - xmlsec1 1.3.12 — MIT
8
+ - OpenSSL 3.5.9 — Apache-2.0
9
+
10
+ The source gem normally links system libraries instead of redistributing these
11
+ copies, but the platform gems ship the vendored code and therefore ship the
12
+ corresponding license and notice text here as well.
13
+
14
+ ## libxml2 2.15.4
15
+
16
+ Source: `GNOME/libxml2`, tag `v2.15.4`, file `Copyright`
17
+
18
+ ```text
19
+ Except where otherwise noted in the source code (e.g. the files dict.c and
20
+ list.c, which are covered by a similar licence but with different Copyright
21
+ notices) all the files are:
22
+
23
+ Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved.
24
+ Copyright (C) The Libxml2 Contributors.
25
+
26
+ Permission is hereby granted, free of charge, to any person obtaining a copy
27
+ of this software and associated documentation files (the "Software"), to deal
28
+ in the Software without restriction, including without limitation the rights
29
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
30
+ copies of the Software, and to permit persons to whom the Software is fur-
31
+ nished to do so, subject to the following conditions:
32
+
33
+ The above copyright notice and this permission notice shall be included in
34
+ all copies or substantial portions of the Software.
35
+
36
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
38
+ NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
39
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
40
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
41
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
42
+ THE SOFTWARE.
43
+ ```
44
+
45
+ ## xmlsec1 1.3.12
46
+
47
+ Source: `lsh123/xmlsec`, tag `1.3.12`, file `Copyright`
48
+
49
+ ```text
50
+ ------------------------------------------------------------------------------
51
+ xmlsec, xmlsec-openssl, xmlsec-gnutls, xmlsec-gcrypt libraries
52
+ ------------------------------------------------------------------------------
53
+
54
+ Copyright (C) 2002-2026 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved.
55
+
56
+ Permission is hereby granted, free of charge, to any person obtaining a copy
57
+ of this software and associated documentation files (the "Software"), to deal
58
+ in the Software without restriction, including without limitation the rights
59
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
60
+ copies of the Software, and to permit persons to whom the Software is fur-
61
+ nished to do so, subject to the following conditions:
62
+
63
+ The above copyright notice and this permission notice shall be included in
64
+ all copies or substantial portions of the Software.
65
+
66
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
67
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
68
+ NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
69
+ ALEKSEY SANIN BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
70
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
71
+ NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
72
+
73
+ Except as contained in this notice, the name of Aleksey Sanin shall not
74
+ be used in advertising or otherwise to promote the sale, use or other deal-
75
+ ings in this Software without prior written authorization from him.
76
+
77
+ ------------------------------------------------------------------------------
78
+ xmlsec-nss library
79
+ ------------------------------------------------------------------------------
80
+ Copyright (C) 2002-2026 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved.
81
+ Copyright (c) 2003 America Online, Inc. All rights reserved.
82
+
83
+ Permission is hereby granted, free of charge, to any person obtaining a copy
84
+ of this software and associated documentation files (the "Software"), to deal
85
+ in the Software without restriction, including without limitation the rights
86
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
87
+ copies of the Software, and to permit persons to whom the Software is fur-
88
+ nished to do so, subject to the following conditions:
89
+
90
+ The above copyright notice and this permission notice shall be included in
91
+ all copies or substantial portions of the Software.
92
+
93
+ Portions of the Software were created using source code and/or APIs
94
+ governed by the Mozilla Public License (MPL). The MPL is available
95
+ at http://www.mozilla.org/MPL/MPL-1.1.html. The MPL permits such
96
+ portions to be distributed with code not governed by MPL, as long
97
+ as the requirements of MPL are fulfilled for such portions.
98
+
99
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
100
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
101
+ NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
102
+ ALEKSEY SANIN BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
103
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
104
+ NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
105
+
106
+ Except as contained in this notice, the name of Aleksey Sanin shall not
107
+ be used in advertising or otherwise to promote the sale, use or other deal-
108
+ ings in this Software without prior written authorization from him.
109
+
110
+
111
+ ------------------------------------------------------------------------------
112
+ xmlsec-mscrypto library
113
+ ------------------------------------------------------------------------------
114
+
115
+ Copyright (C) 2002-2026 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved.
116
+ Copyright (C) 2003 Cordys R&D BV, All rights reserved.
117
+ Copyright (C) 2007 Roumen Petrov.
118
+ Copyright (c) 2005-2006 Cryptocom LTD (http://www.cryptocom.ru).
119
+
120
+
121
+ Permission is hereby granted, free of charge, to any person obtaining a copy
122
+ of this software and associated documentation files (the "Software"), to deal
123
+ in the Software without restriction, including without limitation the rights
124
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
125
+ copies of the Software, and to permit persons to whom the Software is fur-
126
+ nished to do so, subject to the following conditions:
127
+
128
+ The above copyright notice and this permission notice shall be included in
129
+ all copies or substantial portions of the Software.
130
+
131
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
132
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
133
+ NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
134
+ ALEKSEY SANIN BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
135
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
136
+ NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
137
+
138
+ Except as contained in this notice, the name of Aleksey Sanin shall not
139
+ be used in advertising or otherwise to promote the sale, use or other deal-
140
+ ings in this Software without prior written authorization from him.
141
+
142
+
143
+ ------------------------------------------------------------------------------
144
+ xmlsec-mscng library
145
+ ------------------------------------------------------------------------------
146
+
147
+ Copyright (C) 2018-2026 Aleksey Sanin. All Rights Reserved.
148
+ Copyright (C) 2018 Miklos Vajna. All Rights Reserved.
149
+
150
+
151
+ Permission is hereby granted, free of charge, to any person obtaining a copy
152
+ of this software and associated documentation files (the "Software"), to deal
153
+ in the Software without restriction, including without limitation the rights
154
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
155
+ copies of the Software, and to permit persons to whom the Software is fur-
156
+ nished to do so, subject to the following conditions:
157
+
158
+ The above copyright notice and this permission notice shall be included in
159
+ all copies or substantial portions of the Software.
160
+
161
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
162
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
163
+ NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
164
+ ALEKSEY SANIN BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
165
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
166
+ NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
167
+
168
+ Except as contained in this notice, the name of Aleksey Sanin shall not
169
+ be used in advertising or otherwise to promote the sale, use or other deal-
170
+ ings in this Software without prior written authorization from him.
171
+
172
+ ------------------------------------------------------------------------------
173
+ Additional copyright information
174
+ ------------------------------------------------------------------------------
175
+ See individual source files for any additional copyright information
176
+
177
+
178
+ ------------------------------------------------------------------------------
179
+ References
180
+ ------------------------------------------------------------------------------
181
+ * AOL
182
+ http://www.aleksey.com/pipermail/xmlsec/2003/005488.html
183
+ http://www.aleksey.com/pipermail/xmlsec/attachments/20030729/0e25648e/attachment.htm
184
+
185
+ * Cordys R&D BV
186
+ http://www.aleksey.com/pipermail/xmlsec/2003/005581.html
187
+
188
+ * Cryptocom LTD
189
+ http://www.aleksey.com/pipermail/xmlsec/2006/007410.html
190
+ ```
191
+
192
+ The `1.3.12` release also includes a top-level `COPYING` file containing:
193
+
194
+ ```text
195
+ See Copyright file for information about the copyright
196
+ ```
197
+
198
+ ## OpenSSL 3.5.9
199
+
200
+ Source: `openssl/openssl`, tag `openssl-3.5.9`, file `LICENSE.txt`
201
+
202
+ ```text
203
+ Apache License
204
+ Version 2.0, January 2004
205
+ https://www.apache.org/licenses/
206
+
207
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
208
+
209
+ 1. Definitions.
210
+
211
+ "License" shall mean the terms and conditions for use, reproduction,
212
+ and distribution as defined by Sections 1 through 9 of this document.
213
+
214
+ "Licensor" shall mean the copyright owner or entity authorized by
215
+ the copyright owner that is granting the License.
216
+
217
+ "Legal Entity" shall mean the union of the acting entity and all
218
+ other entities that control, are controlled by, or are under common
219
+ control with that entity. For the purposes of this definition,
220
+ "control" means (i) the power, direct or indirect, to cause the
221
+ direction or management of such entity, whether by contract or
222
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
223
+ outstanding shares, or (iii) beneficial ownership of such entity.
224
+
225
+ "You" (or "Your") shall mean an individual or Legal Entity
226
+ exercising permissions granted by this License.
227
+
228
+ "Source" form shall mean the preferred form for making modifications,
229
+ including but not limited to software source code, documentation
230
+ source, and configuration files.
231
+
232
+ "Object" form shall mean any form resulting from mechanical
233
+ transformation or translation of a Source form, including but
234
+ not limited to compiled object code, generated documentation,
235
+ and conversions to other media types.
236
+
237
+ "Work" shall mean the work of authorship, whether in Source or
238
+ Object form, made available under the License, as indicated by a
239
+ copyright notice that is included in or attached to the work
240
+ (an example is provided in the Appendix below).
241
+
242
+ "Derivative Works" shall mean any work, whether in Source or Object
243
+ form, that is based on (or derived from) the Work and for which the
244
+ editorial revisions, annotations, elaborations, or other modifications
245
+ represent, as a whole, an original work of authorship. For the purposes
246
+ of this License, Derivative Works shall not include works that remain
247
+ separable from, or merely link (or bind by name) to the interfaces of,
248
+ the Work and Derivative Works thereof.
249
+
250
+ "Contribution" shall mean any work of authorship, including
251
+ the original version of the Work and any modifications or additions
252
+ to that Work or Derivative Works thereof, that is intentionally
253
+ submitted to Licensor for inclusion in the Work by the copyright owner
254
+ or by an individual or Legal Entity authorized to submit on behalf of
255
+ the copyright owner. For the purposes of this definition, "submitted"
256
+ means any form of electronic, verbal, or written communication sent
257
+ to the Licensor or its representatives, including but not limited to
258
+ communication on electronic mailing lists, source code control systems,
259
+ and issue tracking systems that are managed by, or on behalf of, the
260
+ Licensor for the purpose of discussing and improving the Work, but
261
+ excluding communication that is conspicuously marked or otherwise
262
+ designated in writing by the copyright owner as "Not a Contribution."
263
+
264
+ "Contributor" shall mean Licensor and any individual or Legal Entity
265
+ on behalf of whom a Contribution has been received by Licensor and
266
+ subsequently incorporated within the Work.
267
+
268
+ 2. Grant of Copyright License. Subject to the terms and conditions of
269
+ this License, each Contributor hereby grants to You a perpetual,
270
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
271
+ copyright license to reproduce, prepare Derivative Works of,
272
+ publicly display, publicly perform, sublicense, and distribute the
273
+ Work and such Derivative Works in Source or Object form.
274
+
275
+ 3. Grant of Patent License. Subject to the terms and conditions of
276
+ this License, each Contributor hereby grants to You a perpetual,
277
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
278
+ (except as stated in this section) patent license to make, have made,
279
+ use, offer to sell, sell, import, and otherwise transfer the Work,
280
+ where such license applies only to those patent claims licensable
281
+ by such Contributor that are necessarily infringed by their
282
+ Contribution(s) alone or by combination of their Contribution(s)
283
+ with the Work to which such Contribution(s) was submitted. If You
284
+ institute patent litigation against any entity (including a
285
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
286
+ or a Contribution incorporated within the Work constitutes direct
287
+ or contributory patent infringement, then any patent licenses
288
+ granted to You under this License for that Work shall terminate
289
+ as of the date such litigation is filed.
290
+
291
+ 4. Redistribution. You may reproduce and distribute copies of the
292
+ Work or Derivative Works thereof in any medium, with or without
293
+ modifications, and in Source or Object form, provided that You
294
+ meet the following conditions:
295
+
296
+ (a) You must give any other recipients of the Work or
297
+ Derivative Works a copy of this License; and
298
+
299
+ (b) You must cause any modified files to carry prominent notices
300
+ stating that You changed the files; and
301
+
302
+ (c) You must retain, in the Source form of any Derivative Works
303
+ that You distribute, all copyright, patent, trademark, and
304
+ attribution notices from the Source form of the Work,
305
+ excluding those notices that do not pertain to any part of
306
+ the Derivative Works; and
307
+
308
+ (d) If the Work includes a "NOTICE" text file as part of its
309
+ distribution, then any Derivative Works that You distribute must
310
+ include a readable copy of the attribution notices contained
311
+ within such NOTICE file, excluding those notices that do not
312
+ pertain to any part of the Derivative Works, in at least one
313
+ of the following places: within a NOTICE text file distributed
314
+ as part of the Derivative Works; within the Source form or
315
+ documentation, if provided along with the Derivative Works; or,
316
+ within a display generated by the Derivative Works, if and
317
+ wherever such third-party notices normally appear. The contents
318
+ of the NOTICE file are for informational purposes only and
319
+ do not modify the License. You may add Your own attribution
320
+ notices within Derivative Works that You distribute, alongside
321
+ or as an addendum to the NOTICE text from the Work, provided
322
+ that such additional attribution notices cannot be construed
323
+ as modifying the License.
324
+
325
+ You may add Your own copyright statement to Your modifications and
326
+ may provide additional or different license terms and conditions
327
+ for use, reproduction, or distribution of Your modifications, or
328
+ for any such Derivative Works as a whole, provided Your use,
329
+ reproduction, and distribution of the Work otherwise complies with
330
+ the conditions stated in this License.
331
+
332
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
333
+ any Contribution intentionally submitted for inclusion in the Work
334
+ by You to the Licensor shall be under the terms and conditions of
335
+ this License, without any additional terms or conditions.
336
+ Notwithstanding the above, nothing herein shall supersede or modify
337
+ the terms of any separate license agreement you may have executed
338
+ with Licensor regarding such Contributions.
339
+
340
+ 6. Trademarks. This License does not grant permission to use the trade
341
+ names, trademarks, service marks, or product names of the Licensor,
342
+ except as required for reasonable and customary use in describing the
343
+ origin of the Work and reproducing the content of the NOTICE file.
344
+
345
+ 7. Disclaimer of Warranty. Unless required by applicable law or
346
+ agreed to in writing, Licensor provides the Work (and each
347
+ Contributor provides its Contributions) on an "AS IS" BASIS,
348
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
349
+ implied, including, without limitation, any warranties or conditions
350
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
351
+ PARTICULAR PURPOSE. You are solely responsible for determining the
352
+ appropriateness of using or redistributing the Work and assume any
353
+ risks associated with Your exercise of permissions under this License.
354
+
355
+ 8. Limitation of Liability. In no event and under no legal theory,
356
+ whether in tort (including negligence), contract, or otherwise,
357
+ unless required by applicable law (such as deliberate and grossly
358
+ negligent acts) or agreed to in writing, shall any Contributor be
359
+ liable to You for damages, including any direct, indirect, special,
360
+ incidental, or consequential damages of any character arising as a
361
+ result of this License or out of the use or inability to use the
362
+ Work (including but not limited to damages for loss of goodwill,
363
+ work stoppage, computer failure or malfunction, or any and all
364
+ other commercial damages or losses), even if such Contributor
365
+ has been advised of the possibility of such damages.
366
+
367
+ 9. Accepting Warranty or Additional Liability. While redistributing
368
+ the Work or Derivative Works thereof, You may choose to offer,
369
+ and charge a fee for, acceptance of support, warranty, indemnity,
370
+ or other liability obligations and/or rights consistent with this
371
+ License. However, in accepting such obligations, You may act only
372
+ on Your own behalf and on Your sole responsibility, not on behalf
373
+ of any other Contributor, and only if You agree to indemnify,
374
+ defend, and hold each Contributor harmless for any liability
375
+ incurred by, or claims asserted against, such Contributor by reason
376
+ of your accepting any such warranty or additional liability.
377
+
378
+ END OF TERMS AND CONDITIONS
379
+ ```
380
+
381
+ At the pinned `openssl-3.5.9` ref, the upstream repository does not include a
382
+ top-level `NOTICE` file. It does include `ACKNOWLEDGEMENTS.md`; the block
383
+ below reproduces that upstream Markdown file verbatim as shipped:
384
+
385
+ ```text
386
+ Acknowledgements
387
+ ================
388
+
389
+ Please see our [Thanks!][] page for the current acknowledgements.
390
+
391
+ [Thanks!]: https://www.openssl.org/community/thanks.html
392
+ ```