Commit ccac0cb
authored
New version, Java 11, System.Logger, AutoCloseable, XmlSignatureInput types (#192)
* Start of the development od version 4.0.0
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* POM Updates
- JDK11 instead of JDK8
- Added failsafe (skipped by default)
- Removed JDK profiles
- Removed dependency on SLF4J and LOGJ, XML-APIs
- Updated dependency: Jetty, Maven
- To be continued ...
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Using System.Logger instead SLF4J - except tests
- Allows to use also SLF4J2, previous version wasn't compatible
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Added module-info.java
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Fixed version in XMLDSigRI
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Added AutoCloseable to readers and writers
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Method getBytesFromFile made deprecated
- Used just in tests, but might be used by users
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* BufferedStreams replaced by Files.new*Stream calls
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* JMH tests targetting performance (and leaks)
- PerformanceIT is able to detect leaks
- has limited memory
- slows down with executions in a single batch
- fails if executions significantly slow down
- fails if iterations don't pass limits
- now fails DOM tests, seems there is some leak.
- replaces two ignored tests PerformanceMemoryTest and PerformanceTimingTest
- is executed by the failsafe plugin just on demand: use -DskipIT=false
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Cleanups in tests - using Java11+ features
- Created JmhUtils to help JMH
- System.Logger usages instead of slf4j
- Fixed some IO leaks in tests - unclosed streams
- XMLUtilsPerformanceTest now uses JMH
- Removed log4j2.properties
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Updated xml.bind versions
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Fixed dependencies based on tests with GlassFish and Metro Webservices
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Tolerate returning a null byte array
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Properly closing streams in tests - added readResource method
- also added several utility methods just for tests
- reduced copy and paste
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* First clean field references, then close
- close may throw an exception
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Yet some resource leaks in tests fixed/prevented + fixed calls
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Sources and target Java version set to 11 without overriding
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Fixed license
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Cleanups based on PMD, javadoc
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* XMLUtils benchmark moved under the failsafe plugin too
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Added buffers to XmlUtils
- nearly 10 times faster DOM benchmarks
- lower variability in benchmark results
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
# Conflicts:
# src/main/java/org/apache/xml/security/utils/XMLUtils.java
* Updated PMD
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Larger buffers, 8K is quite standard these days
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* XMLSignatureInput vs. resource leaks
- I have noticed that in tests a new FileInputStream is given as an argument
to this class, and then there's no control over it's lifecycle.
- Therefore I have added the finalize method to print warnings at least
until I would be able to change it to more reliable implementation.
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* JaCoCo configuration
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Refactoring around XMLSignatureInput
- It was split to several classes based on the type of the input data.
- Shouldn't those backed by an InputStream be AutoCloseable?
- I have seen unclosed file input streams in logs after some failures
- The class is also extended in other projects (WSIT, for example)
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Refactored PerformanceIT - each class has own file
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* JUnit5 tests should not be public, says PMD
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Following PMD advices for tests
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* XMLSignatureStreamInput: finalize replaced by close
- Safer implementation which allows better control over the stream closure.
- Allows also different implementations.
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Fixed XMLSignatureEdDSATest
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
# Conflicts:
# src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/SignatureValidator.java
# src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureEdDSATest.java
* Making PMD happy
- BeanMembersShouldSerialize was replaced by NonSerializableClass
- TestClassWithoutTestCases has false positives
- JUnit5 tests should be package protected
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
# Conflicts:
# src/test/java/org/apache/xml/security/test/dom/signature/EDDSASignatureTest.java
* Updated JAXB Runtime and Jakarta Activation
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Removed nonexisting sourceEncoding property from the PMD config
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* The test_sixteen_bad_signature made compliant with rules
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Fixed logging of Jetty + level in tests made configurable again
- mvn clean install -Dtest.logging.level=FINEST
- using nanoseconds in logs
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
# Conflicts:
# pom.xml
* Upgraded PMD to 3.21.0
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Fixed lost @test (reported by PMD)
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Don't swallow exceptions
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Updated jaxb runtime to 4.0.3
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Updated GitHub Actions configuration
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Reverted changes which are not necessary and just improved the code quality
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Pom cleanup
- using activation-api.version
- synced compiler, javadoc and modernizer release options
- javadoc uses compiler settings by default
- modernizer needs an explicit value
- compiler uses the maven.compiler.release property
- removed redundant junit version property
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Javadoc lost in rebase is back
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
* Fixed method name (canonicalize)
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
---------
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>1 parent c868d91 commit ccac0cb
321 files changed
Lines changed: 6628 additions & 8192 deletions
File tree
- .github/workflows
- etc
- src
- main/java
- org/apache
- jcp/xml/dsig/internal
- dom
- xml/security
- algorithms
- implementations
- c14n/implementations
- encryption
- keys
- content
- x509
- keyresolver
- implementations
- storage
- implementations
- signature
- stax
- config
- ext
- impl
- processor
- input
- output
- util
- transforms
- implementations
- utils
- resolver
- implementations
- test
- java/org/apache/xml/security
- stax/impl/securityToken
- test
- dom
- algorithms
- c14n
- helper
- implementations
- encryption
- interop
- keys
- content/x509
- keyresolver
- storage
- parser
- secure_val
- signature
- transforms
- implementations
- utils
- resolver
- version
- xalan
- javax/xml/crypto
- dsig
- dom
- keyinfo
- stax
- c14n
- encryption
- performance
- signature
- transformer
- utils
- utils
- resources
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| |||
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
| 102 | + | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| 108 | + | |
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
| |||
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
132 | | - | |
| 134 | + | |
133 | 135 | | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | | - | |
41 | | - | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | | - | |
84 | | - | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
89 | | - | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| |||
Lines changed: 19 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
56 | | - | |
57 | | - | |
| 61 | + | |
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| |||
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
121 | | - | |
| 125 | + | |
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
| |||
145 | 149 | | |
146 | 150 | | |
147 | 151 | | |
148 | | - | |
| 152 | + | |
149 | 153 | | |
150 | 154 | | |
151 | 155 | | |
| |||
163 | 167 | | |
164 | 168 | | |
165 | 169 | | |
166 | | - | |
| 170 | + | |
167 | 171 | | |
168 | 172 | | |
169 | 173 | | |
| |||
208 | 212 | | |
209 | 213 | | |
210 | 214 | | |
211 | | - | |
| 215 | + | |
212 | 216 | | |
213 | 217 | | |
214 | 218 | | |
| |||
217 | 221 | | |
218 | 222 | | |
219 | 223 | | |
220 | | - | |
| 224 | + | |
221 | 225 | | |
222 | 226 | | |
223 | | - | |
| 227 | + | |
224 | 228 | | |
225 | 229 | | |
226 | | - | |
| 230 | + | |
227 | 231 | | |
228 | 232 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
233 | 236 | | |
234 | 237 | | |
235 | | - | |
| 238 | + | |
236 | 239 | | |
237 | | - | |
238 | | - | |
| 240 | + | |
239 | 241 | | |
240 | 242 | | |
241 | 243 | | |
| |||
246 | 248 | | |
247 | 249 | | |
248 | 250 | | |
249 | | - | |
| 251 | + | |
250 | 252 | | |
251 | 253 | | |
252 | 254 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Lines changed: 17 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
58 | | - | |
59 | | - | |
| 63 | + | |
| 64 | + | |
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
| |||
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
143 | | - | |
| 148 | + | |
144 | 149 | | |
145 | 150 | | |
146 | 151 | | |
| |||
158 | 163 | | |
159 | 164 | | |
160 | 165 | | |
161 | | - | |
| 166 | + | |
162 | 167 | | |
163 | 168 | | |
164 | | - | |
| 169 | + | |
165 | 170 | | |
166 | | - | |
| 171 | + | |
167 | 172 | | |
168 | | - | |
| 173 | + | |
169 | 174 | | |
170 | 175 | | |
171 | | - | |
| 176 | + | |
172 | 177 | | |
173 | 178 | | |
174 | | - | |
| 179 | + | |
175 | 180 | | |
176 | 181 | | |
177 | | - | |
| 182 | + | |
178 | 183 | | |
179 | | - | |
180 | | - | |
| 184 | + | |
181 | 185 | | |
182 | 186 | | |
183 | 187 | | |
| |||
194 | 198 | | |
195 | 199 | | |
196 | 200 | | |
197 | | - | |
| 201 | + | |
198 | 202 | | |
199 | 203 | | |
200 | 204 | | |
| |||
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
57 | | - | |
58 | | - | |
| 59 | + | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| |||
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
118 | | - | |
| 120 | + | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| |||
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
137 | | - | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
0 commit comments